wl1251-modules: load modules in a way that would work on more kernels
authorGrazvydas Ignotas <notasas@gmail.com>
Mon, 20 Feb 2012 23:53:39 +0000 (01:53 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Mon, 20 Feb 2012 23:53:39 +0000 (01:53 +0200)
recipes/pandora-system/wl1251-modules/rc.wl1251

index d1834e1..17df192 100755 (executable)
@@ -6,7 +6,7 @@ d_stop() {
        if `grep -q wl1251 /proc/modules` ; then
                rmmod wl1251_sdio
                rmmod wl1251
-               rmmod board-omap3pandora-wifi
+               rmmod board-omap3pandora-wifi 2> /dev/null
        fi
 }
 
@@ -25,9 +25,10 @@ d_start() {
                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")
        fi
-       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")
+       modprobe wl1251
+       modprobe wl1251_sdio
+       # this does not exist on newer kernels
+       modprobe board-omap3pandora-wifi 2> /dev/null
 
        # find our phy index, they change every time driver module is reinserted
        # assume our interface is wlan0