diff options
Diffstat (limited to 'target/linux/ath79/tiny')
-rwxr-xr-x | target/linux/ath79/tiny/base-files/etc/board.d/01_leds | 109 | ||||
-rw-r--r-- | target/linux/ath79/tiny/base-files/etc/uci-defaults/04_led_migration | 8 |
2 files changed, 51 insertions, 66 deletions
diff --git a/target/linux/ath79/tiny/base-files/etc/board.d/01_leds b/target/linux/ath79/tiny/base-files/etc/board.d/01_leds index bc0b15bba5..26926b6f64 100755 --- a/target/linux/ath79/tiny/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/tiny/base-files/etc/board.d/01_leds @@ -5,40 +5,39 @@ board_config_update board=$(board_name) -boardname="${board##*,}" case "$board" in -buffalo,whr-g301n) - ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth0" - ucidef_set_led_switch "lan1" "LAN1" "$boardname:green:lan1" "switch0" "0x02" - ucidef_set_led_switch "lan2" "LAN2" "$boardname:green:lan2" "switch0" "0x04" - ucidef_set_led_switch "lan3" "LAN3" "$boardname:green:lan3" "switch0" "0x08" - ucidef_set_led_switch "lan4" "LAN4" "$boardname:green:lan4" "switch0" "0x10" - ;; -dlink,dir-615-e4) - ucidef_set_led_netdev "wan" "WAN" "d-link:green:wan" "eth0" - ucidef_set_led_switch "lan1" "LAN1" "d-link:green:lan1" "switch0" "0x02" - ucidef_set_led_switch "lan2" "LAN2" "d-link:green:lan2" "switch0" "0x04" - ucidef_set_led_switch "lan3" "LAN3" "d-link:green:lan3" "switch0" "0x08" - ucidef_set_led_switch "lan4" "LAN4" "d-link:green:lan4" "switch0" "0x10" +buffalo,whr-g301n|\ +dlink,dir-615-e4|\ +tplink,tl-wr740n-v1|\ +tplink,tl-wr740n-v3|\ +tplink,tl-wr741-v1|\ +tplink,tl-wr743nd-v1|\ +tplink,tl-wr841-v5|\ +tplink,tl-wr941-v4) + ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0" + ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x02" + ucidef_set_led_switch "lan2" "LAN2" "green:lan2" "switch0" "0x04" + ucidef_set_led_switch "lan3" "LAN3" "green:lan3" "switch0" "0x08" + ucidef_set_led_switch "lan4" "LAN4" "green:lan4" "switch0" "0x10" ;; netgear,wnr1000-v2|\ netgear,wnr2000-v3) - ucidef_set_led_netdev "wan-amber" "WAN (amber)" "netgear:amber:wan" "eth0" - ucidef_set_led_switch "lan1green" "LAN1 (green)" "netgear:green:lan1" "switch0" "0x02" "0x04" - ucidef_set_led_switch "lan2green" "LAN2 (green)" "netgear:green:lan2" "switch0" "0x04" "0x04" - ucidef_set_led_switch "lan3green" "LAN3 (green)" "netgear:green:lan3" "switch0" "0x08" "0x04" - ucidef_set_led_switch "lan4green" "LAN4 (green)" "netgear:green:lan4" "switch0" "0x10" "0x04" - ucidef_set_led_switch "lan1amber" "LAN1 (amber)" "netgear:amber:lan1" "switch0" "0x02" "0x02" - ucidef_set_led_switch "lan2amber" "LAN2 (amber)" "netgear:amber:lan2" "switch0" "0x04" "0x02" - ucidef_set_led_switch "lan3amber" "LAN3 (amber)" "netgear:amber:lan3" "switch0" "0x08" "0x02" - ucidef_set_led_switch "lan4amber" "LAN4 (amber)" "netgear:amber:lan4" "switch0" "0x10" "0x02" + ucidef_set_led_netdev "wan-amber" "WAN (amber)" "amber:wan" "eth0" + ucidef_set_led_switch "lan1green" "LAN1 (green)" "green:lan1" "switch0" "0x02" "0x04" + ucidef_set_led_switch "lan2green" "LAN2 (green)" "green:lan2" "switch0" "0x04" "0x04" + ucidef_set_led_switch "lan3green" "LAN3 (green)" "green:lan3" "switch0" "0x08" "0x04" + ucidef_set_led_switch "lan4green" "LAN4 (green)" "green:lan4" "switch0" "0x10" "0x04" + ucidef_set_led_switch "lan1amber" "LAN1 (amber)" "amber:lan1" "switch0" "0x02" "0x02" + ucidef_set_led_switch "lan2amber" "LAN2 (amber)" "amber:lan2" "switch0" "0x04" "0x02" + ucidef_set_led_switch "lan3amber" "LAN3 (amber)" "amber:lan3" "switch0" "0x08" "0x02" + ucidef_set_led_switch "lan4amber" "LAN4 (amber)" "amber:lan4" "switch0" "0x10" "0x02" ;; netgear,wnr612-v2|\ on,n150r) - ucidef_set_led_netdev "wan" "WAN" "netgear:green:wan" "eth0" - ucidef_set_led_switch "lan1" "LAN1" "netgear:green:lan1" "switch0" "0x02" "0x0f" - ucidef_set_led_switch "lan2" "LAN2" "netgear:green:lan2" "switch0" "0x04" "0x0f" + ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0" + ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x02" "0x0f" + ucidef_set_led_switch "lan2" "LAN2" "green:lan2" "switch0" "0x04" "0x0f" ;; tplink,tl-mr3020-v1|\ tplink,tl-mr3040-v2|\ @@ -53,63 +52,51 @@ tplink,tl-wa901nd-v1|\ tplink,tl-wa901nd-v3|\ tplink,tl-wa901nd-v4|\ tplink,tl-wa901nd-v5) - ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0" + ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0" ;; tplink,tl-mr3420-v2|\ tplink,tl-wr740n-v4|\ tplink,tl-wr740n-v5|\ tplink,tl-wr741nd-v4|\ tplink,tl-wr841-v8) - ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth1" - ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x04" - ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08" - ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x10" - ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02" + ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1" + ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x04" + ucidef_set_led_switch "lan2" "LAN2" "green:lan2" "switch0" "0x08" + ucidef_set_led_switch "lan3" "LAN3" "green:lan3" "switch0" "0x10" + ucidef_set_led_switch "lan4" "LAN4" "green:lan4" "switch0" "0x02" ;; tplink,tl-mr3420-v3|\ tplink,tl-wr841-v9|\ tplink,tl-wr841-v10|\ tplink,tl-wr841-v11|\ tplink,tl-wr841-v12) - ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth1" - ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10" - ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08" - ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x04" - ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02" + ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1" + ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x10" + ucidef_set_led_switch "lan2" "LAN2" "green:lan2" "switch0" "0x08" + ucidef_set_led_switch "lan3" "LAN3" "green:lan3" "switch0" "0x04" + ucidef_set_led_switch "lan4" "LAN4" "green:lan4" "switch0" "0x02" ;; tplink,tl-wa850re-v1|\ tplink,tl-wa850re-v2) - ucidef_set_led_netdev "lan" "LAN" "tp-link:blue:lan" "eth0" + ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0" ucidef_set_rssimon "wlan0" "200000" "1" - ucidef_set_led_rssi "rssilow" "RSSILOW" "tp-link:blue:signal1" "wlan0" "1" "100" - ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "tp-link:blue:signal2" "wlan0" "20" "100" - ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "tp-link:blue:signal3" "wlan0" "40" "100" - ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "tp-link:blue:signal4" "wlan0" "60" "100" - ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:blue:signal5" "wlan0" "80" "100" - ;; -tplink,tl-wr740n-v1|\ -tplink,tl-wr740n-v3|\ -tplink,tl-wr741-v1|\ -tplink,tl-wr743nd-v1|\ -tplink,tl-wr841-v5|\ -tplink,tl-wr941-v4) - ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth0" - ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x02" - ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x04" - ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x08" - ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x10" + ucidef_set_led_rssi "rssilow" "RSSILOW" "blue:signal1" "wlan0" "1" "100" + ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "blue:signal2" "wlan0" "20" "100" + ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "blue:signal3" "wlan0" "40" "100" + ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "blue:signal4" "wlan0" "60" "100" + ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "blue:signal5" "wlan0" "80" "100" ;; tplink,tl-wr940n-v3|\ tplink,tl-wr940n-v4|\ tplink,tl-wr941nd-v6) - ucidef_set_led_netdev "wan" "WAN" "tp-link:blue:wan" "eth1" - ucidef_set_led_switch "lan1" "LAN1" "tp-link:blue:lan1" "switch0" "0x10" - ucidef_set_led_switch "lan2" "LAN2" "tp-link:blue:lan2" "switch0" "0x08" - ucidef_set_led_switch "lan3" "LAN3" "tp-link:blue:lan3" "switch0" "0x04" - ucidef_set_led_switch "lan4" "LAN4" "tp-link:blue:lan4" "switch0" "0x02" + 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" + ucidef_set_led_switch "lan3" "LAN3" "blue:lan3" "switch0" "0x04" + ucidef_set_led_switch "lan4" "LAN4" "blue:lan4" "switch0" "0x02" ;; tplink,tl-wr940n-v6) - ucidef_set_led_netdev "wan" "WAN" "tp-link:blue:wan" "eth1" + ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1" ;; esac diff --git a/target/linux/ath79/tiny/base-files/etc/uci-defaults/04_led_migration b/target/linux/ath79/tiny/base-files/etc/uci-defaults/04_led_migration index 377135f530..9850ed2293 100644 --- a/target/linux/ath79/tiny/base-files/etc/uci-defaults/04_led_migration +++ b/target/linux/ath79/tiny/base-files/etc/uci-defaults/04_led_migration @@ -2,17 +2,15 @@ . /lib/functions/migrations.sh board=$(board_name) -boardonly="${board##*,}" case "$board" in tplink,tl-wr802n-v1) - migrate_leds ":blue:=:green:" - ;; -tplink,tl-wr802n-v2) - migrate_leds "^$boardonly:=tp-link:" + migrate_leds "blue:=green:" ;; esac +remove_devicename_leds + migrations_apply system exit 0 |