aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/base-files/etc
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2016-01-01 21:18:38 +0000
committerJohn Crispin <blogic@openwrt.org>2016-01-01 21:18:38 +0000
commit729c6ff67429d3f5ee50d825333f6e2e6c2dcb70 (patch)
tree03742c5b7ce96194aadf78d16be3174d748d908a /target/linux/lantiq/base-files/etc
parent8eb07b4af7c259e2bc624daa8979b81f33195ffd (diff)
downloadmaster-187ad058-729c6ff67429d3f5ee50d825333f6e2e6c2dcb70.tar.gz
master-187ad058-729c6ff67429d3f5ee50d825333f6e2e6c2dcb70.tar.bz2
master-187ad058-729c6ff67429d3f5ee50d825333f6e2e6c2dcb70.zip
lantiq: use dsl led defined in DTS
dsl_control (dsl_notify.sh) is the only process which is aware of the state of the atm/ptm interface. Use the dsl led exclusive for the dsl line state. On boards which don't have a distinct internet and a dsl led, let the netdev status of the atm interface trigger the shared led. Triggering the shared led according to the status of the ppp interface isn't suitable, since the led would be switched of if the ppp connection goes down, but the line is still in sync. Signed-off-by: Mathias Kresin <openwrt@kresin.me> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48040 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/lantiq/base-files/etc')
-rwxr-xr-xtarget/linux/lantiq/base-files/etc/board.d/01_leds19
1 files changed, 11 insertions, 8 deletions
diff --git a/target/linux/lantiq/base-files/etc/board.d/01_leds b/target/linux/lantiq/base-files/etc/board.d/01_leds
index 7a25b6d36f..a95c72c3a9 100755
--- a/target/linux/lantiq/base-files/etc/board.d/01_leds
+++ b/target/linux/lantiq/base-files/etc/board.d/01_leds
@@ -12,14 +12,21 @@ board_config_update
[ -n "$(lantiq_is_dt_led_chosen wifi)" ] && ucidef_set_led_wlan "wifi" "wifi" "$(lantiq_get_dt_led_chosen wifi)" "phy0tpt"
[ -n "$(lantiq_is_dt_led_chosen usb)" ] && ucidef_set_led_usbdev "usb" "usb" "$(lantiq_get_dt_led_chosen usb)" "1-1"
[ -n "$(lantiq_is_dt_led_chosen usb2)" ] && ucidef_set_led_usbdev "usb2" "usb2" "$(lantiq_get_dt_led_chosen usb2)" "2-1"
-[ -n "$(lantiq_is_dt_led_chosen internet)" ] && ucidef_set_led_netdev "internet" "internet" "$(lantiq_get_dt_led_chosen internet)" "pppoe-wan"
+
+[ -n "$(lantiq_is_dt_led_chosen internet)" ] && {
+ interface="nas0"
+
+ [ -n "$(lantiq_is_dt_led_chosen dsl)" ] && {
+ interface="pppoe-wan"
+ ucidef_set_led_default "dsl" "dsl" "$(lantiq_get_dt_led_chosen dsl)" "0"
+ }
+
+ ucidef_set_led_netdev "internet" "internet" "$(lantiq_get_dt_led_chosen internet)" "$interface"
+}
board=$(lantiq_board_name)
case "$board" in
-VG3503J)
- ucidef_set_led_netdev "vdsl" "vdsl" "bt:green:dsl" "ptm0"
- ;;
BTHOMEHUBV2B)
ucidef_set_led_default "power" "power" "soc:blue:power" "1"
;;
@@ -34,19 +41,16 @@ VGV7510KW22)
ucidef_set_led_default "power" "power" "power" "1"
ucidef_set_led_default "power2" "power2" "power2" "0"
ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0radio"
- ucidef_set_led_netdev "dsl" "dsl" "dsl" "nas0"
;;
VGV7519)
ucidef_set_led_default "power" "power" "power" "0"
ucidef_set_led_default "power2" "power2" "power2" "1"
ucidef_set_led_wlan "wifi" "wifi" "wireless_yellow" "phy0radio"
- ucidef_set_led_netdev "broadband_yellow" "broadband_yellow" "broadband_yellow" "nas0"
;;
P2812HNUF*)
ucidef_set_led_default "power" "power" "power" "0"
ucidef_set_led_default "power2" "power2" "power2" "1"
ucidef_set_led_wlan "wifi" "wifi" "wireless_green" "phy0radio"
- ucidef_set_led_netdev "dsl" "dsl" "dsl" "nas0"
;;
ARV7519RW22)
ucidef_set_led_default "power" "power" "power" "1"
@@ -55,7 +59,6 @@ ARV7519RW22)
ARV8539PW22)
ucidef_set_led_default "power" "power" "soc:green:power" "1"
ucidef_set_led_default "power2" "power2" "soc:red:power" "0"
- ucidef_set_led_netdev "dsl" "dsl" "soc:green:dsl" "nas0"
;;
*)
;;