[Frugalware-git] fwlive_pkgs: wlan-ng-fwlive-0.2.8-15-i686
Janos Kovacs
janny at frugalware.org
Fri Jan 25 00:32:11 CET 2008
Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=fwlive_pkgs.git;a=commitdiff;h=5b65d93d324d0a30a781d99649b689929297e9e8
commit 5b65d93d324d0a30a781d99649b689929297e9e8
Author: Janos Kovacs <janny at frugalware.org>
Date: Fri Jan 25 00:31:36 2008 +0100
wlan-ng-fwlive-0.2.8-15-i686
* add wlan-ng to fwlive
diff --git a/source/network-extra/wlan-ng-fwlive/FrugalBuild b/source/network-extra/wlan-ng-fwlive/FrugalBuild
new file mode 100644
index 0000000..d7f07ce
--- /dev/null
+++ b/source/network-extra/wlan-ng-fwlive/FrugalBuild
@@ -0,0 +1,47 @@
+# Compiling Time: 0.33 SBU
+# Maintainer: VMiklos <vmiklos at frugalware.org>
+
+pkgname=wlan-ng-fwlive
+pkgver=0.2.8
+pkgrel=15
+pkgdesc="Wireless Lan modules"
+url="http://www.linux-wlan.org/"
+Finclude kernel-module
+kver=2.6.23-6
+depends=("kernel-fwlive=$kver")
+makedepends=("kernel-fwlive-source=$kver")
+_F_kernelmod_uname=`echo $kver|sed 's/-/-fw/'`
+_F_kernelmod_dir="/lib/modules/$_F_kernelmod_uname"
+depends=(${depends[@]} 'bash')
+groups=('network-extra')
+archs=('i686' 'x86_64')
+backup=(etc/wlan/wlan.conf)
+up2date="lynx -dump ftp://ftp.linux-wlan.org/pub/linux-wlan-ng/|grep tar.bz2$|sed -n 's/.*g-\(.*\)\.t.*/\1/;s/-//;$ p'"
+source=(ftp://ftp.linux-wlan.org/pub/linux-wlan-ng/linux-wlan-ng-$pkgver.tar.bz2 \
+ rc.wlan wlan-ng-0.2.8-kernel2623.diff)
+sha1sums=('a98cd5c7327f5392730ebe1a5b7f289fc88d00de' \
+ 'b5b76089293cf11ab5c5f634f1c3b8dd7f4c34a7' \
+ 'dd46ef1066debf1596902c9d8bb7c3988e98e184')
+
+build()
+{
+ # no Fcheckkernel, crosscompilation verified
+ Fcd linux-wlan-ng-$pkgver
+ Fsed '`uname -r`' "$_F_kernelmod_uname" Configure
+ find . -type f -exec sed -i '/#include <linux\/config.h>/d' {} \;
+ Fsed "TARGET_ROOT_ON_HOST=" "TARGET_ROOT_ON_HOST=$Fdestdir" config.in
+ Fsed "PRISM2_PLX=n" "PRISM2_PLX=y" config.in
+ Fsed "PRISM2_PCI=n" "PRISM2_PCI=y" config.in
+ Fsed "PRISM2_USB=n" "PRISM2_USB=y" config.in
+ Fsed "PRISM2_PCMCIA=y" "PRISM2_PCMCIA=n" config.in
+ Fpatchall
+ make auto_config
+ make all || return 1
+ make install
+ Fmv /usr/local/man /usr/man
+ Frm /init.d
+ Frcd wlan
+ Fbuild_kernelmod_scriptlet
+}
+
+# optimization OK
diff --git a/source/network-extra/wlan-ng-fwlive/rc.wlan b/source/network-extra/wlan-ng-fwlive/rc.wlan
new file mode 100644
index 0000000..9e61c5e
--- /dev/null
+++ b/source/network-extra/wlan-ng-fwlive/rc.wlan
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+# (c) 2005 Miklos Vajna <vmiklos at frugalware.org>
+# rc.wlan for Frugalware
+# distributed under GPL License
+
+. /etc/rc.d/rc.functions
+
+# chkconfig: 2345 15 91
+# description: Activates/Configures/Disables the devices
+
+[ -f /etc/wlan/shared ] || exit 0
+. /etc/wlan/shared
+
+if [ "$1" = "stop" ]; then
+ stop "$stopwlan"
+ # Do a reset on each device to make sure none of them are still
+ # trying to generate interrupts.
+ for DEVICE in $WLAN_DEVICES; do
+ wlan_disable $DEVICE
+ ifconfig $DEVICE down
+ $MODPROBE -r $DEVICE
+ done
+
+ # remove p80211, which will implictly kill wland.
+ $MODPROBE -r p80211
+ ok $?
+elif [ "$1" = "restart" ]; then
+ "$0" stop
+ sleep 1
+ "$0" start
+else # start
+ # This will implicitly fire off wland via hotplug.
+ start "$startwlan"
+ if ! $MODPROBE p80211; then
+ echo -n "$p80211fail"
+ ok 1
+ fi
+
+ # NOTE: We don't explicitly insmod the card driver here. The
+ # best thing to do is to specify an alias in /etc/modules.conf.
+
+ for DEVICE in $WLAN_DEVICES; do
+ $MODPROBE $DEVICE
+ # if we don't have hotplug.. do things the old-fashioned way.
+ if [ $HAS_HOTPLUG = 'n' ] ; then
+ wlan_bring_it_up $DEVICE
+ fi
+ done
+
+ # And hotplug will take care of the rest, namely device
+ # initialization and whatnot.
+
+ ok $?
+fi
diff --git a/source/network-extra/wlan-ng-fwlive/wlan-ng-0.2.8-kernel2623.diff b/source/network-extra/wlan-ng-fwlive/wlan-ng-0.2.8-kernel2623.diff
new file mode 100644
index 0000000..5e7d9a7
--- /dev/null
+++ b/source/network-extra/wlan-ng-fwlive/wlan-ng-0.2.8-kernel2623.diff
@@ -0,0 +1,193 @@
+diff -Naur linux-wlan-ng-0.2.8/CHANGES linux-wlan-ng-export/CHANGES
+--- linux-wlan-ng-0.2.8/CHANGES 2007-05-04 14:29:27.000000000 +0200
++++ linux-wlan-ng-export/CHANGES 2007-10-16 16:07:27.000000000 +0200
+@@ -41,6 +41,11 @@
+ * Intersil Corporation as part of PRISM(R) chipset product development.
+ *
+ * --------------------------------------------------------------------
++ - Support 2.6.23 kernels. (With apologies to Martin Dauskardt for a
++ misapplied patch)
++ - Support "Intersil Americas USB 802.11b WLAN DEVICE" (Peter Levart)
++ - Tweaks to support Fedora 7 (Dan Williams)
++ - Support 2.6.22 kernels
+ 0.2.8
+ - Fix up a pile of sparse warnings (Pavel Roskin)
+ - Support 2.6.20 kernels (Pavel Roskin)
+diff -Naur linux-wlan-ng-0.2.8/Configure linux-wlan-ng-export/Configure
+--- linux-wlan-ng-0.2.8/Configure 2007-05-08 00:00:22.000000000 +0200
++++ linux-wlan-ng-export/Configure 2007-10-16 16:43:56.000000000 +0200
+@@ -277,9 +277,9 @@
+ fi
+ write_bool KERN_2_6_17
+
+-if [ $VERSION_CODE -gt `version 2 6 21` ] ; then
++if [ $VERSION_CODE -gt `version 2 6 22` ] ; then
+ $ECHO "******* WARNING WARNING WARNING *******"
+- $ECHO "Kernels newer than 2.6.21.x are not supported."
++ $ECHO "Kernels newer than 2.6.23.x are not supported."
+ $ECHO "******* WARNING WARNING WARNING *******"
+ fi
+
+diff -Naur linux-wlan-ng-0.2.8/etc/udev/rules.d/40-prism2.rules linux-wlan-ng-export/etc/udev/rules.d/40-prism2.rules
+--- linux-wlan-ng-0.2.8/etc/udev/rules.d/40-prism2.rules 2006-06-26 17:03:27.000000000 +0200
++++ linux-wlan-ng-export/etc/udev/rules.d/40-prism2.rules 2007-06-20 16:53:45.000000000 +0200
+@@ -1 +1,2 @@
+-ACTION=="add",BUS=="usb",DRIVER=="prism2_usb" ,RUN+="/etc/wlan/wlan-udev.sh %k"
++#ACTION=="add",BUS=="usb",DRIVER=="prism2_usb" ,RUN+="/etc/wlan/wlan-udev.sh %k"
++KERNEL="wlan*",ACTION=="add",DRIVERS=="prism2_usb" ,RUN+="/etc/wlan/wlan-udev.sh %k"
+diff -Naur linux-wlan-ng-0.2.8/Makefile linux-wlan-ng-export/Makefile
+--- linux-wlan-ng-0.2.8/Makefile 2005-02-24 18:59:10.000000000 +0100
++++ linux-wlan-ng-export/Makefile 2007-10-16 16:43:56.000000000 +0200
+@@ -76,6 +76,8 @@
+ all: config.mk
+ set -e; for d in $(DIRS); do $(MAKE) -C $$d ; done
+
++distclean: mrproper
++
+ mrproper: clean
+ rm -f config.out
+ rm -f tags.linux tags TAGS
+diff -Naur linux-wlan-ng-0.2.8/src/include/wlan/wlan_compat.h linux-wlan-ng-export/src/include/wlan/wlan_compat.h
+--- linux-wlan-ng-0.2.8/src/include/wlan/wlan_compat.h 2007-02-28 16:44:02.000000000 +0100
++++ linux-wlan-ng-export/src/include/wlan/wlan_compat.h 2007-09-18 18:51:48.000000000 +0200
+@@ -479,6 +479,18 @@
+ #endif
+ #endif /* _LINUX_PROC_FS_H */
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
++#define skb_reset_mac_header(__a) (__a)->mac.raw = (__a)->data
++#define SKB_MAC_HEADER(__a) (__a)->mac.raw
++#else
++#define SKB_MAC_HEADER(__a) (__a)->mac_header
++#endif
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
++#define IRQF_DISABLED SA_INTERRUPT
++#define IRQF_SHARED SA_SHIRQ
++#endif
++
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
+ #ifndef INIT_TQUEUE
+ #define PREPARE_TQUEUE(_tq, _routine, _data) \
+diff -Naur linux-wlan-ng-0.2.8/src/p80211/p80211conv.c linux-wlan-ng-export/src/p80211/p80211conv.c
+--- linux-wlan-ng-0.2.8/src/p80211/p80211conv.c 2007-03-19 16:37:00.000000000 +0100
++++ linux-wlan-ng-export/src/p80211/p80211conv.c 2007-10-16 16:44:37.000000000 +0200
+@@ -497,8 +497,16 @@
+
+ }
+
++ /*
++ * Note that eth_type_trans() expects an skb w/ skb->data pointing
++ * at the MAC header, it then sets the following skb members:
++ * skb->mac_header,
++ * skb->data, and
++ * skb->pkt_type.
++ * It then _returns_ the value that _we're_ supposed to stuff in
++ * skb->protocol. This is nuts.
++ */
+ skb->protocol = eth_type_trans(skb, netdev);
+- skb->mac.raw = (unsigned char *) e_hdr; /* new MAC header */
+
+ /* jkriegl: process signal and noise as set in hfa384x_int_rx() */
+ /* jkriegl: only process signal/noise if requested by iwspy */
+diff -Naur linux-wlan-ng-0.2.8/src/p80211/p80211netdev.c linux-wlan-ng-export/src/p80211/p80211netdev.c
+--- linux-wlan-ng-0.2.8/src/p80211/p80211netdev.c 2007-03-19 16:37:00.000000000 +0100
++++ linux-wlan-ng-export/src/p80211/p80211netdev.c 2007-09-18 18:39:19.000000000 +0200
+@@ -389,7 +389,8 @@
+
+ /* set up various data fields */
+ skb->dev = dev;
+- skb->mac.raw = skb->data ;
++ skb_reset_mac_header(skb);
++
+ skb->ip_summed = CHECKSUM_NONE;
+ skb->pkt_type = PACKET_OTHERHOST;
+ skb->protocol = htons(ETH_P_80211_RAW);
+@@ -929,8 +930,8 @@
+ dev->open = p80211knetdev_open;
+ dev->stop = p80211knetdev_stop;
+
+-#ifdef CONFIG_NET_WIRELESS
+-#if ((WIRELESS_EXT < 17) && (WIRELESS_EXT < 21))
++#if defined(CONFIG_NET_WIRELESS) || defined(WIRELESS_EXT)
++#if (WIRELESS_EXT < 17)
+ dev->get_wireless_stats = p80211wext_get_wireless_stats;
+ #endif
+ #if WIRELESS_EXT > 12
+diff -Naur linux-wlan-ng-0.2.8/src/prism2/driver/hfa384x.c linux-wlan-ng-export/src/prism2/driver/hfa384x.c
+--- linux-wlan-ng-0.2.8/src/prism2/driver/hfa384x.c 2007-03-19 16:37:00.000000000 +0100
++++ linux-wlan-ng-export/src/prism2/driver/hfa384x.c 2007-06-20 16:45:49.000000000 +0200
+@@ -3645,7 +3645,7 @@
+ /* the prism2 cards don't return the FCS */
+ datap = skb_put(skb, WLAN_CRC_LEN);
+ memset (datap, 0xff, WLAN_CRC_LEN);
+- skb->mac.raw = skb->data;
++ skb_reset_mac_header(skb);
+
+ /* Attach the rxmeta, set some stuff */
+ p80211skb_rxmeta_attach(wlandev, skb);
+diff -Naur linux-wlan-ng-0.2.8/src/prism2/driver/hfa384x_usb.c linux-wlan-ng-export/src/prism2/driver/hfa384x_usb.c
+--- linux-wlan-ng-0.2.8/src/prism2/driver/hfa384x_usb.c 2007-03-19 16:37:00.000000000 +0100
++++ linux-wlan-ng-export/src/prism2/driver/hfa384x_usb.c 2007-06-20 16:45:49.000000000 +0200
+@@ -4255,7 +4255,7 @@
+ /* The prism2 series does not return the CRC */
+ memset(skb_put(skb, WLAN_CRC_LEN), 0xff, WLAN_CRC_LEN);
+
+- skb->mac.raw = skb->data;
++ skb_reset_mac_header(skb);
+
+ /* Attach the rxmeta, set some stuff */
+ p80211skb_rxmeta_attach(wlandev, skb);
+diff -Naur linux-wlan-ng-0.2.8/src/prism2/driver/prism2_pci.c linux-wlan-ng-export/src/prism2/driver/prism2_pci.c
+--- linux-wlan-ng-0.2.8/src/prism2/driver/prism2_pci.c 2007-03-19 16:37:00.000000000 +0100
++++ linux-wlan-ng-export/src/prism2/driver/prism2_pci.c 2007-10-16 16:07:27.000000000 +0200
+@@ -163,7 +163,7 @@
+ * _know_ things are alright. A test routine would help.
+ */
+ request_irq(wlandev->netdev->irq, hfa384x_interrupt,
+- SA_SHIRQ, wlandev->name, wlandev);
++ IRQF_SHARED, wlandev->name, wlandev);
+
+ wlandev->msdstate = WLAN_MSD_HWPRESENT;
+
+@@ -275,7 +275,7 @@
+ static int __init prism2pci_init(void)
+ {
+ WLAN_LOG_NOTICE("%s Loaded\n", version);
+- return pci_module_init(&prism2_pci_drv_id);
++ return pci_register_driver(&prism2_pci_drv_id);
+ };
+
+ static void __exit prism2pci_cleanup(void)
+diff -Naur linux-wlan-ng-0.2.8/src/prism2/driver/prism2_plx.c linux-wlan-ng-export/src/prism2/driver/prism2_plx.c
+--- linux-wlan-ng-0.2.8/src/prism2/driver/prism2_plx.c 2007-03-19 16:37:00.000000000 +0100
++++ linux-wlan-ng-export/src/prism2/driver/prism2_plx.c 2007-10-16 16:07:27.000000000 +0200
+@@ -272,7 +272,7 @@
+ * _know_ things are alright. A test routine would help.
+ */
+ request_irq(wlandev->netdev->irq, hfa384x_interrupt,
+- SA_SHIRQ, wlandev->name, wlandev);
++ IRQF_SHARED, wlandev->name, wlandev);
+
+ wlandev->msdstate = WLAN_MSD_HWPRESENT;
+
+@@ -420,7 +420,7 @@
+ static int __init prism2plx_init(void)
+ {
+ WLAN_LOG_NOTICE("%s Loaded\n", version);
+- return pci_module_init(&prism2_plx_drv_id);
++ return pci_register_driver(&prism2_plx_drv_id);
+ };
+
+ static void __exit prism2plx_cleanup(void)
+diff -Naur linux-wlan-ng-0.2.8/src/prism2/driver/prism2_usb.c linux-wlan-ng-export/src/prism2/driver/prism2_usb.c
+--- linux-wlan-ng-0.2.8/src/prism2/driver/prism2_usb.c 2007-03-19 16:37:00.000000000 +0100
++++ linux-wlan-ng-export/src/prism2/driver/prism2_usb.c 2007-09-18 18:35:12.000000000 +0200
+@@ -13,6 +13,7 @@
+ .driver_info = (unsigned long) name
+
+ static struct usb_device_id usb_prism_tbl[] = {
++ {PRISM_USB_DEVICE(0x0707, 0xee04, "Intersil Americas USB 802.11b WLAN DEVICE")},
+ {PRISM_USB_DEVICE(0x04bb, 0x0922, "IOData AirPort WN-B11/USBS")},
+ {PRISM_USB_DEVICE(0x07aa, 0x0012, "Corega Wireless LAN USB Stick-11")},
+ {PRISM_USB_DEVICE(0x09aa, 0x3642, "Prism2.x 11Mbps WLAN USB Adapter")},
More information about the Frugalware-git
mailing list