2 DESC="WL1251 MAC80211 Wireless LAN driver"
6 if `grep -q wl1251 /proc/modules` ; then
9 rmmod board-omap3pandora-wifi
14 if ! lsmod | grep -q mac80211 ; then
15 insmod $(busybox find /lib/modules/$(uname -r)/updates -name "rfkill_backport.ko")
16 insmod $(busybox find /lib/modules/$(uname -r)/updates -name "compat.ko")
17 insmod $(busybox find /lib/modules/$(uname -r)/updates -name "cfg80211.ko")
18 insmod $(busybox find /lib/modules/$(uname -r)/updates -name "mac80211.ko")
19 insmod $(busybox find /lib/modules/$(uname -r)/updates -name "compat_firmware_class.ko")
20 insmod $(busybox find /lib/modules/$(uname -r) -name "ecb.ko")
21 insmod $(busybox find /lib/modules/$(uname -r) -name "pcbc.ko")
22 insmod $(busybox find /lib/modules/$(uname -r) -name "arc4.ko")
23 insmod $(busybox find /lib/modules/$(uname -r)/updates -name "lib80211.ko")
24 insmod $(busybox find /lib/modules/$(uname -r)/updates -name "lib80211_crypt_tkip.ko")
25 insmod $(busybox find /lib/modules/$(uname -r)/updates -name "lib80211_crypt_wep.ko")
26 insmod $(busybox find /lib/modules/$(uname -r)/updates -name "lib80211_crypt_ccmp.ko")
28 insmod $(busybox find /lib/modules/$(uname -r)/updates -name "wl1251.ko")
29 insmod $(busybox find /lib/modules/$(uname -r)/updates -name "wl1251_sdio.ko")
30 insmod $(busybox find /lib/modules/$(uname -r) -name "board-omap3pandora-wifi.ko")
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