aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/rt288x
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-09-27 23:35:11 +0200
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-10-02 14:51:57 +0200
commit2230fe39229364f71b982acebedab0579f8b4165 (patch)
treecd2ba296872a224970207ba37771f4d35db8120e /target/linux/ramips/rt288x
parented5933beb632cd29869b81c04d7fa937a27d1a2f (diff)
downloadupstream-2230fe39229364f71b982acebedab0579f8b4165.tar.gz
upstream-2230fe39229364f71b982acebedab0579f8b4165.tar.bz2
upstream-2230fe39229364f71b982acebedab0579f8b4165.zip
ramips: remove set_wifi_led function in 01_leds
While we mostly use the ucidef_set_led_* functions directly in 01_leds we still have the set_wifi_led function in parallel for several old devices. This is not only inconsistent with the other definitions, it also links to the wlan0 interface instead of using a phy trigger which would be independent of the interface name (and is used for all newer devices anyway). Apart from that, the standard names "wifi" and "wifi-led" are not very helpful in a world with different radio bands either. Thus, this patch removes the set_wifi_led function and puts the relevant commands into the cases explicitly. This makes the mechanism used more evident and will hopefully lead to some future improvements or at least prevent some copy-pasting of the old setups. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/ramips/rt288x')
-rwxr-xr-xtarget/linux/ramips/rt288x/base-files/etc/board.d/01_leds10
1 files changed, 3 insertions, 7 deletions
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 a3dbd52d4c..b62ad76110 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
@@ -3,10 +3,6 @@
. /lib/functions/leds.sh
. /lib/functions/uci-defaults.sh
-set_wifi_led() {
- ucidef_set_led_netdev "wifi_led" "wifi" "${1}" "${2:-wlan0}"
-}
-
board=$(board_name)
board_config_update
@@ -14,13 +10,13 @@ board_config_update
case $board in
airlink101,ar670w|\
airlink101,ar725w)
- set_wifi_led "rt2800soc-phy0::radio"
+ ucidef_set_led_netdev "wifi_led" "wifi" "rt2800soc-phy0::radio" "wlan0"
;;
belkin,f5d8235-v1)
- set_wifi_led "blue:wireless"
+ ucidef_set_led_netdev "wifi_led" "wifi" "blue:wireless" "wlan0"
;;
ralink,v11st-fe)
- set_wifi_led "rt2800pci-phy0::radio"
+ ucidef_set_led_netdev "wifi_led" "wifi" "rt2800pci-phy0::radio" "wlan0"
;;
esac