aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/base-files
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2017-06-14 20:17:16 +0200
committerMathias Kresin <dev@kresin.me>2017-06-17 15:38:18 +0200
commit259fc1e77892ef8b7fb41c5bc118b55e31e0554b (patch)
tree0812695c725298d463deb92e8efba71087e9d8f1 /target/linux/lantiq/base-files
parent03776d813c66c7d74850eb9f321030af09adcb75 (diff)
downloadupstream-259fc1e77892ef8b7fb41c5bc118b55e31e0554b.tar.gz
upstream-259fc1e77892ef8b7fb41c5bc118b55e31e0554b.tar.bz2
upstream-259fc1e77892ef8b7fb41c5bc118b55e31e0554b.zip
lantiq: show xdsl line init status on shared dsl/internet led
On boards which don't have a distinct internet and dsl led, use the shared LED to indicate the xdsl line state and any traffic that is send/received via the netdev. This traffic doesn't necessarily need to be internet traffic. Rename the shared LED of existing configs to "dsl", to match the new defaults. The configuration of the to be renamed LED is identical with the new defaults. Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux/lantiq/base-files')
-rwxr-xr-xtarget/linux/lantiq/base-files/etc/board.d/01_leds16
-rw-r--r--target/linux/lantiq/base-files/etc/uci-defaults/01_led_migration27
2 files changed, 35 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 b6461f9e9a..634f479789 100755
--- a/target/linux/lantiq/base-files/etc/board.d/01_leds
+++ b/target/linux/lantiq/base-files/etc/board.d/01_leds
@@ -18,18 +18,18 @@ led_usb="$(lantiq_get_dt_led usb)"
led_usb2="$(lantiq_get_dt_led usb2)"
[ -n "$led_usb2" ] && ucidef_set_led_usbdev "usb2" "usb2" "$led_usb2" "2-1"
-led_internet="$(lantiq_get_dt_led internet)"
-[ -n "$led_internet" ] && {
+led_dsl="$(lantiq_get_dt_led dsl)"
+[ -n "$led_dsl" ] && {
interface="nas0"
lantiq_is_vdsl_system && interface="ptm0"
- led_dsl="$(lantiq_get_dt_led dsl)"
- [ -n "$led_dsl" ] && {
- interface="pppoe-wan"
+ led_internet="$(lantiq_get_dt_led internet)"
+ if [ -n "$led_internet" ]; then
ucidef_set_led_default "dsl" "dsl" "$led_dsl" "0"
- }
-
- ucidef_set_led_netdev "internet" "internet" "$led_internet" "$interface"
+ ucidef_set_led_netdev "internet" "internet" "$led_internet" "pppoe-wan"
+ else
+ ucidef_set_led_netdev "dsl" "dsl" "$led_dsl" "$interface"
+ fi
}
board=$(board_name)
diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/01_led_migration b/target/linux/lantiq/base-files/etc/uci-defaults/01_led_migration
index 130694a62b..6ff4355853 100644
--- a/target/linux/lantiq/base-files/etc/uci-defaults/01_led_migration
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/01_led_migration
@@ -35,6 +35,20 @@ do_led_update_sysfs()
done;
}
+do_internet_led_rename()
+{
+ config_load system
+
+ [ -n $(config_get led_internet name) ] || return
+ [ -z $(config_get led_dsl name) ] || return
+
+ uci rename system.led_internet=led_dsl
+ uci set system.led_dsl.name=dsl
+
+ LED_OPTIONS_CHANGED=1
+ logger -t led-migration "internet led renamed to dsl"
+}
+
migrate_leds()
{
config_load system
@@ -42,6 +56,19 @@ migrate_leds()
}
case "$(board_name)" in
+ARV452CQW|\
+ARV7510PW22|\
+ARV7519RW22|\
+ARV752DPW|\
+ARV752DPW22|\
+ASL56026|\
+BTHOMEHUBV2B|\
+BTHOMEHUBV3A|\
+BTHOMEHUBV5A|\
+FRTZ7360SL|\
+VG3503J)
+ do_internet_led_rename
+ ;;
DGN3500*)
migrate_leds "dgn3500:blue:wireless=dgn3500:green:wireless"
;;