From: Grazvydas Ignotas Date: Sat, 15 May 2010 19:07:10 +0000 (+0300) Subject: wl1251-modules: restore phy0 LEDs on start X-Git-Tag: Release-2010-05/1~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f67af82cabb58b4dc135e24957c1b80fbe3b7bc8;p=openpandora.oe.git wl1251-modules: restore phy0 LEDs on start --- diff --git a/recipes/pandora-system/wl1251-modules/rc.wl1251 b/recipes/pandora-system/wl1251-modules/rc.wl1251 index 7018f49..58f51c2 100755 --- a/recipes/pandora-system/wl1251-modules/rc.wl1251 +++ b/recipes/pandora-system/wl1251-modules/rc.wl1251 @@ -26,6 +26,16 @@ d_start() { 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