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
15 # this does not exist on newer kernels
16 modprobe board-omap3pandora-wifi 2> /dev/null
18 # find our phy index, they change every time driver module is reinserted
19 # assume our interface is wlan0
21 for a in `seq 20` ; do
22 if [ -e /sys/class/net/wlan0 ] ; then
23 phy_idx=$(cat /sys/class/net/wlan0/phy80211/index)
30 # restore phy related LED triggers (they come from mac80211.ko)
31 if [ -e /sys/class/leds/ ] ; then
32 for led in /sys/class/leds/* ; do
33 trigger=$(grep "$(basename $led)" /etc/default/leds | grep phy | \
34 awk '{print $2}' | sed -e 's/.*phy[0-9]*\(.*\)/\1/')
35 if [ "x$trigger" != "x" ] ; then
36 echo "phy${phy_idx}$trigger" > "$led/trigger"
44 echo -n "Starting $DESC: $NAME"
49 echo -n "Stopping $DESC: $NAME"
54 echo -n "Restarting $DESC: $NAME"
61 echo "Usage: $0 {start|stop|restart|force-reload}" >&2