From 84a35dc90c04f2e571d00f72550fde4180b4f46e Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Sun, 27 Sep 2020 23:20:23 +0200 Subject: [PATCH] ramips: remove option to set WiFi LED via aliases In ramips, it's not common to use an alias for specifying the WiFi LED; actually only one device uses this mechanism (TL-WR841N v14). Particularly since the WiFi LEDs are typically distinguished between 2.4G and 5G etc. it is also not very useful for this target. Thus, this patch removes the setup lines for this mechanism and converts the TL-WR841N v14 to the normal setup. Signed-off-by: Adrian Schmutzler Signed-off-by: maurerr --- .../linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts | 2 -- .../linux/ramips/mt7620/base-files/etc/board.d/01_leds | 3 --- .../linux/ramips/mt7621/base-files/etc/board.d/01_leds | 3 --- .../linux/ramips/mt76x8/base-files/etc/board.d/01_leds | 9 +++++---- .../linux/ramips/rt288x/base-files/etc/board.d/01_leds | 3 --- .../linux/ramips/rt305x/base-files/etc/board.d/01_leds | 3 --- .../linux/ramips/rt3883/base-files/etc/board.d/01_leds | 3 --- 7 files changed, 5 insertions(+), 21 deletions(-) diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts index 530b8c5681e..a1a83bf2377 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts @@ -13,8 +13,6 @@ led-boot = &led_wlan; led-failsafe = &led_wlan; led-upgrade = &led_wlan; - - led-wlan = &led_wlan; }; chosen { diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds index 519d643a8c1..acd3bfdb0a9 100755 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds @@ -11,9 +11,6 @@ board=$(board_name) board_config_update -led_wlan="$(get_dt_led wlan)" -[ -n "$led_wlan" ] && ucidef_set_led_wlan "wifi_led" "wifi" "$led_wlan" "phy0tpt" - case $board in aigale,ai-br100) ucidef_set_led_netdev "wan" "wan" "blue:wan" "eth0.2" diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds index 052b4ed5bb2..8cd50583540 100755 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds @@ -11,9 +11,6 @@ board=$(board_name) board_config_update -led_wlan="$(get_dt_led wlan)" -[ -n "$led_wlan" ] && ucidef_set_led_wlan "wifi_led" "wifi" "$led_wlan" "phy0tpt" - case $board in d-team,newifi-d2) ucidef_set_led_netdev "internet" "internet" "amber:internet" "wan" diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds b/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds index 3108688da37..befb4a78e8f 100755 --- a/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds @@ -11,9 +11,6 @@ board=$(board_name) board_config_update -led_wlan="$(get_dt_led wlan)" -[ -n "$led_wlan" ] && ucidef_set_led_wlan "wifi_led" "wifi" "$led_wlan" "phy0tpt" - case $board in alfa-network,awusfree1) set_wifi_led "blue:wlan" @@ -56,7 +53,6 @@ tama,w06) ;; tplink,archer-c20-v4|\ tplink,archer-c20-v5|\ -tplink,tl-wr841n-v14|\ tplink,tl-wr850n-v2) ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x1e" ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x01" @@ -90,6 +86,11 @@ tplink,tl-wr841n-v13) ucidef_set_led_switch "lan4" "lan4" "green:lan4" "switch0" "0x10" ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x01" ;; +tplink,tl-wr841n-v14) + ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x1e" + ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x01" + ucidef_set_led_wlan "wifi_led" "wifi" "green:wlan" "phy0tpt" + ;; tplink,tl-wr902ac-v3) ucidef_set_led_wlan "wlan2g" "wlan2g" "green:wlan" "phy0tpt" ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x10" diff --git a/target/linux/ramips/rt288x/base-files/etc/board.d/01_leds b/target/linux/ramips/rt288x/base-files/etc/board.d/01_leds index 2a3cf53c99f..a3dbd52d4cd 100755 --- a/target/linux/ramips/rt288x/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/rt288x/base-files/etc/board.d/01_leds @@ -11,9 +11,6 @@ board=$(board_name) board_config_update -led_wlan="$(get_dt_led wlan)" -[ -n "$led_wlan" ] && ucidef_set_led_wlan "wifi_led" "wifi" "$led_wlan" "phy0tpt" - case $board in airlink101,ar670w|\ airlink101,ar725w) diff --git a/target/linux/ramips/rt305x/base-files/etc/board.d/01_leds b/target/linux/ramips/rt305x/base-files/etc/board.d/01_leds index 3f6b70341c5..449f003df16 100755 --- a/target/linux/ramips/rt305x/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/rt305x/base-files/etc/board.d/01_leds @@ -11,9 +11,6 @@ board=$(board_name) board_config_update -led_wlan="$(get_dt_led wlan)" -[ -n "$led_wlan" ] && ucidef_set_led_wlan "wifi_led" "wifi" "$led_wlan" "phy0tpt" - case $board in 7links,px-4885-4m|\ 7links,px-4885-8m|\ diff --git a/target/linux/ramips/rt3883/base-files/etc/board.d/01_leds b/target/linux/ramips/rt3883/base-files/etc/board.d/01_leds index d06d47336ba..5ac38f0f508 100755 --- a/target/linux/ramips/rt3883/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/rt3883/base-files/etc/board.d/01_leds @@ -11,9 +11,6 @@ board=$(board_name) board_config_update -led_wlan="$(get_dt_led wlan)" -[ -n "$led_wlan" ] && ucidef_set_led_wlan "wifi_led" "wifi" "$led_wlan" "phy0tpt" - case $board in belkin,f9k1109v1) ucidef_set_led_netdev "lan" "lan" "blue:wps" "eth0"