From 6cdf828bd48875b2ee45554cfe0fedc174c5d5b5 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 --- .../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 228e926624..caf845b3fb 100644 --- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts +++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts @@ -14,8 +14,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 f352c780fb..81725904d7 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 d023a9dc2d..dfc88b18f9 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 @@ -13,9 +13,6 @@ boardname="${board##*,}" 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_switch "internet" "internet" "amber:internet" "switch0" "0x10" 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 58af7977b2..f6b1ab9d15 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" @@ -91,6 +87,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 2a3cf53c99..a3dbd52d4c 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 3f6b70341c..449f003df1 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 d06d47336b..5ac38f0f50 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"