ath79: add support for EnGenius EWS511AP
[openwrt/openwrt.git] / target / linux / ath79 / base-files / etc / board.d / 01_leds
1 #!/bin/sh
2
3 . /lib/functions/uci-defaults.sh
4
5 board_config_update
6
7 board=$(board_name)
8 boardname="${board##*,}"
9
10 case "$board" in
11 avm,fritz300e)
12 ucidef_set_led_netdev "lan" "LAN" "$boardname:green:lan" "eth0"
13 ucidef_set_rssimon "wlan0" "200000" "1"
14 ucidef_set_led_rssi "rssilow" "RSSILOW" "$boardname:green:rssi0" "wlan0" "1" "100"
15 ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "$boardname:green:rssi1" "wlan0" "20" "100"
16 ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "$boardname:green:rssi2" "wlan0" "40" "100"
17 ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "$boardname:green:rssi3" "wlan0" "60" "100"
18 ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$boardname:green:rssi4" "wlan0" "80" "100"
19 ;;
20 avm,fritz4020)
21 ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth0"
22 ucidef_set_led_switch "lan" "LAN" "$boardname:green:lan" "switch0" "0x1E"
23 ;;
24 buffalo,whr-g301n)
25 ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth0"
26 ucidef_set_led_switch "lan1" "LAN1" "$boardname:green:lan1" "switch0" "0x02"
27 ucidef_set_led_switch "lan2" "LAN2" "$boardname:green:lan2" "switch0" "0x04"
28 ucidef_set_led_switch "lan3" "LAN3" "$boardname:green:lan3" "switch0" "0x08"
29 ucidef_set_led_switch "lan4" "LAN4" "$boardname:green:lan4" "switch0" "0x10"
30 ;;
31 dlink,dir-859-a1)
32 ucidef_set_led_switch "internet" "WAN" "$boardname:green:internet" "switch0" "0x20"
33 ;;
34 engenius,ews511ap)
35 ucidef_set_led_netdev "lan1" "LAN1" "$boardname:blue:lan1" "eth0"
36 ucidef_set_led_netdev "lan2" "LAN2" "$boardname:blue:lan2" "eth1"
37 ;;
38 etactica,eg200)
39 ucidef_set_led_netdev "lan" "LAN" "$boardname:red:eth0" "eth0"
40 ucidef_set_led_oneshot "modbus" "Modbus" "$boardname:red:modbus" "100" "33"
41 ucidef_set_led_default "etactica" "etactica" "$boardname:red:etactica" "ignore"
42 ;;
43 glinet,gl-ar150)
44 ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth0"
45 ucidef_set_led_netdev "lan" "LAN" "$boardname:green:lan" "eth1"
46 ;;
47 glinet,gl-x750)
48 ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth0"
49 ;;
50 netgear,wnr612-v2|\
51 on,n150r)
52 ucidef_set_led_netdev "wan" "WAN" "netgear:green:wan" "eth0"
53 ucidef_set_led_switch "lan1" "LAN1" "netgear:green:lan1" "switch0" "0x02" "0x0f"
54 ucidef_set_led_switch "lan2" "LAN2" "netgear:green:lan2" "switch0" "0x04" "0x0f"
55 ;;
56 pcs,cap324)
57 ucidef_set_led_netdev "lan" "LAN" "pcs:lan:green" "eth0"
58 ;;
59 pcs,cr3000)
60 ucidef_set_led_netdev "wan" "WAN" "pcs:blue:wan" "eth1"
61 ucidef_set_led_switch "lan1" "LAN1" "pcs:blue:lan1" "switch0" "0x04"
62 ucidef_set_led_switch "lan2" "LAN2" "pcs:blue:lan2" "switch0" "0x08"
63 ucidef_set_led_switch "lan3" "LAN3" "pcs:blue:lan3" "switch0" "0x10"
64 ucidef_set_led_switch "lan4" "LAN4" "pcs:blue:lan4" "switch0" "0x02"
65 ;;
66 tplink,archer-a7-v5|\
67 tplink,archer-c7-v5)
68 ucidef_set_led_switch "wan" "WAN" "tp-link:green:wan" "switch0" "0x02"
69 ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x04"
70 ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
71 ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x10"
72 ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x20"
73 ;;
74 tplink,archer-c58-v1|\
75 tplink,archer-c59-v1)
76 ucidef_set_led_switch "lan" "LAN" "tp-link:green:lan" "switch0" "0x1E"
77 ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth0"
78 ;;
79 tplink,re450-v2)
80 ucidef_set_led_netdev "lan_data" "LAN Data" "tp-link:green:lan_data" "eth0" "tx rx"
81 ucidef_set_led_netdev "lan_link" "LAN Link" "tp-link:green:lan_link" "eth0" "link"
82 ;;
83 tplink,tl-mr3020-v1|\
84 tplink,tl-mr3040-v2)
85 ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
86 ;;
87 tplink,tl-wr1043nd-v4)
88 ucidef_set_led_switch "wan" "WAN" "tp-link:green:wan" "switch0" "0x20"
89 ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
90 ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
91 ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x04"
92 ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
93 ;;
94 tplink,tl-wr740n-v1|\
95 tplink,tl-wr740n-v3|\
96 tplink,tl-wr741-v1|\
97 tplink,tl-wr743nd-v1|\
98 tplink,tl-wr841-v5|\
99 tplink,tl-wr941-v4)
100 ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth0"
101 ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x02"
102 ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x04"
103 ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x08"
104 ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x10"
105 ;;
106 tplink,tl-wr740nd-v4|\
107 tplink,tl-wr741nd-v4|\
108 tplink,tl-wr841-v8|\
109 tplink,tl-wr842n-v2)
110 ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth0"
111 ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x04"
112 ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
113 ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x10"
114 ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
115 ;;
116 tplink,tl-wr841-v9|\
117 tplink,tl-wr841-v11)
118 ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth0"
119 ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
120 ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
121 ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x04"
122 ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
123 ;;
124 ubnt,bullet-m|\
125 ubnt,bullet-m-xw|\
126 ubnt,nano-m|\
127 ubnt,rocket-m)
128 ucidef_set_rssimon "wlan0" "200000" "1"
129 ucidef_set_led_rssi "rssilow" "RSSILOW" "ubnt:red:link1" "wlan0" "1" "100"
130 ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "ubnt:orange:link2" "wlan0" "26" "100"
131 ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "ubnt:green:link3" "wlan0" "51" "100"
132 ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "ubnt:green:link4" "wlan0" "76" "100"
133 ;;
134 ubnt,nanostation-ac)
135 ucidef_set_rssimon "wlan0" "200000" "1"
136 ucidef_set_led_rssi "rssilow" "RSSILOW" "ubnt:blue:rssi0" "wlan0" "1" "100"
137 ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "ubnt:blue:rssi1" "wlan0" "26" "100"
138 ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "ubnt:blue:rssi2" "wlan0" "51" "100"
139 ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "ubnt:blue:rssi3" "wlan0" "76" "100"
140 ;;
141 wd,mynet-wifi-rangeextender)
142 ucidef_set_led_netdev "lan" "LAN" "$boardname:green:lan" "eth0"
143 ucidef_set_rssimon "wlan0" "200000" "1"
144 ucidef_set_led_rssi "rssilow" "RSSILOW" "$boardname:rssi-low" "wlan0" "1" "100"
145 ucidef_set_led_rssi "rssimedium" "RSSIMED" "$boardname:blue:rssi-med" "wlan0" "33" "100"
146 ucidef_set_led_rssi "rssihigh" "RSSIMAX" "$boardname:blue:rssi-max" "wlan0" "66" "100"
147 ;;
148 esac
149
150 board_config_flush
151
152 exit 0