Merge bk://oe-devel.bkbits.net/openembedded
authornslu2-linux.adm@bkbits.net <nslu2-linux.adm@bkbits.net>
Thu, 5 May 2005 14:40:05 +0000 (14:40 +0000)
committernslu2-linux.adm@bkbits.net <nslu2-linux.adm@bkbits.net>
Thu, 5 May 2005 14:40:05 +0000 (14:40 +0000)
into bkbits.net:/repos/n/nslu2-linux/openembedded

2005/05/05 15:39:30+02:00 uni-frankfurt.de!mickeyl
fix oesources mirror entry. spotted by Nick Haflinger

BKrev: 427a3045Wm9Tmb-X85GBp5HPmFI_4w

15 files changed:
classes/base.bbclass
packages/wlan-ng/files/post-down
packages/wlan-ng/files/pre-up
packages/wlan-ng/files/resume
packages/wlan-ng/files/usbctl
packages/wlan-ng/files/wlan-ng.modutils
packages/wlan-ng/files/wlan.agent
packages/wlan-ng/wlan-ng-modules-0.2.1-pre23/Ambit_usb.patch [moved from packages/wlan-ng/files/Ambit_usb.patch with 100% similarity]
packages/wlan-ng/wlan-ng-modules-0.2.1-pre23/OZ-Configure.patch [moved from packages/wlan-ng/files/OZ-Configure.patch with 100% similarity]
packages/wlan-ng/wlan-ng-modules-0.2.1-pre23/config.in [moved from packages/wlan-ng/files/config.in with 100% similarity]
packages/wlan-ng/wlan-ng-modules-0.2.1-pre23/config.mk [moved from packages/wlan-ng/files/config.mk with 100% similarity]
packages/wlan-ng/wlan-ng-modules-0.2.1-pre23/no-compat.patch [moved from packages/wlan-ng/files/no-compat.patch with 100% similarity]
packages/wlan-ng/wlan-ng-modules-0.2.1-pre23/pass-kernel-cross.patch [moved from packages/wlan-ng/files/pass-kernel-cross.patch with 100% similarity]
packages/wlan-ng/wlan-ng-modules-0.2.1-pre23/scripts-makefile-hostcc.diff [moved from packages/wlan-ng/files/scripts-makefile-hostcc.diff with 100% similarity]
packages/wlan-ng/wlan-ng-modules-0.2.1-pre23/version.h [moved from packages/wlan-ng/files/version.h with 100% similarity]

index 52dfede..4c2c58e 100644 (file)
@@ -795,7 +795,7 @@ ftp://ftp.kernel.org/pub    ftp://ftp.uk.kernel.org/pub
 ftp://ftp.kernel.org/pub       ftp://ftp.hk.kernel.org/pub
 ftp://ftp.kernel.org/pub       ftp://ftp.au.kernel.org/pub
 ftp://ftp.kernel.org/pub       ftp://ftp.jp.kernel.org/pub
-ftp://.*/.*/   http://www.oesources.org/source/current
-http://.*/.*/  http://www.oesources.org/source/current
+ftp://.*/.*/   http://www.oesources.org/source/current/
+http://.*/.*/  http://www.oesources.org/source/current/
 }
 
index e69de29..bf4ba0a 100644 (file)
@@ -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
index e69de29..0ae410e 100644 (file)
@@ -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
index e69de29..f875939 100644 (file)
@@ -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
+
index e69de29..5a34b03 100644 (file)
Binary files a/packages/wlan-ng/files/usbctl and b/packages/wlan-ng/files/usbctl differ
index e69de29..945d646 100644 (file)
@@ -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