From f67af82cabb58b4dc135e24957c1b80fbe3b7bc8 Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Sat, 15 May 2010 22:07:10 +0300 Subject: [PATCH 1/1] wl1251-modules: restore phy0 LEDs on start --- recipes/pandora-system/wl1251-modules/rc.wl1251 | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- 2.39.2