wl1251-modules: Add latest patch set and bump compat-wireless to 2010-03-10.
[openpandora.oe.git] / recipes / pandora-system / wl1251-modules / rc.wl1251
1 #!/bin/sh
2
3 DESC="WL1251 MAC80211 Wireless LAN driver"
4 NAME="wl1251"
5
6 d_stop() {
7         if `grep -q wl1251 /proc/modules` ; then
8                 rmmod wl1251_sdio
9                 rmmod wl1251
10                 # rmmod board-omap3pandora-wifi
11         fi
12 }
13
14 d_start() {
15         insmod $(busybox find /lib/modules/$(uname -r) -name "board-omap3pandora-wifi.ko")
16         insmod $(busybox find /lib/modules/$(uname -r) -name "arc4.ko")
17         insmod $(busybox find /lib/modules/$(uname -r) -name "ecb.ko")
18         insmod $(busybox find /lib/modules/$(uname -r) -name "pcbc.ko")
19         insmod $(busybox find /lib/modules/$(uname -r)/updates -name "compat.ko")       
20         insmod $(busybox find /lib/modules/$(uname -r)/updates -name "rfkill_backport.ko")
21         insmod $(busybox find /lib/modules/$(uname -r)/updates -name "cfg80211.ko")
22         insmod $(busybox find /lib/modules/$(uname -r)/updates -name "mac80211.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")
27         insmod $(busybox find /lib/modules/$(uname -r)/updates -name "wl1251.ko")
28         insmod $(busybox find /lib/modules/$(uname -r)/updates -name "wl1251_sdio.ko")
29         iwconfig wlan0 power off
30 }
31
32 case "$1" in
33   start)
34         echo -n "Starting $DESC: $NAME"
35         d_start &
36         echo "."
37         ;;
38   stop)
39         echo -n "Stopping $DESC: $NAME"
40         d_stop
41         echo "."
42         ;;
43   restart|force-reload)
44         echo -n "Restarting $DESC: $NAME"
45         d_stop
46         sleep 1
47         d_start
48         echo "."
49         ;;
50   *)
51         echo "Usage: $0 {start|stop|restart|force-reload}" >&2
52         exit 1
53         ;;
54 esac
55
56 exit 0