ar71xx: ubnt-(xm,xw): fix LED RSSI indication
[openwrt/openwrt.git] / target / linux / ar71xx / base-files / etc / board.d / 01_leds
index 1b308d7f77c0689fbcd05050ebab0a6fe2bc64ac..170adaa7a22d1476cc269574f2b8b0c226a350f5 100755 (executable)
@@ -66,7 +66,8 @@ cpe830|\
 cpe870|\
 dr531|\
 e600g-v2|\
-e600gac-v2)
+e600gac-v2|\
+e750a-v4)
        ucidef_set_led_netdev "lan" "LAN" "$board:green:lan" "eth0"
        ucidef_set_led_netdev "wan" "WAN" "$board:green:wan" "eth1"
 
@@ -128,19 +129,23 @@ archer-c7)
        ;;
 archer-c58-v1|\
 archer-c59-v1|\
-archer-c60-v1)
+archer-c59-v2|\
+archer-c60-v1|\
+archer-c60-v2)
        ucidef_set_led_switch "lan" "LAN" "$board:green:lan" "switch0" "0x1E"
        ucidef_set_led_netdev "wan" "WAN" "$board:green:wan" "eth0"
        ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan2g" "phy1tpt"
        ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:green:wlan5g" "phy0tpt"
 
        case "$board" in
-       archer-c59-v1)
+       archer-c59-v1|\
+       archer-c59-v2)
                ucidef_set_led_usbdev "usb" "USB" "$board:green:usb" "1-1"
                ;;
        esac
        ;;
-archer-c7-v4)
+archer-c7-v4|\
+archer-c7-v5)
        ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan2g" "phy1tpt"
        ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:green:wlan5g" "phy0tpt"
        ucidef_set_led_switch "wan" "WAN" "$board:green:wan" "switch0" "0x02"
@@ -148,8 +153,19 @@ archer-c7-v4)
        ucidef_set_led_switch "lan2" "LAN2" "$board:green:lan3" "switch0" "0x08"
        ucidef_set_led_switch "lan3" "LAN3" "$board:green:lan2" "switch0" "0x10"
        ucidef_set_led_switch "lan4" "LAN4" "$board:green:lan1" "switch0" "0x20"
-       ucidef_set_led_usbdev "usb1" "USB1" "$board:green:usb1" "1-1"
-       ucidef_set_led_usbdev "usb2" "USB2" "$board:green:usb2" "2-1"
+
+       case "$board" in
+       archer-c7-v4)
+               ucidef_set_led_usbdev "usb1" "USB1" "$board:green:usb1" "1-1"
+               ucidef_set_led_usbdev "usb2" "USB2" "$board:green:usb2" "2-1"
+               ;;
+       esac
+
+       case "$board" in
+       archer-c7-v5)
+               ucidef_set_led_usbdev "usb" "USB" "$board:green:usb" "1-1"
+               ;;
+       esac
        ;;
 arduino-yun)
        ucidef_set_led_wlan "wlan" "WLAN" "arduino:blue:wlan" "phy0tpt"
@@ -168,10 +184,11 @@ nanostation-m|\
 nanostation-m-xw|\
 rocket-m|\
 rocket-m-xw)
-       ucidef_set_led_rssi "rssilow" "RSSILOW" "ubnt:red:link1" "wlan0" "1" "100" "0" "13"
-       ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "ubnt:orange:link2" "wlan0" "26" "100" "-25" "13"
-       ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "ubnt:green:link3" "wlan0" "51" "100" "-50" "13"
-       ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "ubnt:green:link4" "wlan0" "76" "100" "-75" "13"
+       ucidef_set_rssimon "wlan0" "200000" "1"
+       ucidef_set_led_rssi "rssilow" "RSSILOW" "ubnt:red:link1" "wlan0" "1" "100"
+       ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "ubnt:orange:link2" "wlan0" "26" "100"
+       ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "ubnt:green:link3" "wlan0" "51" "100"
+       ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "ubnt:green:link4" "wlan0" "76" "100"
        ;;
 bxu2000n-2-a1)
        ucidef_set_led_wlan "wlan" "WLAN" "bhu:green:wlan" "phy0tpt"
@@ -210,13 +227,9 @@ cf-e320n-v2)
        ucidef_set_led_netdev "wan" "WAN" "$board:red:wan" "eth1"
        ucidef_set_led_wlan "wlan" "WLAN" "$board:blue:wlan" "phy0tpt"
        ;;
-cf-e375ac)
-       ucidef_set_led_switch "wan" "WAN" "comfast:red:wan" "switch0" "0x02"
-       ucidef_set_led_switch "lan" "LAN" "comfast:green:lan" "switch0" "0x04"
-       ucidef_set_led_wlan "wlan1" "WLAN" "comfast:blue:wlan" "phy1tpt"
-       ;;
 cf-e355ac-v1|\
 cf-e355ac-v2|\
+cf-e375ac|\
 cf-e380ac-v1|\
 cf-e380ac-v2|\
 cf-e385ac)
@@ -224,6 +237,7 @@ cf-e385ac)
        ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:red:wlan5g" "phy0tpt"
 
        case "$board" in
+       cf-e375ac|\
        cf-e385ac)
                ucidef_set_led_switch "lan" "LAN" "$board:green:lan" "switch0" "0x04"
                ;;
@@ -237,16 +251,25 @@ cf-e530n)
        ucidef_set_led_netdev "wan" "WAN" "$board:blue:wan" "eth1"
        ;;
 cpe210|\
+cpe210-v2|\
 cpe510|\
 wbs210|\
 wbs510)
-       ucidef_set_led_switch "lan0" "LAN0" "tp-link:green:lan0" "switch0" "0x20"
-       ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
        ucidef_set_rssimon "wlan0" "200000" "1"
        ucidef_set_led_rssi "rssilow" "RSSILOW" "tp-link:green:link1" "wlan0" "1" "100" "0" "13"
        ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "tp-link:green:link2" "wlan0" "26" "100" "-25" "13"
        ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "tp-link:green:link3" "wlan0" "51" "100" "-50" "13"
        ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:green:link4" "wlan0" "76" "100" "-75" "13"
+
+       case "$board" in
+       cpe210-v2)
+               ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan0" "eth0"
+               ;;
+       *)
+               ucidef_set_led_switch "lan0" "LAN0" "tp-link:green:lan0" "switch0" "0x20"
+               ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
+               ;;
+       esac
        ;;
 cr3000)
        ucidef_set_led_netdev "wan" "WAN" "pcs:blue:wan" "eth1"
@@ -301,6 +324,13 @@ fritz300e)
        ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "$board:green:rssi3" "wlan0" "60" "100"
        ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$board:green:rssi4" "wlan0" "80" "100"
        ;;
+dap-1330-a1)
+       ucidef_set_rssimon "wlan0" "2000000" "2"
+       ucidef_set_led_rssi "wifi-low" "wifi-low" "d-link:red:wifi" "wlan0" "1" "29"
+       ucidef_set_led_rssi "wifi-medium" "wifi-medium" "d-link:green:wifi" "wlan0" "30" "100"
+       ucidef_set_led_rssi "wifi-high" "wifi-high" "d-link:green:signal1" "wlan0" "50" "100"
+       ucidef_set_led_rssi "wifi-max" "wifi-max" "d-link:green:signal2" "wlan0" "70" "100"
+       ;;
 dap-2695-a1)
        ucidef_set_led_default "power" "POWER" "d-link:green:power" "1"
        ucidef_set_led_default "diag" "DIAG" "d-link:red:power" "0"
@@ -358,6 +388,10 @@ e1700ac-v2)
        ucidef_set_led_usbdev "usb" "USB" "$board:green:usb" "1-1"
        ucidef_set_led_wlan "wlan2g" "WLAN2G" "$board:green:wlan2g" "phy1tpt"
        ;;
+e558-v2|\
+e750g-v8)
+       ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt"
+       ;;
 esr900)
        ucidef_set_led_wlan "wlan2g" "WLAN 2.4 GHz" "engenius:blue:wlan-2g" "phy0tpt"
        ucidef_set_led_wlan "wlan5g" "WLAN 5 GHz" "engenius:blue:wlan-5g" "phy1tpt"
@@ -367,6 +401,15 @@ epg5000)
        ucidef_set_led_wlan "wlan2g" "WLAN 2.4 GHz" "$board:blue:wlan-2g" "phy1tpt"
        ucidef_set_led_wlan "wlan5g" "WLAN 5 GHz" "$board:blue:wlan-5g" "phy0tpt"
        ;;
+fritz4020)
+       ucidef_set_led_netdev "lan" "LAN" "$board:green:lan" "eth1"
+       ucidef_set_led_netdev "wan" "WAN" "$board:green:wan" "eth0"
+       ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt"
+       ;;
+fritz450e)
+       ucidef_set_led_netdev "lan" "LAN" "$board:green:lan" "eth0"
+       ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt"
+       ;;
 gl-ar300m)
        ucidef_set_led_wlan "wlan" "WLAN" "$board:red:wlan" "phy0tpt"
        ;;
@@ -374,6 +417,10 @@ gl-ar750)
        ucidef_set_led_wlan "wlan2g" "WLAN2G" "$board:white:wlan2g" "phy1tpt"
        ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:white:wlan5g" "phy0tpt"
        ;;
+gl-ar750s)
+       ucidef_set_led_wlan "wlan2g" "WLAN2G" "$board:green:wlan2g" "phy1tpt"
+       ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:green:wlan5g" "phy0tpt"
+       ;;
 gl-mifi)
        ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt"
        ucidef_set_led_netdev "wan" "WAN" "$board:green:wan" "eth0"
@@ -408,6 +455,18 @@ hornet-ub-x2)
        ucidef_set_led_wlan "wlan" "WLAN" "alfa:blue:wlan" "phy0tpt"
        ucidef_set_led_usbdev "usb" "USB" "alfa:blue:usb" "1-1"
        ;;
+koala)
+       ucidef_set_led_default "power" "POWER" "$board:green:power" "1"
+       ucidef_set_led_wlan "wlan2g" "WLAN 2.4GHz" "$board:yellow:wlan2" "phy1tpt"
+       ucidef_set_led_wlan "wlan5g" "WLAN 5GHz" "$board:red:wlan58" "phy0tpt"
+       ;;
+lan-turtle)
+       ucidef_set_led_netdev "wan" "WAN" "$board:orange:system" "eth1"
+       ;;
+lbe-m5)
+       ucidef_set_led_netdev "lan" "LAN" "ubnt:green:lan" "eth0"
+       ucidef_set_led_wlan "wlan" "WLAN" "ubnt:green:wlan" "phy0tpt"
+       ;;
 mc-mac1200r)
        ucidef_set_led_wlan "wlan2g" "WLAN2G" "mercury:green:wlan2g" "phy1tpt"
        ucidef_set_led_wlan "wlan5g" "WLAN5G" "mercury:green:wlan5g" "phy0tpt"
@@ -545,6 +604,7 @@ r36a)
        ucidef_set_led_wlan "wlan" "WLAN" "$board:blue:wlan" "phy0tpt"
        ;;
 r602n|\
+t830|\
 zbt-we1526)
        ucidef_set_led_netdev "wan" "WAN" "$board:green:wan" "eth1"
        ucidef_set_led_switch "lan1" "LAN1" "$board:green:lan1" "switch0" "0x10"
@@ -552,6 +612,12 @@ zbt-we1526)
        ucidef_set_led_switch "lan3" "LAN3" "$board:green:lan3" "switch0" "0x04"
        ucidef_set_led_switch "lan4" "LAN4" "$board:green:lan4" "switch0" "0x02"
        ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt"
+
+       case "$board" in
+       t830)
+               ucidef_set_led_usbdev "usb" "USB" "$board:green:usb" "1-1"
+               ;;
+       esac
        ;;
 r6100)
        ucidef_set_led_netdev "wan" "WAN (green)" "netgear:green:wan" "eth0"
@@ -580,6 +646,7 @@ rb-911-2hn|\
 rb-911-5hn)
        ucidef_set_led_netdev "eth" "ETH" "rb:green:eth" "eth0"
        ;;
+rb-931-2nd|\
 rb-941-2nd)
        ucidef_set_led_timer "user" "USR/ACT" "rb:green:user" "1000" "1000"
        ;;
@@ -597,6 +664,7 @@ rb-962uigs-5hact2hnt)
        ucidef_set_led_timer "user" "USER/SFP" "rb:green:user" "1000" "1000"
        ;;
 rb-2011il|\
+rb-2011ils|\
 rb-2011l|\
 rb-2011uas|\
 rb-2011uas-2hnd|\
@@ -632,6 +700,9 @@ rb-wap-2nd)
        ucidef_set_led_timer "user" "USER" "rb:green:user" "1000" "1000"
        ucidef_set_led_wlan "wlan" "WLAN" "rb:green:wlan" "phy0tpt"
        ;;
+rb-wapr-2nd)
+       ucidef_set_led_wlan "wlan" "WLAN" "rb:green:user" "phy0tpt"
+       ;;
 re355|\
 re450)
        ucidef_set_led_netdev "lan_data" "LAN Data" "$board:green:lan_data" "eth0" "tx rx"
@@ -871,6 +942,9 @@ tl-wr840n-v3)
        ucidef_set_led_switch "lan" "LAN" "tp-link:green:lan" "switch0" "0x1E"
        ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
        ;;
+tl-wr940n-v6)
+       ucidef_set_led_netdev "wan" "WAN" "tp-link:blue:wan" "eth0"
+       ;;
 tl-wr942n-v1)
        ucidef_set_led_switch "lan1" "LAN1" "$board:green:lan1" "switch0" "0x04"
        ucidef_set_led_switch "lan2" "LAN2" "$board:green:lan2" "switch0" "0x08"
@@ -913,6 +987,10 @@ tube2h)
        ucidef_set_led_rssi "signal3" "SIGNAL3" "alfa:green:signal3" "wlan0" "51" "100" "-50" "13"
        ucidef_set_led_rssi "signal4" "SIGNAL4" "alfa:green:signal4" "wlan0" "76" "100" "-75" "13"
        ;;
+wam250)
+       ucidef_set_led_netdev "lan" "LAN" "$board:white:lan" "eth0"
+       ucidef_set_led_wlan "wlan" "WLAN" "$board:white:wlan" "phy0tpt"
+       ;;
 wndap360)
        ucidef_set_led_power "power" "POWER GREEN" "netgear:green:power" "1"
        ;;
@@ -943,6 +1021,9 @@ whr-hp-gn)
        ucidef_set_led_switch "lan3" "LAN3" "buffalo:green:lan3" "switch0" "0x08"
        ucidef_set_led_switch "lan4" "LAN4" "buffalo:green:lan4" "switch0" "0x10"
        ;;
+wifi-pineapple-nano)
+       ucidef_set_led_wlan "wlan0" "WLAN0" "$board:blue:system" "phy0tpt"
+       ;;
 wlae-ag300n)
        ucidef_set_led_netdev "wireless" "WIRELESS" "buffalo:green:wireless" "wlan0"
        ;;