diff options
author | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
---|---|---|
committer | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
commit | 709c4d66e0b107ca606941b988bad717c0b45d9b (patch) | |
tree | 37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/wlan-ng | |
parent | fa6cd5a3b993f16c27de4ff82b42684516d433ba (diff) |
rename packages/ to recipes/ per earlier agreement
See links below for more details:
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816
Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Acked-by: Mike Westerhof <mwester@dls.net>
Acked-by: Philip Balister <philip@balister.org>
Acked-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Marcin Juszkiewicz <hrw@openembedded.org>
Acked-by: Koen Kooi <koen@openembedded.org>
Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/wlan-ng')
36 files changed, 1469 insertions, 0 deletions
diff --git a/recipes/wlan-ng/files/might-sleep.patch b/recipes/wlan-ng/files/might-sleep.patch new file mode 100644 index 0000000000..a156229331 --- /dev/null +++ b/recipes/wlan-ng/files/might-sleep.patch @@ -0,0 +1,16 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- linux-wlan-ng-0.2.2/src/include/wlan/wlan_compat.h~might_sleep ++++ linux-wlan-ng-0.2.2/src/include/wlan/wlan_compat.h +@@ -584,7 +584,7 @@ + #endif + + #ifndef might_sleep +-#define might_sleep(a) do { } while (0) ++#define might_sleep() do { } while (0) + #endif + + /* Apparently 2.4.2 ethtool is quite different, maybe newer too? */ diff --git a/recipes/wlan-ng/files/more-compat.patch b/recipes/wlan-ng/files/more-compat.patch new file mode 100644 index 0000000000..4ce8173f93 --- /dev/null +++ b/recipes/wlan-ng/files/more-compat.patch @@ -0,0 +1,7 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- linux-wlan-ng-0.2.2/wlan_compat.h ++++ /dev/null diff --git a/recipes/wlan-ng/files/msleep-vs-mdelay.patch b/recipes/wlan-ng/files/msleep-vs-mdelay.patch new file mode 100644 index 0000000000..d98116b07c --- /dev/null +++ b/recipes/wlan-ng/files/msleep-vs-mdelay.patch @@ -0,0 +1,16 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- linux-wlan-ng-0.2.2/src/prism2/driver/prism2_usb.c~msleep-vs-mdelay ++++ linux-wlan-ng-0.2.2/src/prism2/driver/prism2_usb.c +@@ -279,7 +279,7 @@ + * is "wake up", so that's easy. + * (I'd like a better way to do this, really.) + */ +- msleep(100); ++ mdelay(100); + + /* Now delete the CTLXs, because no-one else can now. */ + list_for_each_safe(entry, temp, &cleanlist) { diff --git a/recipes/wlan-ng/files/no-compat.patch b/recipes/wlan-ng/files/no-compat.patch new file mode 100644 index 0000000000..4f59f0fa5d --- /dev/null +++ b/recipes/wlan-ng/files/no-compat.patch @@ -0,0 +1,47 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- linux-wlan-ng-0.2.1pre21/src/include/wlan/wlan_compat.h~no-compat ++++ linux-wlan-ng-0.2.1pre21/src/include/wlan/wlan_compat.h +@@ -351,14 +351,14 @@ + + #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20)) + #ifdef _LINUX_LIST_H +- ++/* + static inline void list_move_tail(struct list_head *list, + struct list_head *head) + { + __list_del(list->prev, list->next); + list_add_tail(list, head); + } +- ++*/ + static inline void __list_splice(struct list_head *list, + struct list_head *head) + { +@@ -372,13 +372,13 @@ + last->next = at; + at->prev = last; + } +- ++/* + static inline void list_move(struct list_head *list, struct list_head *head) + { + __list_del(list->prev, list->next); + list_add(list, head); + } +- ++*/ + static inline void list_splice_init(struct list_head *list, + struct list_head *head) + { +@@ -388,7 +388,6 @@ + } + } + +- + #endif // LIST_H + #endif diff --git a/recipes/wlan-ng/files/pcmciasrc.patch b/recipes/wlan-ng/files/pcmciasrc.patch new file mode 100644 index 0000000000..ea76baa98b --- /dev/null +++ b/recipes/wlan-ng/files/pcmciasrc.patch @@ -0,0 +1,45 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- linux-wlan-ng-0.2.2/Configure~pcmciasrc ++++ linux-wlan-ng-0.2.2/Configure +@@ -358,37 +358,6 @@ + # kernel PCMCIA. + + if [ $WLAN_KERN_PCMCIA != "y" ] ; then +- if [ ! "$PCMCIA_SRC" ] ; then +- if [ -f /sbin/cardctl ] ; then +- PCMCIA_SRC=`/sbin/cardctl -V 2>&1 | sed -e 's/cardctl version //'` +- PCMCIA_SRC=/usr/src/pcmcia-cs-$PCMCIA_SRC +- fi +- fi +- ask_str "pcmcia-cs source dir" PCMCIA_SRC +- +- if [ ! -f $PCMCIA_SRC/Makefile ] ; then +- $ECHO "pcmcia-cs source tree $PCMCIA_SRC is incomplete or missing!" +- $ECHO "The wlan driver for pcmcia cannot be built without " +- $ECHO "the pcmcia-cs source tree present and configured." +- fail +- fi +- if [ ! -f $PCMCIA_SRC/include/pcmcia/config.h ] ; then +- $ECHO "The pcmcia-cs source tree does not appear to be configured." +- $ECHO "The wlan driver for pcmcia cannot be built without "\ +- $ECHO "the pcmcia-cs source tree present and configured." +- fail +- fi +- $ECHO "" +- +- # Now we need to generate the module options flags. +- # It's only relevant if modversions is turned on. +- grep CONFIG_MODVERSIONS=y < $PCMCIA_SRC/config.mk > /dev/null +- if [ $? = 0 ] ; then +- PCMCIA_MODFLAGS="-DMODULE -DMODVERSIONS -include $PCMCIA_SRC/include/linux/modversions.h" +- else +- PCMCIA_MODFLAGS="-DMODULE" +- fi +- + # new versions of pcmcia-cs don't generate their own modversion.h + # if they don't have it, use the kernel module flags instead. + if [ ! -f $PCMCIA_SRC/include/linux/modversions.h ] ; then diff --git a/recipes/wlan-ng/files/post-down b/recipes/wlan-ng/files/post-down new file mode 100755 index 0000000000..bf4ba0ae60 --- /dev/null +++ b/recipes/wlan-ng/files/post-down @@ -0,0 +1,31 @@ +#!/bin/sh +# +# This script takes care of bringing down wlan-ng devices. +# It is run by ifdown. + +WLANCTL=/sbin/wlanctl-ng + +if [ ! -x $WLANCTL ] ; then + exit 0 +fi + +case $IFACE in +wlan?) + # Reset device to make sure it is not trying to generate + # interrupts. + result=`$WLANCTL $IFACE lnxreq_ifstate ifstate=disable` + + # Remove modules. Of course, for all I know they are still in use + # by another interface, in which case these rmmods will fail. Also, + # depending on how modutils is set up, different prism2 modules + # might be loaded. + ( + rmmod prism2_pci || rmmod prism2_cs || rmmod prism2_usb || \ + rmmod prism2_plx || true + rmmod p80211 || true + ) 2>/dev/null + + # Remove lock file, just in case. + rm -f /var/lock/wlan-$IFACE.lock +;; +esac diff --git a/recipes/wlan-ng/files/pre-up b/recipes/wlan-ng/files/pre-up new file mode 100755 index 0000000000..0ae410edfa --- /dev/null +++ b/recipes/wlan-ng/files/pre-up @@ -0,0 +1,227 @@ +#!/bin/sh + +case "$METHOD" in loopback) exit 0 ;; esac + +# +# This script takes care of bringing up wlan-ng device. +# It is run by ifup, and gets information from the +# /etc/network/interfaces file. It is derived from the +# init.d/wlan script in the wlan-ng distribution + +WLANCTL=/sbin/wlanctl-ng +PRIV_GENERATOR=/sbin/nwepgen + +if [ ! -x $WLANCTL ] ; then + exit 0 +fi + +# Detect and act only on linux-wlan-ng interfaces +if [ "$IF_WIRELESS_TYPE" != "wlan-ng" ]; then + exit 0 +fi + +# Create a lock file; remove on script exit. This is a fairly crummy lock, +# but all it needs to do is prevent hotplug from calling this script, +# which may happen when the module is loaded below. Since it should only +# happen when the module is loaded, I don't need a proper lock. +if [ -e /var/lock/wlan-$IFACE.lock ]; then + exit 0 +fi +touch /var/lock/wlan-$IFACE.lock +cleanup () { + rm -f /var/lock/wlan-$IFACE.lock +} +trap cleanup 0 + +if [ -z "$IF_WIRELESS_MODE" ]; then + IF_WIRELESS_MODE="ad_hoc" +fi + +if [ -z "$IF_WLAN_NG_HOSTWEP" ]; then + IF_WLAN_NG_HOSTWEP=false +fi + +if [ -z "$IF_WLAN_NG_DEFAULT_KEY_ID" ]; then + IF_WLAN_NG_DEFAULT_KEY_ID=0 +fi + +if [ -z "$IF_WLAN_NG_EXCLUDE_UNENCRYPTED" ]; then + IF_WLAN_NG_EXCLUDE_UNENCRYPTED=true +fi + +if [ -z "$IF_WLAN_NG_PRIV_KEY128" ]; then + IF_WLAN_NG_PRIV_KEY128=false +fi + +if [ -z "$IF_WLAN_NG_BCINT" ]; then + IF_WLAN_NG_BCINT=100 +fi + +if [ -z "$IF_WLAN_NG_BASICRATES" ]; then + IF_WLAN_NG_BASICRATES="2 4" +fi + +if [ -z "$IF_WLAN_NG_OPRATES" ]; then + IF_WLAN_NG_OPRATES="2 4 11 22" +fi + +if [ -z "$IF_WLAN_NG_AUTHTYPE" ]; then + IF_WLAN_NG_AUTHTYPE="opensystem" +fi + +if [ -z "$IF_WIRELESS_CHANNEL" ]; then + IF_WIRELESS_CHANNEL=1 +fi + +if ! modprobe p80211; then + echo "Failed to load p80211.o." >&2 + exit 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. +# Then, the first time we call wlanctl with the named device, +# the kernel module autoload stuff will take over. +# But, if you prefer, you could modprobe it here. + + +# Bring the card up into an operable state. +result=`$WLANCTL $IFACE lnxreq_ifstate ifstate=enable` +if [ $? = 0 ] ; then + eval $result + if [ $resultcode != "success" ]; then + echo "Failed to enable the device, resultcode=" $resultcode "." >&2 + exit 1 + fi +else + echo "Failed to enable the device, exitcode=" $? "." >&2 + exit 1 +fi + +# Set user-specified MIB items. +for i in $IF_WLAN_NG_USER_MIBS; do + result=`$WLANCTL $IFACE dot11req_mibset "mibattribute=$i"` + + if [ $? = 0 ] ; then + eval $result + if [ $resultcode != "success" ] ; then + echo "Failed to set user MIB $i." >&2 + exit 1 + fi + else + echo "Failed to set user MIB $i." >&2 + exit 1 + fi +done + +if [ "$IF_WIRELESS_ENC" = "on" ]; then + # Set up WEP. + result=`$WLANCTL $IFACE dot11req_mibget mibattribute=dot11PrivacyOptionImplemented` + if [ $? = 0 ] ; then + eval $result + eval $mibattribute + else + echo "mibget failed." >&2 + exit 1 + fi + + if [ "$dot11PrivacyOptionImplemented" != "true" ]; then + echo "Cannot enable privacy, dot11PrivacyOptionImplemented=$dot11PrivacyOptionImplemented." >&2 + exit 1 + fi + + $WLANCTL $IFACE lnxreq_hostwep decrypt=$IF_WLAN_NG_HOSTWEP encrypt=$IF_WLAN_NG_HOSTWEP >/dev/null + + $WLANCTL $IFACE dot11req_mibset \ + mibattribute=dot11WEPDefaultKeyID=$IF_WLAN_NG_DEFAULT_KEY_ID \ + >/dev/null + + $WLANCTL $IFACE dot11req_mibset \ + mibattribute=dot11ExcludeUnencrypted=$IF_WLAN_NG_EXCLUDE_UNENCRYPTED \ + >/dev/null + + $WLANCTL $IFACE dot11req_mibset \ + mibattribute=dot11PrivacyInvoked=true >/dev/null + + if [ -e "$IF_WLAN_NG_KEYFILE" ]; then + IF_WLAN_NG_PRIV_GENSTR=`cat $IF_WLAN_NG_KEYFILE` + fi + if [ ! -z "$IF_WLAN_NG_PRIV_GENSTR" ]; then + if [ "$IF_WLAN_NG_PRIV_KEY128" = "false" ]; then + keys=`$PRIV_GENERATOR "$IF_WLAN_NG_PRIV_GENSTR" 5` + else + keys=`$PRIV_GENERATOR "$IF_WLAN_NG_PRIV_GENSTR" 13` + fi + + knum=0 + for i in $keys; do + $WLANCTL $IFACE dot11req_mibset \ + mibattribute=dot11WEPDefaultKey$knum=$i \ + >/dev/null + knum=$(expr $knum + 1) + done + else + $WLANCTL $IFACE dot11req_mibset \ + mibattribute=dot11WEPDefaultKey0=$IF_WLAN_NG_KEY0 \ + >/dev/null + $WLANCTL $IFACE dot11req_mibset \ + mibattribute=dot11WEPDefaultKey1=$IF_WLAN_NG_KEY1 \ + >/dev/null + $WLANCTL $IFACE dot11req_mibset \ + mibattribute=dot11WEPDefaultKey2=$IF_WLAN_NG_KEY2 \ + >/dev/null + $WLANCTL $IFACE dot11req_mibset \ + mibattribute=dot11WEPDefaultKey3=$IF_WLAN_NG_KEY3 \ + >/dev/null + fi +fi + +# MAC startup +if [ "$IF_WIRELESS_MODE" = "ad_hoc" ] || + [ "$IF_WIRELESS_MODE" = "ad-hoc" ]; then + startcmd="$WLANCTL $IFACE dot11req_start " + startcmd="$startcmd ssid=$IF_WIRELESS_ESSID" + startcmd="$startcmd bsstype=independent" + startcmd="$startcmd beaconperiod=$IF_WLAN_NG_BCINT" + startcmd="$startcmd dtimperiod=3" + startcmd="$startcmd cfpollable=false" + startcmd="$startcmd cfpollreq=false" + startcmd="$startcmd cfpperiod=3" + startcmd="$startcmd cfpmaxduration=100" + startcmd="$startcmd probedelay=100" + startcmd="$startcmd dschannel=$IF_WIRELESS_CHANNEL" + j=1 + for i in $IF_WLAN_NG_BASICRATES; do + startcmd="$startcmd basicrate$j=$i" + j=$(expr $j + 1) + done + j=1 + for i in $IF_WLAN_NG_OPRATES; do + startcmd="$startcmd operationalrate$j=$i" + j=$(expr $j + 1) + done + + results=`$startcmd` + if [ $? = 0 ]; then + eval $results + if [ $resultcode != "success" ] ; then + echo "IBSS not started, resultcode=$resultcode" >&2 + exit 1 + fi + else + echo FAILED: $startcmd >&2 + exit 1 + fi +else + # Infrastructure mode. + results=`$WLANCTL $IFACE lnxreq_autojoin \ + "ssid=$IF_WIRELESS_ESSID" \ + authtype=$IF_WLAN_NG_AUTHTYPE | sed 's/\([^=]*\)=\(.*\)/\1="\2"/'` + if [ $? = 0 ]; then + eval $results + if [ ${resultcode:-"failure"} != "success" ]; then + echo 'error: Autojoin indicated failure!' >&2 + exit 1 + fi + fi +fi diff --git a/recipes/wlan-ng/files/resume b/recipes/wlan-ng/files/resume new file mode 100755 index 0000000000..f875939da6 --- /dev/null +++ b/recipes/wlan-ng/files/resume @@ -0,0 +1,22 @@ +#!/bin/sh +# This script is run on resume to force a down and up of any linux-wlanng +# iterfaces. Otherwise they could get into a weird state. +IFACES=$(ifconfig | grep -B 1 ^wlan | cut -d ' ' -f 1) +for iface in $IFACES; do + echo down $ifcase >>/tmp/log + ifdown $iface || ifconfig $iface down +done + +rmmod prism2_pci 2>/dev/null +rmmod prism2_usb 2>/dev/null +rmmod prism2_cs 2>/dev/null +rmmod prism2_plx 2>/dev/null +rmmod p80211 2>/dev/null + +# There is a race here for some reason. +sleep 2 + +for iface in $IFACES; do + ifup $iface +done + diff --git a/recipes/wlan-ng/files/scripts-makefile-hostcc.patch b/recipes/wlan-ng/files/scripts-makefile-hostcc.patch new file mode 100644 index 0000000000..1746b8a359 --- /dev/null +++ b/recipes/wlan-ng/files/scripts-makefile-hostcc.patch @@ -0,0 +1,16 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- linux-wlan-ng-0.2.2/scripts/Makefile~scripts-makefile-hostcc ++++ linux-wlan-ng-0.2.2/scripts/Makefile +@@ -24,7 +24,7 @@ + exit 1;\ + fi + +- $(CC) -I$(KERNEL_SOURCE)/include get_version.c -o get_version ++ $(BUILD_CC) -I$(KERNEL_SOURCE)/include get_version.c -o get_version + + get_options: + $(MAKE) -f $(CURR_DIR)/Makefile.get_options -C $(KERNEL_SOURCE) get_version_target diff --git a/recipes/wlan-ng/files/usbctl b/recipes/wlan-ng/files/usbctl Binary files differnew file mode 100755 index 0000000000..5a34b03c39 --- /dev/null +++ b/recipes/wlan-ng/files/usbctl diff --git a/recipes/wlan-ng/files/wlan-ng.modutils b/recipes/wlan-ng/files/wlan-ng.modutils new file mode 100644 index 0000000000..010e20d375 --- /dev/null +++ b/recipes/wlan-ng/files/wlan-ng.modutils @@ -0,0 +1 @@ +alias wlan0 prism2_usb diff --git a/recipes/wlan-ng/files/wlan.agent b/recipes/wlan-ng/files/wlan.agent new file mode 100644 index 0000000000..945d646984 --- /dev/null +++ b/recipes/wlan-ng/files/wlan.agent @@ -0,0 +1,107 @@ +#!/bin/sh +# +# p80211/wlan hotplug policy agent. +# +# wlan hotplug params include: +# +# ACTION=%s [register|remove|shutdown|startup|suspend|resume] +# INTERFACE=%s +# NSDNAME=%s +# + +cd /etc/hotplug +# must have ./ here or busybox shell barfs +. ./hotplug.functions + +#DEBUG=yes export DEBUG + +if [ "$INTERFACE" = "" ]; then + mesg Bad WLAN invocation: \$INTERFACE is not set + exit 1 +fi + +if [ "$NSDNAME" = "" ]; then + mesg Bad WLAN invocation: \$NSDNAME is not set + exit 1 +fi + +debug_mesg WLAN $ACTION on $INTERFACE \($NSDNAME\) + +if [ "$NSDNAME" = "prism2_cs" ] ; then + mesg "WLAN Hotplug bypassed for pcmcia" + exit 0 +fi + +# load up the shared scripts +if [ ! -f /etc/wlan/shared ] ; then + mesg "/etc/wlan/shared not present, aborting" + exit 1 +fi + +ECHO=mesg +. /etc/wlan/shared + +case $ACTION in +'register'|'resume') + eval 'WLAN_ENABLE=$ENABLE_'$INTERFACE + if ! is_true $WLAN_ENABLE ; then + mesg "WLAN $ACTION - interface $INTERFACE not enabled, aborting" + exit 1 + fi + debug_mesg WLAN $INTERFACE registered. + wlan_bring_it_up $INTERFACE + if [ $? = 0 ] ; then + mesg WLAN $INTERFACE brought up successfully. + if [ -x /etc/wlan/network ] ; then + mesg "WLAN bringing up layer 3+ with /etc/wlan/network" + /etc/wlan/network start $INTERFACE + elif [ -x /etc/wlan/pre-ifup ] ; then + # pre-ifup is presumed to call ifup if it + # wants to...it may choose to skip it. + mesg "WLAN bringing up layer 3+ with /etc/wlan/pre-ifup" + /etc/wlan/pre-ifup $INTERFACE + else + mesg "WLAN bringing up layer 3+ with /sbin/ifup" + /sbin/ifup $INTERFACE + fi + else + mesg WLAN Could not bring up $INTERFACE + exit 1 + fi + # eventually invoke net.agent on $INTERFACE w/ REGISTER +;; +'remove'|'suspend') + debug_mesg WLAN $INTERFACE removed. + eval 'WLAN_ENABLE=$ENABLE_'$INTERFACE + if ! is_true $WLAN_ENABLE ; then + mesg "WLAN $ACTION - interface $INTERFACE not enabled, aborting" + exit 1 + fi + if [ -x /etc/wlan/network ] ; then + mesg "WLAN taking down layer 3+ with /etc/wlan/network" + /etc/wlan/network stop $INTERFACE + elif [ -x /etc/wlan/post-ifdown ] ; then + # post-ifdown is presumed to call ifdown if it + # wants to...it may choose to skip it. + mesg "WLAN taking down layer 3+ with /etc/wlan/post-ifdown" + /etc/wlan/post-ifdown $INTERFACE + else + mesg "WLAN taking down layer 3+ with /sbin/ifdown" + /sbin/ifdown $INTERFACE + fi + wlan_disable $INTERFACE +;; +'startup') + # kick off wland. + debug_mesg WLAN p80211 starting! + start_wland +;; +'shutdown') + debug_mesg WLAN p80211 shutting down! + stop_wland +;; +*) + debug_mesg WLAN $ACTION event not supported + exit 1 ;; + +esac diff --git a/recipes/wlan-ng/wlan-ng-modules-0.2.7/2.6.22-fixes.patch b/recipes/wlan-ng/wlan-ng-modules-0.2.7/2.6.22-fixes.patch new file mode 100644 index 0000000000..affc6567dc --- /dev/null +++ b/recipes/wlan-ng/wlan-ng-modules-0.2.7/2.6.22-fixes.patch @@ -0,0 +1,221 @@ +Index: linux-wlan-ng-0.2.7/src/prism2/driver/prism2sta.c +=================================================================== +--- linux-wlan-ng-0.2.7.orig/src/prism2/driver/prism2sta.c 2007-11-13 15:09:52.686428934 +0300 ++++ linux-wlan-ng-0.2.7/src/prism2/driver/prism2sta.c 2007-11-13 16:44:19.386567678 +0300 +@@ -1438,9 +1438,15 @@ + return; + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20) ++void prism2sta_processing_defer(struct work_struct *work) ++{ ++ hfa384x_t *hw = container_of(work, hfa384x_t, link_bh); ++#else + void prism2sta_processing_defer(void *data) + { + hfa384x_t *hw = (hfa384x_t *) data; ++#endif + wlandevice_t *wlandev = hw->wlandev; + hfa384x_bytestr32_t ssid; + int result; +@@ -1540,7 +1546,11 @@ + WLAN_MACMODE_IBSS_STA : WLAN_MACMODE_ESS_STA; + + /* Get the ball rolling on the comms quality stuff */ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20) ++ prism2sta_commsqual_defer(&hw->commsqual_bh); ++#else + prism2sta_commsqual_defer(hw); ++#endif + } + break; + +@@ -2413,9 +2423,15 @@ + } + #endif + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20) ++void prism2sta_commsqual_defer(struct work_struct *work) ++{ ++ hfa384x_t *hw = container_of(work, hfa384x_t, commsqual_bh); ++#else + void prism2sta_commsqual_defer(void *data) + { + hfa384x_t *hw = (hfa384x_t *) data; ++#endif + wlandevice_t *wlandev = hw->wlandev; + hfa384x_bytestr32_t ssid; + int result = 0; +Index: linux-wlan-ng-0.2.7/src/p80211/p80211conv.c +=================================================================== +--- linux-wlan-ng-0.2.7.orig/src/p80211/p80211conv.c 2007-11-13 14:33:27.646440199 +0300 ++++ linux-wlan-ng-0.2.7/src/p80211/p80211conv.c 2007-11-13 14:56:45.678436613 +0300 +@@ -497,7 +497,11 @@ + } + + skb->protocol = eth_type_trans(skb, netdev); ++#if ( LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22) ) + skb->mac.raw = (unsigned char *) e_hdr; /* new MAC header */ ++#else ++ skb->mac_header = (unsigned char *) e_hdr; ++#endif + + /* jkriegl: process signal and noise as set in hfa384x_int_rx() */ + /* jkriegl: only process signal/noise if requested by iwspy */ +Index: linux-wlan-ng-0.2.7/src/p80211/p80211netdev.c +=================================================================== +--- linux-wlan-ng-0.2.7.orig/src/p80211/p80211netdev.c 2007-11-13 14:56:08.098439975 +0300 ++++ linux-wlan-ng-0.2.7/src/p80211/p80211netdev.c 2007-11-13 14:57:22.326437672 +0300 +@@ -389,7 +389,11 @@ + + /* set up various data fields */ + skb->dev = dev; ++#if ( LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22) ) + skb->mac.raw = skb->data ; ++#else ++ skb_reset_mac_header(skb); ++#endif + skb->ip_summed = CHECKSUM_NONE; + skb->pkt_type = PACKET_OTHERHOST; + skb->protocol = htons(ETH_P_80211_RAW); +Index: linux-wlan-ng-0.2.7/src/prism2/driver/hfa384x_usb.c +=================================================================== +--- linux-wlan-ng-0.2.7.orig/src/prism2/driver/hfa384x_usb.c 2007-11-13 14:58:29.000000000 +0300 ++++ linux-wlan-ng-0.2.7/src/prism2/driver/hfa384x_usb.c 2007-11-13 16:41:35.914446535 +0300 +@@ -128,6 +128,9 @@ + #include <linux/netdevice.h> + #include <linux/timer.h> + #include <asm/io.h> ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)) ++#include <linux/workqueue.h> ++#endif + #include <linux/delay.h> + #include <asm/byteorder.h> + #include <asm/bitops.h> +@@ -246,8 +249,13 @@ + wlandevice_t *wlandev, + hfa384x_usb_rxfrm_t *rxfrm); + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20) ++static void ++hfa384x_usb_defer(struct work_struct *work); ++#else + static void + hfa384x_usb_defer(void *hw); ++#endif + + static int + submit_rx_urb(hfa384x_t *hw, int flags); +@@ -257,7 +265,7 @@ + + /*---------------------------------------------------*/ + /* Callbacks */ +-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) ++#if ( (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) || (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) ) + static void + hfa384x_usbout_callback(struct urb *urb); + static void +@@ -578,10 +586,17 @@ + * Call context: + * process (by design) + ----------------------------------------------------------------*/ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20) + static void +-hfa384x_usb_defer(void *data) ++hfa384x_usb_defer(struct work_struct *work) ++{ ++ hfa384x_t *hw = container_of(work, hfa384x_t, usb_work); ++#else ++static void ++hfa384x_usb_defer(void *hw) + { + hfa384x_t *hw = data; ++#endif + struct net_device *netdev = hw->wlandev->netdev; + + DBFENTER; +@@ -711,8 +726,13 @@ + tasklet_init(&hw->completion_bh, + hfa384x_usbctlx_completion_task, + (unsigned long)hw); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20) ++ INIT_WORK(&hw->link_bh, prism2sta_processing_defer); ++ INIT_WORK(&hw->usb_work, hfa384x_usb_defer); ++#else + INIT_WORK(&hw->link_bh, prism2sta_processing_defer, hw); + INIT_WORK(&hw->usb_work, hfa384x_usb_defer, hw); ++#endif + + init_timer(&hw->throttle); + hw->throttle.function = hfa384x_usb_throttlefn; +@@ -733,7 +753,11 @@ + hw->link_status = HFA384x_LINK_NOTCONNECTED; + hw->state = HFA384x_STATE_INIT; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)) ++ INIT_WORK(&hw->commsqual_bh, prism2sta_commsqual_defer); ++#else + INIT_WORK(&hw->commsqual_bh, prism2sta_commsqual_defer, hw); ++#endif + init_timer(&hw->commsqual_timer); + hw->commsqual_timer.data = (unsigned long) hw; + hw->commsqual_timer.function = prism2sta_commsqual_timer; +@@ -3847,7 +3871,7 @@ + * Call context: + * interrupt + ----------------------------------------------------------------*/ +-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) ++#if ( (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) || (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) ) + void hfa384x_usbin_callback(struct urb *urb) + #else + void hfa384x_usbin_callback(struct urb *urb, struct pt_regs *regs) +@@ -4253,7 +4277,11 @@ + /* The prism2 series does not return the CRC */ + memset(skb_put(skb, WLAN_CRC_LEN), 0xff, WLAN_CRC_LEN); + ++#if ( LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22) ) + skb->mac.raw = skb->data; ++#else ++ skb_reset_mac_header(skb); ++#endif + + /* Attach the rxmeta, set some stuff */ + p80211skb_rxmeta_attach(wlandev, skb); +@@ -4506,7 +4534,7 @@ + * Call context: + * interrupt + ----------------------------------------------------------------*/ +-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) ++#if ( (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) || (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) ) + void hfa384x_usbout_callback(struct urb *urb) + #else + void hfa384x_usbout_callback(struct urb *urb, struct pt_regs *regs) +@@ -4587,7 +4615,7 @@ + * Call context: + * interrupt + ----------------------------------------------------------------*/ +-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) ++#if ( (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) || (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)) ) + void hfa384x_ctlxout_callback(struct urb *urb) + #else + void hfa384x_ctlxout_callback(struct urb *urb, struct pt_regs *regs) +Index: linux-wlan-ng-0.2.7/src/prism2/include/prism2/prism2mgmt.h +=================================================================== +--- linux-wlan-ng-0.2.7.orig/src/prism2/include/prism2/prism2mgmt.h 2007-11-13 15:08:28.000000000 +0300 ++++ linux-wlan-ng-0.2.7/src/prism2/include/prism2/prism2mgmt.h 2007-11-13 15:09:37.469456438 +0300 +@@ -168,9 +168,14 @@ + UINT8 *prism2buf, p80211pstrd_t *pstr, hfa384x_t *priv ); + int prism2mgmt_get_grpaddr_index( UINT32 did ); + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20) ++void prism2sta_processing_defer(struct work_struct *work); ++void prism2sta_commsqual_defer(struct work_struct *work); ++#else + void prism2sta_processing_defer(void *data); +- + void prism2sta_commsqual_defer(void *data); ++#endif ++ + void prism2sta_commsqual_timer(unsigned long data); + + /*=============================================================*/ diff --git a/recipes/wlan-ng/wlan-ng-modules-0.2.7/only-the-modules.patch b/recipes/wlan-ng/wlan-ng-modules-0.2.7/only-the-modules.patch new file mode 100644 index 0000000000..abb3b137da --- /dev/null +++ b/recipes/wlan-ng/wlan-ng-modules-0.2.7/only-the-modules.patch @@ -0,0 +1,26 @@ +Index: trunk/src/Makefile +=================================================================== +--- trunk.orig/src/Makefile 2006-08-23 12:50:56.000000000 +0200 ++++ trunk/src/Makefile 2006-08-23 12:52:45.000000000 +0200 +@@ -44,7 +44,7 @@ + + -include ../config.mk + +-DIRS=mkmeta shared wlanctl nwepgen wlancfg p80211 prism2 ++DIRS=mkmeta shared p80211 prism2 + + ifneq ($(wildcard *.addon),) + DIRS+=`cat *.addon` +Index: trunk/src/prism2/Makefile +=================================================================== +--- trunk.orig/src/prism2/Makefile 2006-08-23 12:50:55.000000000 +0200 ++++ trunk/src/prism2/Makefile 2006-08-23 12:52:09.000000000 +0200 +@@ -44,7 +44,7 @@ + + -include ../../config.mk + +-DIRS=driver ridlist download ++DIRS=driver ridlist + + ifneq ($(wildcard *.addon),) + DIRS+=`cat *.addon` diff --git a/recipes/wlan-ng/wlan-ng-modules-0.2.8+svnr1859/config.in b/recipes/wlan-ng/wlan-ng-modules-0.2.8+svnr1859/config.in new file mode 100644 index 0000000000..a2bc086629 --- /dev/null +++ b/recipes/wlan-ng/wlan-ng-modules-0.2.8+svnr1859/config.in @@ -0,0 +1,21 @@ +WLAN_VERSION=0 +WLAN_PATCHLEVEL=2 +WLAN_SUBLEVEL=8 +WLAN_EXTRAVERSION=svn20071030 +#LINUX_SRC=$(KERNEL_SOURCE) +PCMCIA_SRC= +PREFIX= +INST_EXEDIR=/sbin +#TARGET_ROOT_ON_HOST= +#RC_DIR=/etc/init.d +PCMCIA_DIR=/etc/pcmcia +SYSV_INIT=y +INSTALL_DEPMOD= +WLAN_DEBUG=n +CROSS_COMPILE_ENABLED=n +CROSS_COMPILE= +HOST_COMPILE= +PRISM2_PLX=n +PRISM2_PCMCIA=n +PRISM2_PCI=n +PRISM2_USB=y diff --git a/recipes/wlan-ng/wlan-ng-modules-0.2.8+svnr1859/only-the-modules.patch b/recipes/wlan-ng/wlan-ng-modules-0.2.8+svnr1859/only-the-modules.patch new file mode 100644 index 0000000000..abb3b137da --- /dev/null +++ b/recipes/wlan-ng/wlan-ng-modules-0.2.8+svnr1859/only-the-modules.patch @@ -0,0 +1,26 @@ +Index: trunk/src/Makefile +=================================================================== +--- trunk.orig/src/Makefile 2006-08-23 12:50:56.000000000 +0200 ++++ trunk/src/Makefile 2006-08-23 12:52:45.000000000 +0200 +@@ -44,7 +44,7 @@ + + -include ../config.mk + +-DIRS=mkmeta shared wlanctl nwepgen wlancfg p80211 prism2 ++DIRS=mkmeta shared p80211 prism2 + + ifneq ($(wildcard *.addon),) + DIRS+=`cat *.addon` +Index: trunk/src/prism2/Makefile +=================================================================== +--- trunk.orig/src/prism2/Makefile 2006-08-23 12:50:55.000000000 +0200 ++++ trunk/src/prism2/Makefile 2006-08-23 12:52:09.000000000 +0200 +@@ -44,7 +44,7 @@ + + -include ../../config.mk + +-DIRS=driver ridlist download ++DIRS=driver ridlist + + ifneq ($(wildcard *.addon),) + DIRS+=`cat *.addon` diff --git a/recipes/wlan-ng/wlan-ng-modules.inc b/recipes/wlan-ng/wlan-ng-modules.inc new file mode 100644 index 0000000000..585c33919c --- /dev/null +++ b/recipes/wlan-ng/wlan-ng-modules.inc @@ -0,0 +1,77 @@ +# FIXME, consider using kernel staging directory instead of KERNEL_SOURCE which is +# located in the work directory. see module.bbclass + +DESCRIPTION = "linux-wlan-ng (prism2.x, prism3, pcmcia, pci, usb) driver for 11Mbps wireless lan cards" +HOMEPAGE = "http://www.linux-wlan.org" +SECTION = "kernel/modules" +DEPENDS = "virtual/kernel" +LICENSE = "GPL" + +SRC_URI = "file://no-compat.patch;patch=1 \ + file://msleep-vs-mdelay.patch;patch=1 \ + file://might-sleep.patch;patch=1 \ + file://only-the-modules.patch;patch=1 \ +# file://module_param_array.patch;patch=1 \ + file://scripts-makefile-hostcc.patch;patch=1 \ + file://pcmciasrc.patch;patch=1 \ + file://config.in" + +inherit module + +PARALLEL_MAKE = "" +EXTRA_OEMAKE = "CC="${KERNEL_CC}" LD=${KERNEL_LD} PARALLEL_MAKE=''" + +do_configure() { + install -m 0655 ${WORKDIR}/config.in ${S}/config.in + oe_runmake LINUX_SRC=${KERNEL_SOURCE} auto_config + +# if grep CONFIG_PCMCIA=[ym] ${STAGING_KERNEL_DIR}/kernel-config; then +# echo "PRISM2_PCMCIA=y" >> config.mk +# echo "WLAN_KERN_PCMCIA=y" >> config.mk +# fi + echo "TARGET_ROOT_ON_HOST=${D}/" >> config.mk + echo "TARGET_MODDIR=${D}/lib/modules/${KERNEL_VERSION}/wlan-ng" >> config.mk + echo "CC=${KERNEL_CC}" >> config.mk + echo "LD=${KERNEL_LD}" >> config.mk + echo "LDFLAGS=" >> config.mk + + # Listen closely... sssshhh... can you hear the wlan-ng build system suck? + rm -f ${KERNEL_SOURCE}/../config.mk + rm -f ${KERNEL_SOURCE}/../../config.mk + ln -sf ${S}/config.mk ${KERNEL_SOURCE}/.. + ln -sf ${S}/config.mk ${KERNEL_SOURCE}/../.. + install -m 0655 config.mk src/prism2/config.mk + install -d src/prism2/driver/include + ln -sf ${S}/src/include/wlan src/prism2/driver/include/wlan + ln -sf ${S}/src/prism2/include/prism2 src/prism2/driver/include/prism2 +} + +do_compile() { + oe_runmake -C src all +} + +do_install() { + oe_runmake install DESTDIR=${D} + + # Listen closely... sssshhh... can you hear the wlan-ng build system suck? + rm -f ${KERNEL_SOURCE}/../config.mk + rm -f ${KERNEL_SOURCE}/../../config.mk + + # man page and configure scripts are shipped by wlan-ng-utils + rm -rf ${D}/usr/local/man + rm -rf ${D}/etc +} + +PACKAGES =+ "${PN}-p80211 ${PN}-usb ${PN}-cs ${PN}-pci" +ALLOW_EMPTY_${PN} = "1" +FILES_${PN}-p80211 = "/lib/modules/${KERNEL_VERSION}/wlan-ng/p80211${KERNEL_OBJECT_SUFFIX}" +FILES_${PN}-usb = "/lib/modules/${KERNEL_VERSION}/wlan-ng/prism2_usb${KERNEL_OBJECT_SUFFIX}" +FILES_${PN}-cs = "/lib/modules/${KERNEL_VERSION}/wlan-ng/prism2_cs${KERNEL_OBJECT_SUFFIX}" +FILES_${PN}-pci = "/lib/modules/${KERNEL_VERSION}/wlan-ng/prism2_pci${KERNEL_OBJECT_SUFFIX} \ + /lib/modules/${KERNEL_VERSION}/wlan-ng/prism2_plx${KERNEL_OBJECT_SUFFIX}" + +RDEPENDS_${PN}-p80211 = "wlan-ng-utils" +RDEPENDS_${PN} = "${PN}-p80211" +RDEPENDS_${PN}-usb = "${PN}-p80211" +RDEPENDS_${PN}-cs = "${PN}-p80211" +RDEPENDS_${PN}-pci = "${PN}-p80211" diff --git a/recipes/wlan-ng/wlan-ng-modules/config.in b/recipes/wlan-ng/wlan-ng-modules/config.in new file mode 100644 index 0000000000..a2b245e967 --- /dev/null +++ b/recipes/wlan-ng/wlan-ng-modules/config.in @@ -0,0 +1,21 @@ +WLAN_VERSION=0 +WLAN_PATCHLEVEL=2 +WLAN_SUBLEVEL=3 +WLAN_EXTRAVERSION=svn +#LINUX_SRC=$(KERNEL_SOURCE) +PCMCIA_SRC= +PREFIX= +INST_EXEDIR=/sbin +#TARGET_ROOT_ON_HOST= +#RC_DIR=/etc/init.d +PCMCIA_DIR=/etc/pcmcia +SYSV_INIT=y +INSTALL_DEPMOD= +WLAN_DEBUG=n +CROSS_COMPILE_ENABLED=n +CROSS_COMPILE= +HOST_COMPILE= +PRISM2_PLX=n +PRISM2_PCMCIA=n +PRISM2_PCI=n +PRISM2_USB=y diff --git a/recipes/wlan-ng/wlan-ng-modules/only-the-modules.patch b/recipes/wlan-ng/wlan-ng-modules/only-the-modules.patch new file mode 100644 index 0000000000..16d2bf3a6c --- /dev/null +++ b/recipes/wlan-ng/wlan-ng-modules/only-the-modules.patch @@ -0,0 +1,31 @@ +Index: linux-wlan-ng-devel/src/Makefile +=================================================================== +--- linux-wlan-ng-devel.orig/src/Makefile 2006-02-21 11:41:23.000000000 +0100 ++++ linux-wlan-ng-devel/src/Makefile 2006-02-21 12:58:05.796955176 +0100 +@@ -44,10 +44,9 @@ + + -include ../config.mk + +-DIRS=p80211 prism2 shared wlanctl nwepgen \ +- mkmeta wlancfg +-ALL_DIRS=mkmeta p80211 prism2 shared wlanctl \ +- nwepgen wlancfg ++ ++DIRS=p80211 prism2 shared mkmeta ++ALL_DIRS=mkmeta p80211 prism2 shared + + ifneq ($(wildcard *.addon),) + DIRS+=`cat *.addon` +Index: linux-wlan-ng-devel/src/prism2/Makefile +=================================================================== +--- linux-wlan-ng-devel.orig/src/prism2/Makefile 2006-02-21 11:41:23.000000000 +0100 ++++ linux-wlan-ng-devel/src/prism2/Makefile 2006-02-21 12:57:28.660600760 +0100 +@@ -44,7 +44,7 @@ + + -include ../../config.mk + +-DIRS=driver ridlist download ++DIRS=driver ridlist + + ifneq ($(wildcard *.addon),) + DIRS+=`cat *.addon` diff --git a/recipes/wlan-ng/wlan-ng-modules/pcmcia-driver.patch b/recipes/wlan-ng/wlan-ng-modules/pcmcia-driver.patch new file mode 100644 index 0000000000..429452f715 --- /dev/null +++ b/recipes/wlan-ng/wlan-ng-modules/pcmcia-driver.patch @@ -0,0 +1,84 @@ +Index: trunk/src/prism2/driver/prism2_cs.c +=================================================================== +--- trunk.orig/src/prism2/driver/prism2_cs.c 2006-03-23 08:45:02.000000000 +0100 ++++ trunk/src/prism2/driver/prism2_cs.c 2006-03-23 09:14:21.777552944 +0100 +@@ -45,6 +45,8 @@ + static void prism2sta_config(dev_link_t *link); + static void prism2sta_release(u_long arg); + static int prism2sta_event (event_t event, int priority, event_callback_args_t *args); ++static int prism2sta_suspend1(struct pcmcia_device *dev); ++static int prism2sta_resume1(struct pcmcia_device *dev); + + #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,68)) + /*---------------------------------------------------------------- +@@ -140,13 +142,23 @@ + .drv = { + .name = "prism2_cs", + }, +- .attach = prism2sta_attach, +- .detach = prism2sta_detach, +- .owner = THIS_MODULE, +-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)) ++ .probe = prism2sta_attach, ++ .remove = prism2sta_detach, ++ .suspend= prism2sta_suspend1, ++ .resume = prism2sta_resume1, ++#else ++ .attach = prism2sta_attach, ++ .detach = prism2sta_detach, ++#endif ++ .owner = THIS_MODULE, ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)) ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)) ++ .event = prism2sta_event, ++#endif + .id_table = prism2_cs_ids, +- .event = prism2sta_event, + #endif ++ + }; + #endif /* kernel_version */ + +@@ -361,7 +373,41 @@ + return; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)) ++static int prism2sta_suspend1(struct pcmcia_device *dev) ++{ ++ dev_link_t *link = dev_to_instance(dev); ++ wlandevice_t *wlandev = (wlandevice_t*)link->priv; ++ ++ DBFENTER; ++ ++ link->state |= DEV_SUSPEND; ++ if (link->state & DEV_CONFIG) { ++ prism2sta_ifstate(wlandev, P80211ENUM_ifstate_disable); ++ pcmcia_release_configuration(link->handle); ++ } ++ ++ DBFEXIT; ++ return 0; ++} + ++static int prism2sta_resume1(struct pcmcia_device *dev) ++{ ++ dev_link_t *link = dev_to_instance(dev); ++ wlandevice_t *wlandev = (wlandevice_t*)link->priv; ++ ++ DBFENTER; ++ ++ link->state &= ~DEV_SUSPEND; ++ if (link->state & DEV_CONFIG) { ++ pcmcia_request_configuration(link->handle, &link->conf); ++ } ++ ++ DBFEXIT; ++ return 0; ++} ++#endif ++ + /*---------------------------------------------------------------- + * prism2sta_config + * diff --git a/recipes/wlan-ng/wlan-ng-modules/usb-owner.patch b/recipes/wlan-ng/wlan-ng-modules/usb-owner.patch new file mode 100644 index 0000000000..be6c2a9fbb --- /dev/null +++ b/recipes/wlan-ng/wlan-ng-modules/usb-owner.patch @@ -0,0 +1,13 @@ +Index: linux-wlan-ng-0.2.3/src/prism2/driver/prism2_usb.c +=================================================================== +--- linux-wlan-ng-0.2.3.orig/src/prism2/driver/prism2_usb.c 2006-04-18 20:09:17.403457000 +0200 ++++ linux-wlan-ng-0.2.3/src/prism2/driver/prism2_usb.c 2006-04-18 20:11:21.064657640 +0200 +@@ -313,7 +313,7 @@ + + + struct usb_driver prism2_usb_driver = { +-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,4,19)) ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,4,19) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16))) + .owner = THIS_MODULE, + #endif + .name = "prism2_usb", diff --git a/recipes/wlan-ng/wlan-ng-modules_0.2.7.bb b/recipes/wlan-ng/wlan-ng-modules_0.2.7.bb new file mode 100644 index 0000000000..a0113e9ae4 --- /dev/null +++ b/recipes/wlan-ng/wlan-ng-modules_0.2.7.bb @@ -0,0 +1,9 @@ +require wlan-ng-modules.inc + +PR = "r2" + +SRC_URI += "ftp://ftp.linux-wlan.org/pub/linux-wlan-ng/linux-wlan-ng-${PV}.tar.bz2 \ + file://2.6.22-fixes.patch;patch=1" + +S = "${WORKDIR}/linux-wlan-ng-${PV}" + diff --git a/recipes/wlan-ng/wlan-ng-modules_svn.bb b/recipes/wlan-ng/wlan-ng-modules_svn.bb new file mode 100644 index 0000000000..c455181c6b --- /dev/null +++ b/recipes/wlan-ng/wlan-ng-modules_svn.bb @@ -0,0 +1,9 @@ +require wlan-ng-modules.inc + +PR = "r0" + +PV = "0.2.8+svnr${SRCREV}" + +SRC_URI += "svn://svn.shaftnet.org/linux-wlan-ng;module=trunk " + +S = "${WORKDIR}/trunk" diff --git a/recipes/wlan-ng/wlan-ng-utils-0.2.7/config.in b/recipes/wlan-ng/wlan-ng-utils-0.2.7/config.in new file mode 100644 index 0000000000..be01488a92 --- /dev/null +++ b/recipes/wlan-ng/wlan-ng-utils-0.2.7/config.in @@ -0,0 +1,21 @@ +WLAN_VERSION=0 +WLAN_PATCHLEVEL=2 +WLAN_SUBLEVEL=3 +WLAN_EXTRAVERSION= +#LINUX_SRC=$(KERNEL_SOURCE) +PCMCIA_SRC=. +PREFIX= +INST_EXEDIR=/sbin +#TARGET_ROOT_ON_HOST= +#RC_DIR=/etc/init.d +PCMCIA_DIR=/etc/pcmcia +SYSV_INIT=y +INSTALL_DEPMOD= +WLAN_DEBUG=n +CROSS_COMPILE_ENABLED=n +CROSS_COMPILE= +HOST_COMPILE= +PRISM2_PLX=y +PRISM2_PCMCIA=y +PRISM2_PCI=y +PRISM2_USB=y diff --git a/recipes/wlan-ng/wlan-ng-utils-0.2.7/only-the-utils.patch b/recipes/wlan-ng/wlan-ng-utils-0.2.7/only-the-utils.patch new file mode 100644 index 0000000000..af1f442a4c --- /dev/null +++ b/recipes/wlan-ng/wlan-ng-utils-0.2.7/only-the-utils.patch @@ -0,0 +1,26 @@ +Index: trunk/src/Makefile +=================================================================== +--- trunk.orig/src/Makefile 2006-08-21 16:24:58.000000000 +0200 ++++ trunk/src/Makefile 2006-08-23 12:49:08.000000000 +0200 +@@ -44,7 +44,7 @@ + + -include ../config.mk + +-DIRS=mkmeta shared wlanctl nwepgen wlancfg p80211 prism2 ++DIRS=mkmeta shared wlanctl nwepgen wlancfg prism2 + + ifneq ($(wildcard *.addon),) + DIRS+=`cat *.addon` +Index: trunk/src/prism2/Makefile +=================================================================== +--- trunk.orig/src/prism2/Makefile 2006-08-21 16:24:57.000000000 +0200 ++++ trunk/src/prism2/Makefile 2006-08-23 12:48:32.000000000 +0200 +@@ -44,7 +44,7 @@ + + -include ../../config.mk + +-DIRS=driver ridlist download ++DIRS=ridlist download + + ifneq ($(wildcard *.addon),) + DIRS+=`cat *.addon` diff --git a/recipes/wlan-ng/wlan-ng-utils-0.2.8+svnr1859/config.in b/recipes/wlan-ng/wlan-ng-utils-0.2.8+svnr1859/config.in new file mode 100644 index 0000000000..298935770d --- /dev/null +++ b/recipes/wlan-ng/wlan-ng-utils-0.2.8+svnr1859/config.in @@ -0,0 +1,21 @@ +WLAN_VERSION=0 +WLAN_PATCHLEVEL=2 +WLAN_SUBLEVEL=8 +WLAN_EXTRAVERSION= +#LINUX_SRC=$(KERNEL_SOURCE) +PCMCIA_SRC=. +PREFIX= +INST_EXEDIR=/sbin +#TARGET_ROOT_ON_HOST= +#RC_DIR=/etc/init.d +PCMCIA_DIR=/etc/pcmcia +SYSV_INIT=y +INSTALL_DEPMOD= +WLAN_DEBUG=n +CROSS_COMPILE_ENABLED=n +CROSS_COMPILE= +HOST_COMPILE= +PRISM2_PLX=y +PRISM2_PCMCIA=y +PRISM2_PCI=y +PRISM2_USB=y diff --git a/recipes/wlan-ng/wlan-ng-utils-0.2.8+svnr1859/only-the-utils.patch b/recipes/wlan-ng/wlan-ng-utils-0.2.8+svnr1859/only-the-utils.patch new file mode 100644 index 0000000000..b6156da921 --- /dev/null +++ b/recipes/wlan-ng/wlan-ng-utils-0.2.8+svnr1859/only-the-utils.patch @@ -0,0 +1,22 @@ +--- trunk/src/Makefile.old 2008-06-05 14:52:31.000000000 -0500 ++++ trunk/src/Makefile 2008-06-05 14:53:02.000000000 -0500 +@@ -44,7 +44,7 @@ + + -include ../config.mk + +-DIRS=mkmeta shared wlanctl nwepgen wlancfg p80211 prism2 ++DIRS=mkmeta shared wlanctl nwepgen wlancfg prism2 + + ifneq ($(wildcard *.addon),) + DIRS+=`cat *.addon` +--- trunk/src/prism2/Makefile.old 2008-06-05 14:52:47.000000000 -0500 ++++ trunk/src/prism2/Makefile 2008-06-05 14:53:10.000000000 -0500 +@@ -44,7 +44,7 @@ + + -include ../../config.mk + +-DIRS=driver ridlist download ++DIRS=ridlist download + + ifneq ($(wildcard *.addon),) + DIRS+=`cat *.addon` diff --git a/recipes/wlan-ng/wlan-ng-utils-0.2.8/only-the-utils.patch b/recipes/wlan-ng/wlan-ng-utils-0.2.8/only-the-utils.patch new file mode 100644 index 0000000000..af1f442a4c --- /dev/null +++ b/recipes/wlan-ng/wlan-ng-utils-0.2.8/only-the-utils.patch @@ -0,0 +1,26 @@ +Index: trunk/src/Makefile +=================================================================== +--- trunk.orig/src/Makefile 2006-08-21 16:24:58.000000000 +0200 ++++ trunk/src/Makefile 2006-08-23 12:49:08.000000000 +0200 +@@ -44,7 +44,7 @@ + + -include ../config.mk + +-DIRS=mkmeta shared wlanctl nwepgen wlancfg p80211 prism2 ++DIRS=mkmeta shared wlanctl nwepgen wlancfg prism2 + + ifneq ($(wildcard *.addon),) + DIRS+=`cat *.addon` +Index: trunk/src/prism2/Makefile +=================================================================== +--- trunk.orig/src/prism2/Makefile 2006-08-21 16:24:57.000000000 +0200 ++++ trunk/src/prism2/Makefile 2006-08-23 12:48:32.000000000 +0200 +@@ -44,7 +44,7 @@ + + -include ../../config.mk + +-DIRS=driver ridlist download ++DIRS=ridlist download + + ifneq ($(wildcard *.addon),) + DIRS+=`cat *.addon` diff --git a/recipes/wlan-ng/wlan-ng-utils.inc b/recipes/wlan-ng/wlan-ng-utils.inc new file mode 100644 index 0000000000..3dd25d9d7f --- /dev/null +++ b/recipes/wlan-ng/wlan-ng-utils.inc @@ -0,0 +1,69 @@ +# FIXME, consider using kernel staging directory instead of KERNEL_SOURCE which is +# located in the work directory. see module.bbclass + +DESCRIPTION = "linux-wlan-ng userland utilities" +HOMEPAGE = "http://www.linux-wlan.org" +SECTION = "kernel/userland" +LICENSE = "GPL" +DEPENDS = "virtual/kernel" + +SRC_URI = "file://only-the-utils.patch;patch=1 \ + file://wlan-ng.modutils \ + file://wlan.agent \ + file://usbctl \ + file://resume \ + file://pre-up \ + file://post-down \ + file://config.in" + +# yeah, it's kind of backwards, but otherwise the config step will fail +inherit module + +do_configure() { + install -m 0655 ${WORKDIR}/config.in ${S}/config.in + oe_runmake LINUX_SRC=${KERNEL_SOURCE} auto_config + + if grep CONFIG_PCMCIA=[ym] ${STAGING_KERNEL_DIR}/kernel-config; then + echo "PRISM2_PCMCIA=y" >> config.mk + echo "WLAN_KERN_PCMCIA=y" >> config.mk + fi + echo "TARGET_ROOT_ON_HOST=${D}/" >> config.mk + echo "FIRMWARE_DIR=/etc/wlan" >> config.mk + echo "TARGET_MODDIR=${D}/lib/modules/${KERNEL_VERSION}/wlan-ng" >> config.mk + echo "TARGET_INST_EXEDIR=${D}/sbin" >> config.mk + echo "RC_DIR=${sysconfdir}/" >> config.mk + echo "CC=${CC}" >> config.mk + echo "LD=${LD}" >> config.mk + + # Shut up, you broken buildsystem + install -m 0655 config.mk src/prism2/config.mk + install -d src/prism2/driver/include + ln -sf ${S}/src/include/wlan src/prism2/driver/include/wlan + ln -sf ${S}/src/prism2/include/prism2 src/prism2/driver/include/prism2 +} + +do_compile() { + oe_runmake all +} + +do_install() { + oe_runmake install + mkdir -p ${D}${sysconfdir}/modutils/ + mkdir -p ${D}${sysconfdir}/hotplug/ + mkdir -p ${D}${base_sbindir}/ + install -m 0644 ${WORKDIR}/wlan-ng.modutils ${D}${sysconfdir}/modutils/wlan-ng.conf + install -m 0755 ${WORKDIR}/wlan.agent ${D}${sysconfdir}/hotplug/wlan.agent + install -d ${D}${sysconfdir}/network/if-pre-up.d + install -m 0755 ${WORKDIR}/pre-up ${D}${sysconfdir}/network/if-pre-up.d/wlan-ng + install -d ${D}${sysconfdir}/network/if-post-down.d + install -m 0755 ${WORKDIR}/post-down ${D}${sysconfdir}/network/if-post-down.d/wlan-ng + install -d ${D}${sysconfdir}/apm/resume.d + install -m 0755 ${WORKDIR}/resume ${D}${sysconfdir}/apm/resume.d/wlan-ng + install -m 0755 ${WORKDIR}/usbctl ${D}${base_sbindir}/usbctl + install -d ${D}${mandir}/man1 + install -m 0644 ${S}/man/*.1 ${D}${mandir}/man1/ + rm -rf ${D}/usr/local/man +} + +FILES_${PN}-dbg += "/sbin/.debug" +FILES_${PN} = "/etc /sbin" diff --git a/recipes/wlan-ng/wlan-ng-utils/config.in b/recipes/wlan-ng/wlan-ng-utils/config.in new file mode 100644 index 0000000000..cac5576f34 --- /dev/null +++ b/recipes/wlan-ng/wlan-ng-utils/config.in @@ -0,0 +1,21 @@ +WLAN_VERSION=0 +WLAN_PATCHLEVEL=2 +WLAN_SUBLEVEL=3 +WLAN_EXTRAVERSION=svn +#LINUX_SRC=$(KERNEL_SOURCE) +PCMCIA_SRC=. +PREFIX= +INST_EXEDIR=/sbin +#TARGET_ROOT_ON_HOST= +#RC_DIR=/etc/init.d +PCMCIA_DIR=/etc/pcmcia +SYSV_INIT=y +INSTALL_DEPMOD= +WLAN_DEBUG=n +CROSS_COMPILE_ENABLED=n +CROSS_COMPILE= +HOST_COMPILE= +PRISM2_PLX=y +PRISM2_PCMCIA=y +PRISM2_PCI=y +PRISM2_USB=y diff --git a/recipes/wlan-ng/wlan-ng-utils/hostldflags.patch b/recipes/wlan-ng/wlan-ng-utils/hostldflags.patch new file mode 100644 index 0000000000..93893a5e11 --- /dev/null +++ b/recipes/wlan-ng/wlan-ng-utils/hostldflags.patch @@ -0,0 +1,20 @@ +Index: linux-wlan-ng-0.2.3/src/mkmeta/Makefile +=================================================================== +--- linux-wlan-ng-0.2.3.orig/src/mkmeta/Makefile 2005-01-26 23:01:07.000000000 +0100 ++++ linux-wlan-ng-0.2.3/src/mkmeta/Makefile 2006-04-18 22:07:58.937819216 +0200 +@@ -90,13 +90,13 @@ + + + mkmetadef: $(MKMETADEF_OBJ) mkmetadefhead.txt +- $(HOST_CC) $(LDFLAGS) -o $@ $(MKMETADEF_OBJ) ++ $(HOST_CC) $(HOST_LDFLAGS) -o $@ $(MKMETADEF_OBJ) + cat mkmetadefhead.txt > ../include/wlan/p80211metadef.h + ./mkmetadef >> ../include/wlan/p80211metadef.h + echo "#endif" >> ../include/wlan/p80211metadef.h + + mkmetastruct: $(MKMETASTRUCT_OBJ) mkmetastructhead.txt +- $(HOST_CC) $(LDFLAGS) -o $@ $(MKMETASTRUCT_OBJ) ++ $(HOST_CC) $(HOST_LDFLAGS) -o $@ $(MKMETASTRUCT_OBJ) + cat mkmetastructhead.txt > ../include/wlan/p80211metastruct.h + ./mkmetastruct >> ../include/wlan/p80211metastruct.h + echo "#endif" >> ../include/wlan/p80211metastruct.h diff --git a/recipes/wlan-ng/wlan-ng-utils/only-the-utils.patch b/recipes/wlan-ng/wlan-ng-utils/only-the-utils.patch new file mode 100644 index 0000000000..5e0eb46cef --- /dev/null +++ b/recipes/wlan-ng/wlan-ng-utils/only-the-utils.patch @@ -0,0 +1,33 @@ +Index: linux-wlan-ng-devel/src/Makefile +=================================================================== +--- linux-wlan-ng-devel.orig/src/Makefile 2006-02-21 11:41:23.000000000 +0100 ++++ linux-wlan-ng-devel/src/Makefile 2006-02-21 13:15:30.836085080 +0100 +@@ -44,10 +44,11 @@ + + -include ../config.mk + +-DIRS=p80211 prism2 shared wlanctl nwepgen \ +- mkmeta wlancfg +-ALL_DIRS=mkmeta p80211 prism2 shared wlanctl \ +- nwepgen wlancfg ++ ++DIRS=prism2 shared wlanctl nwepgen \ ++ mkmeta wlancfg ++ALL_DIRS=mkmeta prism2 shared wlanctl \ ++ nwepgen wlancfg + + ifneq ($(wildcard *.addon),) + DIRS+=`cat *.addon` +Index: linux-wlan-ng-devel/src/prism2/Makefile +=================================================================== +--- linux-wlan-ng-devel.orig/src/prism2/Makefile 2006-02-21 11:41:23.000000000 +0100 ++++ linux-wlan-ng-devel/src/prism2/Makefile 2006-02-21 13:14:43.248319520 +0100 +@@ -44,7 +44,7 @@ + + -include ../../config.mk + +-DIRS=driver ridlist download ++DIRS=ridlist download + + ifneq ($(wildcard *.addon),) + DIRS+=`cat *.addon` diff --git a/recipes/wlan-ng/wlan-ng-utils/wlan.agent b/recipes/wlan-ng/wlan-ng-utils/wlan.agent new file mode 100644 index 0000000000..d7124f3816 --- /dev/null +++ b/recipes/wlan-ng/wlan-ng-utils/wlan.agent @@ -0,0 +1,105 @@ +#!/bin/sh +# +# p80211/wlan hotplug policy agent. +# +# wlan hotplug params include: +# +# ACTION=%s [register|remove|shutdown|startup|suspend|resume] +# INTERFACE=%s +# NSDNAME=%s +# + +cd /etc/hotplug +# must have ./ here or busybox shell barfs +. ./hotplug.functions + +#DEBUG=yes export DEBUG + +if [ "$INTERFACE" = "" ]; then + mesg Bad WLAN invocation: \$INTERFACE is not set + exit 1 +fi + +if [ "$NSDNAME" = "" ]; then + mesg Bad WLAN invocation: \$NSDNAME is not set + exit 1 +fi + +debug_mesg WLAN $ACTION on $INTERFACE \($NSDNAME\) + +if [ "$NSDNAME" = "prism2_cs" ] ; then + mesg "WLAN Hotplug bypassed for pcmcia" + exit 0 +fi + +# load up the shared scripts +if [ ! -f /etc/wlan/shared ] ; then + mesg "/etc/wlan/shared not present, aborting" + exit 1 +fi + +ECHO=mesg +. /etc/wlan/shared + +case $ACTION in +'register'|'resume') + eval 'WLAN_ENABLE=$ENABLE_'$INTERFACE + if ! is_true $WLAN_ENABLE ; then + mesg "WLAN $ACTION - interface $INTERFACE not enabled, aborting" + exit 1 + fi + debug_mesg WLAN $INTERFACE registered. + wlan_bring_it_up $INTERFACE + if [ $? = 0 ] ; then + mesg WLAN $INTERFACE brought up successfully. + if [ -x /etc/wlan/network ] ; then + mesg "WLAN bringing up layer 3+ with /etc/wlan/network" + /etc/wlan/network start $INTERFACE + elif [ -x /etc/wlan/pre-ifup ] ; then + # pre-ifup is presumed to call ifup if it + # wants to...it may choose to skip it. + mesg "WLAN bringing up layer 3+ with /etc/wlan/pre-ifup" + /etc/wlan/pre-ifup $INTERFACE + else + mesg "WLAN bringing up layer 3+ with /sbin/ifup" + /sbin/ifup $INTERFACE + fi + else + mesg WLAN Could not bring up $INTERFACE + exit 1 + fi + # eventually invoke net.agent on $INTERFACE w/ REGISTER +;; +'remove'|'suspend') + debug_mesg WLAN $INTERFACE removed. + eval 'WLAN_ENABLE=$ENABLE_'$INTERFACE + if ! is_true $WLAN_ENABLE ; then + mesg "WLAN $ACTION - interface $INTERFACE not enabled, aborting" + exit 1 + fi + if [ -x /etc/wlan/network ] ; then + mesg "WLAN taking down layer 3+ with /etc/wlan/network" + /etc/wlan/network stop $INTERFACE + elif [ -x /etc/wlan/post-ifdown ] ; then + # post-ifdown is presumed to call ifdown if it + # wants to...it may choose to skip it. + mesg "WLAN taking down layer 3+ with /etc/wlan/post-ifdown" + /etc/wlan/post-ifdown $INTERFACE + else + mesg "WLAN taking down layer 3+ with /sbin/ifdown" + /sbin/ifdown $INTERFACE + fi + wlan_disable $INTERFACE +;; +'startup') + # kick off wland. + debug_mesg WLAN p80211 starting! +;; +'shutdown') + debug_mesg WLAN p80211 shutting down! +;; +*) + debug_mesg WLAN $ACTION event not supported + exit 1 ;; + +esac diff --git a/recipes/wlan-ng/wlan-ng-utils_0.2.7.bb b/recipes/wlan-ng/wlan-ng-utils_0.2.7.bb new file mode 100644 index 0000000000..9946a4b670 --- /dev/null +++ b/recipes/wlan-ng/wlan-ng-utils_0.2.7.bb @@ -0,0 +1,10 @@ +require wlan-ng-utils.inc + +SRC_URI += "ftp://ftp.linux-wlan.org/pub/linux-wlan-ng/linux-wlan-ng-${PV}.tar.bz2 \ + file://scripts-makefile-hostcc.patch;patch=1 \ + file://pcmciasrc.patch;patch=1 \ + file://hostldflags.patch;patch=1" + +S = "${WORKDIR}/linux-wlan-ng-${PV}" + +PR = "r3" diff --git a/recipes/wlan-ng/wlan-ng-utils_0.2.8.bb b/recipes/wlan-ng/wlan-ng-utils_0.2.8.bb new file mode 100644 index 0000000000..15d5e70f8e --- /dev/null +++ b/recipes/wlan-ng/wlan-ng-utils_0.2.8.bb @@ -0,0 +1,10 @@ +require wlan-ng-utils.inc + +SRC_URI += "ftp://ftp.linux-wlan.org/pub/linux-wlan-ng/linux-wlan-ng-${PV}.tar.bz2 \ + file://scripts-makefile-hostcc.patch;patch=1 \ + file://pcmciasrc.patch;patch=1 \ + file://hostldflags.patch;patch=1" + +S = "${WORKDIR}/linux-wlan-ng-${PV}" + +PR = "r2" diff --git a/recipes/wlan-ng/wlan-ng-utils_svn.bb b/recipes/wlan-ng/wlan-ng-utils_svn.bb new file mode 100644 index 0000000000..096ac22055 --- /dev/null +++ b/recipes/wlan-ng/wlan-ng-utils_svn.bb @@ -0,0 +1,12 @@ +require wlan-ng-utils.inc + +PR = "r0" + +PV = "0.2.8+svnr${SRCREV}" + +SRC_URI += "svn://svn.shaftnet.org/linux-wlan-ng;module=trunk \ + file://scripts-makefile-hostcc.patch;patch=1 \ + file://pcmciasrc.patch;patch=1 \ + file://hostldflags.patch;patch=1" + +S = "${WORKDIR}/trunk" |