2 DESC="WL1251 MAC80211 Wireless LAN driver"
6 if `grep -q wl1251 /proc/modules` ; then
8 rmmod board_omap3pandora_wifi wl1251_sdio wl1251 2> /dev/null
13 if ! lsmod | grep -q mac80211 ; then
14 insmod $(busybox find /lib/modules/$(uname -r)/updates -name "rfkill_backport.ko")
15 insmod $(busybox find /lib/modules/$(uname -r)/updates -name "compat.ko")
16 insmod $(busybox find /lib/modules/$(uname -r)/updates -name "cfg80211.ko")
17 insmod $(busybox find /lib/modules/$(uname -r)/updates -name "mac80211.ko")
18 insmod $(busybox find /lib/modules/$(uname -r)/updates -name "compat_firmware_class.ko")
19 insmod $(busybox find /lib/modules/$(uname -r) -name "ecb.ko")
20 insmod $(busybox find /lib/modules/$(uname -r) -name "pcbc.ko")
21 insmod $(busybox find /lib/modules/$(uname -r) -name "arc4.ko")
22 insmod $(busybox find /lib/modules/$(uname -r)/updates -name "lib80211.ko")
23 insmod $(busybox find /lib/modules/$(uname -r)/updates -name "lib80211_crypt_tkip.ko")
24 insmod $(busybox find /lib/modules/$(uname -r)/updates -name "lib80211_crypt_wep.ko")
25 insmod $(busybox find /lib/modules/$(uname -r)/updates -name "lib80211_crypt_ccmp.ko")
29 # this does not exist on newer kernels
30 modprobe board-omap3pandora-wifi 2> /dev/null
32 # find our phy index, they change every time driver module is reinserted
33 # assume our interface is wlan0
35 for a in `seq 20` ; do
36 if [ -e /sys/class/net/wlan0 ] ; then
37 phy_idx=$(cat /sys/class/net/wlan0/phy80211/index)
44 # restore phy related LED triggers (they come from mac80211.ko)
45 if [ -e /sys/class/leds/ ] ; then
46 for led in /sys/class/leds/* ; do
47 trigger=$(grep "$(basename $led)" /etc/default/leds | grep phy | \
48 awk '{print $2}' | sed -e 's/.*phy[0-9]*\(.*\)/\1/')
49 if [ "x$trigger" != "x" ] ; then
50 echo "phy${phy_idx}$trigger" > "$led/trigger"
58 echo -n "Starting $DESC: $NAME"
63 echo -n "Stopping $DESC: $NAME"
68 echo -n "Restarting $DESC: $NAME"
75 echo "Usage: $0 {start|stop|restart|force-reload}" >&2