#!/bin/sh
-
DESC="WL1251 MAC80211 Wireless LAN driver"
NAME="wl1251"
if `grep -q wl1251 /proc/modules` ; then
rmmod wl1251_sdio
rmmod wl1251
- rmmod board-omap3pandora-wifi
- fi
- if `grep -q mac80211 /proc/modules` ; then
- rmmod mac80211
- rmmod cfg80211
- rmmod rfkill_backport
- rmmod lib80211_crypt_ccmp
- rmmod lib80211_crypt_wep
- rmmod lib80211_crypt_tkip
- rmmod lib80211
+ # rmmod board-omap3pandora-wifi
fi
}
d_start() {
- insmod $(busybox find /lib/modules/$(uname -r) -name "board-omap3pandora-wifi.ko")
- insmod $(busybox find /lib/modules/$(uname -r) -name "arc4.ko")
- insmod $(busybox find /lib/modules/$(uname -r) -name "ecb.ko")
+ insmod $(busybox find /lib/modules/$(uname -r)/updates -name "rfkill_backport.ko")
+ insmod $(busybox find /lib/modules/$(uname -r)/updates -name "compat.ko")
+ insmod $(busybox find /lib/modules/$(uname -r)/updates -name "cfg80211.ko")
+ insmod $(busybox find /lib/modules/$(uname -r)/updates -name "mac80211.ko")
+ insmod $(busybox find /lib/modules/$(uname -r)/updates -name "compat_firmware_class.ko")
+ insmod $(busybox find /lib/modules/$(uname -r) -name "ecb.ko")
insmod $(busybox find /lib/modules/$(uname -r) -name "pcbc.ko")
- insmod $(busybox find /lib/modules/$(uname -r) -name "rfkill_backport.ko")
- insmod $(busybox find /lib/modules/$(uname -r) -name "cfg80211.ko")
- insmod $(busybox find /lib/modules/$(uname -r) -name "mac80211.ko")
- insmod $(busybox find /lib/modules/$(uname -r) -name "lib80211.ko")
- insmod $(busybox find /lib/modules/$(uname -r) -name "lib80211_crypt_tkip.ko")
- insmod $(busybox find /lib/modules/$(uname -r) -name "lib80211_crypt_wep.ko")
- insmod $(busybox find /lib/modules/$(uname -r) -name "lib80211_crypt_ccmp.ko")
- insmod $(busybox find /lib/modules/$(uname -r) -name "wl1251.ko")
- insmod $(busybox find /lib/modules/$(uname -r) -name "wl1251_sdio.ko")
+ insmod $(busybox find /lib/modules/$(uname -r) -name "arc4.ko")
+ insmod $(busybox find /lib/modules/$(uname -r)/updates -name "lib80211.ko")
+ insmod $(busybox find /lib/modules/$(uname -r)/updates -name "lib80211_crypt_tkip.ko")
+ insmod $(busybox find /lib/modules/$(uname -r)/updates -name "lib80211_crypt_wep.ko")
+ insmod $(busybox find /lib/modules/$(uname -r)/updates -name "lib80211_crypt_ccmp.ko")
+ insmod $(busybox find /lib/modules/$(uname -r)/updates -name "wl1251.ko")
+ insmod $(busybox find /lib/modules/$(uname -r)/updates -name "wl1251_sdio.ko")
+ insmod $(busybox find /lib/modules/$(uname -r) -name "board-omap3pandora-wifi.ko")
+
+ # restore phy0 related LED triggers (they come from mac80211.ko)
+ if [ -e /sys/class/leds/ ] ; then
+ for led in /sys/class/leds/* ; do
+ trigger=$(grep "$(basename $led)" /etc/default/leds | grep "phy0" | awk '{print $2}')
+ if [ "x$trigger" != "x" ] ; then
+ echo "$trigger" > "$led/trigger"
+ fi
+ done
+ fi
}
case "$1" in
start)
echo -n "Starting $DESC: $NAME"
- d_start
+ d_start &
echo "."
;;
stop)