From: Grazvydas Ignotas Date: Wed, 2 Jun 2010 21:37:37 +0000 (+0300) Subject: wl1251-modules: rc script: full unload on stop and LED hack X-Git-Tag: sz_beta3~266^2 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=openpandora.oe.git;a=commitdiff_plain;h=c1cc4459899791fa75055af9e9a1b05bd56f9473 wl1251-modules: rc script: full unload on stop and LED hack Remove board_omap3pandora_wifi when stopping to make the script restartable. Add some hackish delay so that phy* triggers appear until we register LEDs. --- diff --git a/recipes/pandora-system/wl1251-modules/rc.wl1251 b/recipes/pandora-system/wl1251-modules/rc.wl1251 index 58f51c2..5018c6b 100755 --- a/recipes/pandora-system/wl1251-modules/rc.wl1251 +++ b/recipes/pandora-system/wl1251-modules/rc.wl1251 @@ -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 fi } @@ -27,10 +27,11 @@ d_start() { 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) + # restore phyX related LED triggers (they come from mac80211.ko) + sleep 0.5 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}') + trigger=$(grep "$(basename $led)" /etc/default/leds | grep "phy" | awk '{print $2}') if [ "x$trigger" != "x" ] ; then echo "$trigger" > "$led/trigger" fi