diff options
author | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-10-01 21:15:47 +0200 |
---|---|---|
committer | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-10-07 01:31:37 +0200 |
commit | ad90a42e48756e2de27a1ebad942fd18e9411713 (patch) | |
tree | fcdc47665d91d99ed75610b1bc41a6338446f20e /target/linux/ipq40xx/base-files | |
parent | 582ba9ddc789629a53969e5c66e19dfa183f2696 (diff) | |
download | upstream-ad90a42e48756e2de27a1ebad942fd18e9411713.tar.gz upstream-ad90a42e48756e2de27a1ebad942fd18e9411713.tar.bz2 upstream-ad90a42e48756e2de27a1ebad942fd18e9411713.zip |
ipq40xx: remove model name from LED labels
Like in the previous patches for ath79 and ramips, this will remove
the "devicename" from LED labels in ipq40xx.
The devicename is removed in DTS files and 01_leds, and a migration
script is added. While at it, also harmonize capitalization of
wlan2G/wlan5G vs. wlan2g/wlan5g.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/ipq40xx/base-files')
-rwxr-xr-x | target/linux/ipq40xx/base-files/etc/board.d/01_leds | 68 | ||||
-rw-r--r-- | target/linux/ipq40xx/base-files/etc/uci-defaults/04_led_migration | 19 |
2 files changed, 51 insertions, 36 deletions
diff --git a/target/linux/ipq40xx/base-files/etc/board.d/01_leds b/target/linux/ipq40xx/base-files/etc/board.d/01_leds index e8e67af3a9..8a87b68532 100755 --- a/target/linux/ipq40xx/base-files/etc/board.d/01_leds +++ b/target/linux/ipq40xx/base-files/etc/board.d/01_leds @@ -8,68 +8,64 @@ board_config_update board=$(board_name) -boardname="${board##*,}" case "$board" in alfa-network,ap120c-ac) - ucidef_set_led_netdev "wan" "WAN" "${boardname}:amber:wan" "eth1" + ucidef_set_led_netdev "wan" "WAN" "amber:wan" "eth1" ;; asus,rt-ac58u) - ucidef_set_led_netdev "wan" "WAN" "${boardname}:blue:wan" "eth1" - ucidef_set_led_switch "lan" "LAN" "${boardname}:blue:lan" "switch0" "0x1e" + ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1" + ucidef_set_led_switch "lan" "LAN" "blue:lan" "switch0" "0x1e" ;; avm,fritzbox-4040) - ucidef_set_led_wlan "wlan" "WLAN" "fritz4040:green:wlan" "phy0tpt" "phy1tpt" - ucidef_set_led_netdev "wan" "WAN" "fritz4040:green:wan" "eth1" - ucidef_set_led_switch "lan" "LAN" "fritz4040:green:lan" "switch0" "0x1e" + ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt" "phy1tpt" + ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1" + ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x1e" ;; avm,fritzbox-7530 |\ glinet,gl-b1300) - ucidef_set_led_wlan "wlan" "WLAN" "${boardname}:green:wlan" "phy0tpt" + ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt" + ;; +edgecore,ecw5211 |\ +zyxel,nbg6617 |\ +zyxel,wre6606) + ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wlan2g" "phy0tpt" + ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wlan5g" "phy1tpt" ;; edgecore,oap100) - ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:blue:wlan2g" "phy0tpt" - ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:blue:wlan5g" "phy1tpt" + ucidef_set_led_wlan "wlan2g" "WLAN2G" "blue:wlan2g" "phy0tpt" + ucidef_set_led_wlan "wlan5g" "WLAN5G" "blue:wlan5g" "phy1tpt" ;; engenius,eap1300) - ucidef_set_led_netdev "lan" "LAN" "${boardname}:blue:lan" "eth0" - ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:blue:wlan2g" "phy0tpt" - ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:yellow:wlan5g" "phy1tpt" - ucidef_set_led_default "mesh" "MESH" "${boardname}:blue:mesh" "0" + ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0" + ucidef_set_led_wlan "wlan2g" "WLAN2G" "blue:wlan2g" "phy0tpt" + ucidef_set_led_wlan "wlan5g" "WLAN5G" "yellow:wlan5g" "phy1tpt" + ucidef_set_led_default "mesh" "MESH" "blue:mesh" "0" ;; engenius,eap2200) - ucidef_set_led_netdev "lan1" "LAN1" "${boardname}:blue:lan1" "eth0" - ucidef_set_led_netdev "lan2" "LAN2" "${boardname}:blue:lan2" "eth1" + ucidef_set_led_netdev "lan1" "LAN1" "blue:lan1" "eth0" + ucidef_set_led_netdev "lan2" "LAN2" "blue:lan2" "eth1" ;; engenius,ens620ext) - ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2G" "phy0tpt" - ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5G" "phy1tpt" - ucidef_set_led_netdev "lan1" "LAN1" "${boardname}:green:lan1" "eth0" - ucidef_set_led_netdev "lan2" "LAN2" "${boardname}:green:lan2" "eth1" + ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wlan2g" "phy0tpt" + ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wlan5g" "phy1tpt" + ucidef_set_led_netdev "lan1" "LAN1" "green:lan1" "eth0" + ucidef_set_led_netdev "lan2" "LAN2" "green:lan2" "eth1" ;; mobipromo,cm520-79f) - ucidef_set_led_netdev "wan" "WAN" "${boardname}:blue:wan" "eth1" - ucidef_set_led_switch "lan1" "LAN1" "${boardname}:blue:lan1" "switch0" "0x10" - ucidef_set_led_switch "lan2" "LAN2" "${boardname}:blue:lan2" "switch0" "0x08" + ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1" + ucidef_set_led_switch "lan1" "LAN1" "blue:lan1" "switch0" "0x10" + ucidef_set_led_switch "lan2" "LAN2" "blue:lan2" "switch0" "0x08" ;; netgear,ex6100v2 |\ netgear,ex6150v2) - ucidef_set_led_wlan "wlan2g" "WLAN2G" "ex61x0v2:green:router" "phy0tpt" - ucidef_set_led_wlan "wlan5g" "WLAN5G" "ex61x0v2:green:client" "phy1tpt" + ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:router" "phy0tpt" + ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:client" "phy1tpt" ;; qxwlan,e2600ac-c1 |\ qxwlan,e2600ac-c2) - ucidef_set_led_wlan "wlan2g" "WLAN0" "e2600ac:green:wlan0" "phy0tpt" - ucidef_set_led_wlan "wlan5g" "WLAN1" "e2600ac:green:wlan1" "phy1tpt" - ;; -zyxel,nbg6617) - ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2G" "phy0tpt" - ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5G" "phy1tpt" - ;; -edgecore,ecw5211 |\ -zyxel,wre6606) - ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2g" "phy0tpt" - ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5g" "phy1tpt" + ucidef_set_led_wlan "wlan2g" "WLAN0" "green:wlan0" "phy0tpt" + ucidef_set_led_wlan "wlan5g" "WLAN1" "green:wlan1" "phy1tpt" ;; esac diff --git a/target/linux/ipq40xx/base-files/etc/uci-defaults/04_led_migration b/target/linux/ipq40xx/base-files/etc/uci-defaults/04_led_migration new file mode 100644 index 0000000000..c4f82b35dc --- /dev/null +++ b/target/linux/ipq40xx/base-files/etc/uci-defaults/04_led_migration @@ -0,0 +1,19 @@ +. /lib/functions/migrations.sh + +board=$(board_name) + +case "$board" in +engenius,emr3500) + migrate_leds "emr3500:=" + ;; +engenius,ens620ext|\ +zyxel,nbg6617) + migrate_leds ":wlan2G=:wlan2g" ":wlan5G=:wlan5g" + ;; +esac + +remove_devicename_leds + +migrations_apply system + +exit 0 |