Currently, we request LED labels in OpenWrt to follow the scheme modelname:color:function However, specifying the modelname at the beginning is actually entirely useless for the devices we support in OpenWrt. On the contrary, having this part actually introduces inconvenience in several aspects: - We need to ensure/check consistency with the DTS compatible - We have various exceptions where not the model name is used, but the vendor name (like tp-link), which is hard to track and justify even for core-developers - Having model-based components will not allow to share identical LED definitions in DTSI files - The inconsistency in what's used for the model part complicates several scripts, e.g. board.d/01_leds or LED migrations from ar71xx where this was even more messy Apart from our needs, upstream has deprecated the label property entirely and introduced new properties to specify color and function properties separately. However, the implementation does not appear to be ready and probably won't become ready and/or match our requirements in the foreseeable future. However, the limitation of generic LEDs to color and function properties follows the same idea pointed out above. Generic LEDs will get names like "green:status" or "red:indicator" then, and if a "devicename" is prepended, it will be the one of an internal device, like "phy1:amber:status". With this patch, we move into the same direction, and just drop the boardname from the LED labels. This allows to consolidate a few definitions in DTSI files (will be much more on ramips), and to drop a few migrations compared to ar71xx that just changed the boardname. But mainly, it will liberate us from a completely useless subject to take care of for device support review and maintenance. To also drop the boardname from existing configurations, a simple migration routine is added unconditionally. Although this seems unfamiliar at first look, a quick check in kernel for the arm/arm64 dts files revealed that while 1033 lines have labels with three parts *:*:*, still 284 actually use a two-part labelling *:*, and thus is also acceptable and not even rare there. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
394 lines
17 KiB
Bash
Executable file
394 lines
17 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
. /lib/functions/uci-defaults.sh
|
|
|
|
board_config_update
|
|
|
|
board=$(board_name)
|
|
|
|
case "$board" in
|
|
8dev,carambola2)
|
|
ucidef_set_led_netdev "lan" "LAN" "orange:eth0" "eth0"
|
|
ucidef_set_led_switch "wan" "WAN" "orange:eth1" "switch0" "0x04"
|
|
;;
|
|
alfa-network,ap121f|\
|
|
alfa-network,ap121fe|\
|
|
avm,fritz450e|\
|
|
glinet,6408|\
|
|
glinet,6416|\
|
|
glinet,gl-ar300m-lite|\
|
|
glinet,gl-ar300m16|\
|
|
pcs,cap324|\
|
|
tplink,cpe610-v1|\
|
|
tplink,cpe610-v2)
|
|
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
|
|
;;
|
|
alfa-network,n2q)
|
|
ucidef_set_led_netdev "lan2" "LAN2" "orange:lan2" "eth1"
|
|
ucidef_set_led_switch "lan1" "LAN1" "orange:lan1" "switch0" "0x10"
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "signal1" "SIGNAL1" "red:signal1" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "signal2" "SIGNAL2" "orange:signal2" "wlan0" "33" "100"
|
|
ucidef_set_led_rssi "signal3" "SIGNAL3" "green:signal3" "wlan0" "66" "100"
|
|
;;
|
|
alfa-network,n5q)
|
|
ucidef_set_led_netdev "lan2" "LAN2" "green:lan2" "eth1"
|
|
ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x10"
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "signal1" "SIGNAL1" "red:signal1" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "signal2" "SIGNAL2" "orange:signal2" "wlan0" "25" "100"
|
|
ucidef_set_led_rssi "signal3" "SIGNAL3" "green:signal3" "wlan0" "50" "100"
|
|
ucidef_set_led_rssi "signal4" "SIGNAL4" "green:signal4" "wlan0" "75" "100"
|
|
;;
|
|
alfa-network,r36a)
|
|
ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0"
|
|
ucidef_set_led_switch "wan" "WAN" "blue:wan" "switch0" "0x10"
|
|
;;
|
|
avm,fritz1750e)
|
|
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
|
|
ucidef_set_rssimon "wlan1" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "green:rssi0" "wlan1" "1" "100"
|
|
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "green:rssi1" "wlan1" "20" "100"
|
|
ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "green:rssi2" "wlan1" "40" "100"
|
|
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:rssi3" "wlan1" "60" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssi4" "wlan1" "80" "100"
|
|
;;
|
|
avm,fritz300e)
|
|
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "green:rssi0" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "green:rssi1" "wlan0" "20" "100"
|
|
ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "green:rssi2" "wlan0" "40" "100"
|
|
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:rssi3" "wlan0" "60" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssi4" "wlan0" "80" "100"
|
|
;;
|
|
avm,fritz4020|\
|
|
tplink,archer-c58-v1|\
|
|
tplink,archer-c59-v1|\
|
|
tplink,archer-c59-v2|\
|
|
tplink,archer-c60-v1|\
|
|
tplink,archer-c60-v2|\
|
|
tplink,archer-c60-v3)
|
|
ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x1e"
|
|
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
|
|
;;
|
|
avm,fritzdvbc)
|
|
ucidef_set_rssimon "wlan1" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "green:rssilow" "wlan1" "1" "100"
|
|
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "green:rssimediumlow" "wlan1" "20" "100"
|
|
ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "green:rssimedium" "wlan1" "40" "100"
|
|
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:rssimediumhigh" "wlan1" "60" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan1" "80" "100"
|
|
;;
|
|
comfast,cf-e110n-v2)
|
|
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth1"
|
|
ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x02"
|
|
ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt"
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "red:rssilow" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "red:rssimediumlow" "wlan0" "26" "100"
|
|
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:rssimediumhigh" "wlan0" "51" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan0" "76" "100"
|
|
;;
|
|
comfast,cf-e120a-v3)
|
|
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth1"
|
|
ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x04"
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "red:rssilow" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "red:rssimediumlow" "wlan0" "26" "100"
|
|
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:rssimediumhigh" "wlan0" "51" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan0" "76" "100"
|
|
;;
|
|
comfast,cf-e130n-v2)
|
|
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "red:rssilow" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "red:rssimediumlow" "wlan0" "26" "100"
|
|
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:rssimediumhigh" "wlan0" "51" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan0" "76" "100"
|
|
;;
|
|
comfast,cf-e313ac)
|
|
ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x02"
|
|
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "red:rssilow" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "red:rssimediumlow" "wlan0" "26" "100"
|
|
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:rssimediumhigh" "wlan0" "51" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan0" "76" "100"
|
|
;;
|
|
comfast,cf-e314n-v2)
|
|
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0"
|
|
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth1"
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "red:rssilow" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "red:rssimediumlow" "wlan0" "26" "100"
|
|
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:rssimediumhigh" "wlan0" "51" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan0" "76" "100"
|
|
;;
|
|
comfast,cf-e5)
|
|
ucidef_set_led_switch "lan" "LAN" "blue:lan" "switch0" "0x02"
|
|
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1"
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "blue:rssi0" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "blue:rssi1" "wlan0" "33" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "blue:rssi2" "wlan0" "66" "100"
|
|
;;
|
|
comfast,cf-e560ac)
|
|
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1"
|
|
ucidef_set_led_switch "lan1" "LAN1" "blue:lan1" "switch0" "0x02"
|
|
ucidef_set_led_switch "lan2" "LAN2" "blue:lan2" "switch0" "0x04"
|
|
ucidef_set_led_switch "lan3" "LAN3" "blue:lan3" "switch0" "0x08"
|
|
ucidef_set_led_switch "lan4" "LAN4" "blue:lan4" "switch0" "0x10"
|
|
;;
|
|
comfast,cf-ew72|\
|
|
telco,t1)
|
|
ucidef_set_led_switch "lan" "LAN" "blue:lan" "switch0" "0x02"
|
|
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1"
|
|
;;
|
|
comfast,cf-wr752ac-v1|\
|
|
engenius,ecb1750|\
|
|
enterasys,ws-ap3705i)
|
|
ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0"
|
|
;;
|
|
compex,wpj344-16m|\
|
|
compex,wpj531-16m)
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "sig1" "SIG1" "red:sig1" "wlan0" "85" "100"
|
|
ucidef_set_led_rssi "sig2" "SIG2" "yellow:sig2" "wlan0" "75" "100"
|
|
ucidef_set_led_rssi "sig3" "SIG3" "green:sig3" "wlan0" "65" "100"
|
|
ucidef_set_led_rssi "sig4" "SIG4" "green:sig4" "wlan0" "50" "100"
|
|
;;
|
|
devolo,magic-2-wifi)
|
|
ucidef_set_led_netdev "plcw" "dLAN" "white:dlan" "eth0.1" "rx"
|
|
;;
|
|
dlink,dap-1330-a1|\
|
|
dlink,dap-1365-a1)
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "red:rssilow" "wlan0" "1" "25"
|
|
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "green:rssimediumlow" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:rssimediumhigh" "wlan0" "51" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan0" "76" "100"
|
|
;;
|
|
dlink,dir-859-a1)
|
|
ucidef_set_led_switch "internet" "WAN" "green:internet" "switch0" "0x20"
|
|
;;
|
|
engenius,enh202-v1)
|
|
ucidef_set_led_switch "lan" "LAN" "amber:lan" "switch0" "0x10"
|
|
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0"
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "red:rssilow" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "amber:rssimedium" "wlan0" "33" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan0" "67" "100"
|
|
;;
|
|
engenius,ens202ext-v1)
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "red:rssilow" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "amber:rssimedium" "wlan0" "33" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan0" "67" "100"
|
|
;;
|
|
engenius,ews511ap)
|
|
ucidef_set_led_netdev "lan1" "LAN1" "blue:lan1" "eth1"
|
|
ucidef_set_led_netdev "lan2" "LAN2" "blue:lan2" "eth0"
|
|
;;
|
|
etactica,eg200)
|
|
ucidef_set_led_netdev "lan" "LAN" "red:eth0" "eth0"
|
|
ucidef_set_led_oneshot "modbus" "Modbus" "red:modbus" "100" "33"
|
|
;;
|
|
glinet,gl-mifi)
|
|
ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x02"
|
|
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
|
|
;;
|
|
glinet,gl-x750)
|
|
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
|
|
;;
|
|
hak5,lan-turtle)
|
|
ucidef_set_led_netdev "wan" "WAN" "orange:system" "eth1"
|
|
;;
|
|
meraki,mr16)
|
|
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0"
|
|
;;
|
|
netgear,wnr2200-8m|\
|
|
netgear,wnr2200-16m)
|
|
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"
|
|
;;
|
|
pcs,cr3000)
|
|
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1"
|
|
ucidef_set_led_switch "lan1" "LAN1" "blue:lan1" "switch0" "0x04"
|
|
ucidef_set_led_switch "lan2" "LAN2" "blue:lan2" "switch0" "0x08"
|
|
ucidef_set_led_switch "lan3" "LAN3" "blue:lan3" "switch0" "0x10"
|
|
ucidef_set_led_switch "lan4" "LAN4" "blue:lan4" "switch0" "0x02"
|
|
;;
|
|
qihoo,c301)
|
|
ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt"
|
|
;;
|
|
samsung,wam250)
|
|
ucidef_set_led_netdev "lan" "LAN" "white:lan" "eth0"
|
|
;;
|
|
tplink,archer-a7-v5|\
|
|
tplink,archer-c7-v4|\
|
|
tplink,archer-c7-v5)
|
|
ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x02"
|
|
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" "0x20"
|
|
;;
|
|
tplink,archer-c2-v3|\
|
|
tplink,tl-wr1043nd-v4|\
|
|
tplink,tl-wr1043n-v5)
|
|
ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x20"
|
|
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,archer-c6-v2|\
|
|
tplink,archer-c6-v2-us)
|
|
ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x3c"
|
|
ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x02"
|
|
;;
|
|
tplink,archer-c25-v1|\
|
|
tplink,tl-wr842n-v3)
|
|
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,archer-d50-v1)
|
|
ucidef_set_led_switch "lan" "LAN" "white:lan" "switch0" "0x1c"
|
|
ucidef_set_led_switch "wan_data" "WAN Data" "white:internet" "switch0" "0x02" "" "tx rx"
|
|
ucidef_set_led_switch "wan_link" "WAN Link" "white:wan" "switch0" "0x02" "" "link"
|
|
;;
|
|
tplink,archer-d7-v1|\
|
|
tplink,archer-d7b-v1)
|
|
ucidef_set_led_switch "lan" "LAN" "white:lan" "switch0" "0x3c"
|
|
;;
|
|
tplink,cpe210-v1|\
|
|
tplink,cpe220-v2|\
|
|
tplink,cpe220-v3|\
|
|
tplink,cpe510-v1|\
|
|
tplink,wbs210-v1|\
|
|
tplink,wbs210-v2|\
|
|
tplink,wbs510-v1|\
|
|
tplink,wbs510-v2)
|
|
ucidef_set_led_netdev "lan0" "LAN0" "green:lan0" "eth1"
|
|
ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x10"
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "green:link1" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "green:link2" "wlan0" "30" "100"
|
|
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:link3" "wlan0" "60" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:link4" "wlan0" "80" "100"
|
|
;;
|
|
tplink,cpe210-v2|\
|
|
tplink,cpe210-v3)
|
|
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "green:link1" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "green:link2" "wlan0" "30" "100"
|
|
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:link3" "wlan0" "60" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:link4" "wlan0" "80" "100"
|
|
;;
|
|
tplink,cpe510-v2|\
|
|
tplink,cpe510-v3)
|
|
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "green:link1" "wlan0" "1" "100" "0" "13"
|
|
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "green:link2" "wlan0" "26" "100" "-25" "13"
|
|
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:link3" "wlan0" "51" "100" "-50" "13"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:link4" "wlan0" "76" "100" "-75" "13"
|
|
;;
|
|
tplink,tl-wr902ac-v1)
|
|
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
|
|
ucidef_set_led_netdev "internet" "Internet" "green:internet" "eth0"
|
|
;;
|
|
tplink,re355-v1|\
|
|
tplink,re450-v1|\
|
|
tplink,re450-v2|\
|
|
tplink,re450-v3)
|
|
ucidef_set_led_netdev "lan_data" "LAN Data" "green:lan_data" "eth0" "tx rx"
|
|
ucidef_set_led_netdev "lan_link" "LAN Link" "green:lan_link" "eth0" "link"
|
|
;;
|
|
tplink,tl-mr6400-v1)
|
|
ucidef_set_led_switch "lan" "LAN" "white:lan" "switch0" "0x0e"
|
|
ucidef_set_led_netdev "wan" "WAN" "white:wan" "eth1"
|
|
ucidef_set_led_netdev "4g" "4G" "white:4g" "usb0"
|
|
;;
|
|
tplink,tl-wpa8630-v1|\
|
|
tplink,tl-wpa8630p-v2-eu|\
|
|
tplink,tl-wpa8630p-v2-int)
|
|
ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x3c"
|
|
;;
|
|
tplink,tl-wr842n-v2)
|
|
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"
|
|
;;
|
|
trendnet,tew-823dru)
|
|
ucidef_set_led_netdev "wan" "WAN" "green:planet" "eth0"
|
|
;;
|
|
ubnt,bullet-m-ar7240|\
|
|
ubnt,bullet-m-ar7241|\
|
|
ubnt,bullet-m-xw|\
|
|
ubnt,nanobridge-m|\
|
|
ubnt,nanostation-loco-m|\
|
|
ubnt,nanostation-loco-m-xw|\
|
|
ubnt,nanostation-m|\
|
|
ubnt,nanostation-m-xw|\
|
|
ubnt,picostation-m|\
|
|
ubnt,powerbridge-m|\
|
|
ubnt,rocket-m)
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "red:link1" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "orange:link2" "wlan0" "26" "100"
|
|
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:link3" "wlan0" "51" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:link4" "wlan0" "76" "100"
|
|
;;
|
|
ubnt,nanobeam-ac|\
|
|
ubnt,nanostation-ac|\
|
|
ubnt,powerbeam-5ac-gen2)
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "blue:rssi0" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "blue:rssi1" "wlan0" "26" "100"
|
|
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "blue:rssi2" "wlan0" "51" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "blue:rssi3" "wlan0" "76" "100"
|
|
;;
|
|
wallys,dr531)
|
|
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
|
|
ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x2"
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "sig1" "SIG1" "green:sig1" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "sig2" "SIG2" "green:sig2" "wlan0" "25" "100"
|
|
ucidef_set_led_rssi "sig3" "SIG3" "green:sig3" "wlan0" "50" "100"
|
|
ucidef_set_led_rssi "sig4" "SIG4" "green:sig4" "wlan0" "75" "100"
|
|
;;
|
|
wd,mynet-wifi-rangeextender)
|
|
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "blue:rssi-low" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "rssimedium" "RSSIMED" "blue:rssi-med" "wlan0" "33" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIMAX" "blue:rssi-max" "wlan0" "66" "100"
|
|
;;
|
|
yuncore,a770)
|
|
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
|
|
ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x10"
|
|
;;
|
|
zbtlink,zbt-wd323)
|
|
ucidef_set_led_switch "lan1" "LAN1" "orange:lan1" "switch0" "0x10"
|
|
ucidef_set_led_switch "lan2" "LAN2" "orange:lan2" "switch0" "0x08"
|
|
;;
|
|
esac
|
|
|
|
board_config_flush
|
|
|
|
exit 0
|