mountd: update to latest git HEAD
[openwrt/openwrt.git] / target / linux / ramips / base-files / etc / board.d / 01_leds
1 #!/bin/sh
2
3 . /lib/functions/uci-defaults.sh
4 . /lib/ramips.sh
5
6 set_usb_led() {
7 ucidef_set_led_usbdev "usb" "USB" "$1" "1-1"
8 }
9
10 set_wifi_led() {
11 ucidef_set_led_netdev "wifi_led" "wifi" "$1" "wlan0"
12 }
13
14
15 board=$(ramips_board_name)
16
17 board_config_update
18
19 case $board in
20 3g150b|\
21 3g300m)
22 set_usb_led "$board:blue:3g"
23 ;;
24 3g-6200n)
25 set_wifi_led "$board:amber:wlan"
26 set_usb_led "$board:blue:3g"
27 ;;
28 3g-6200nl|\
29 br-6475nd|\
30 mzk-w300nh2)
31 set_wifi_led "$board:amber:wlan"
32 ;;
33 a5-v11|\
34 cs-qr10)
35 ucidef_set_led_default "power" "POWER" "$board:red:power" "1"
36 ;;
37 ai-br100)
38 ucidef_set_led_netdev "wan" "wan" "$board:blue:wan" "eth0.2"
39 set_wifi_led "$board:blue:wlan"
40 ;;
41 air3gii)
42 set_wifi_led "$board:green:wlan"
43 set_usb_led "$board:green:mobile"
44 ;;
45 all0239-3g|\
46 hw550-3g|\
47 mofi3500-3gn|\
48 sap-g3200u3|\
49 sk-wb8|\
50 wf-2881)
51 set_usb_led "$board:green:usb"
52 ;;
53 all0256n)
54 ucidef_set_rssimon "wlan0" "40000" "1"
55 ucidef_set_led_rssi "rssilow" "RSSILOW" "$board:green:rssilow" "wlan0" "1" "40" "0" "6"
56 ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "$board:green:rssimed" "wlan0" "30" "80" "-29" "5"
57 ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$board:green:rssihigh" "wlan0" "70" "100" "-69" "8"
58 set_wifi_led "rt2800pci-phy0::radio"
59 ;;
60 ar670w|\
61 ar725w|\
62 awapn2403)
63 set_wifi_led "rt2800soc-phy0::radio"
64 ;;
65 asl26555)
66 ucidef_set_led_default "power" "POWER" "$board:green:power" "1"
67 ucidef_set_led_netdev "eth" "ETH" "$board:green:eth" "eth0"
68 set_wifi_led "$board:green:wlan"
69 set_usb_led "$board:green:3g"
70 ;;
71 bc2)
72 set_usb_led "$board:blue:usb"
73 ;;
74 br-6425)
75 set_wifi_led "$board:orange:wlan"
76 ;;
77 broadway)
78 set_usb_led "$board:red:diskmounted"
79 set_wifi_led "$board:red:wps_active"
80 ;;
81 c50)
82 ucidef_set_led_default "power" "power" "tp-link:blue:power" "0"
83 ucidef_set_led_netdev "lan" "lan" "tp-link:blue:lan" "eth0.2"
84 set_usb_led "tp-link:blue:usb"
85 ucidef_set_led_wlan "wlan2g" "wlan2g" "tp-link:blue:wlan2g" "phy1radio"
86 ucidef_set_led_wlan "wlan5g" "wlan5g" "tp-link:blue:wlan5g" "phy0radio"
87 ;;
88 cf-wr800n)
89 ucidef_set_led_netdev "lan" "lan" "$board:white:ethernet" eth0.1
90 set_wifi_led "$board:white:wifi"
91 ;;
92 cy-swr1100)
93 ucidef_set_led_default "wps" "WPS" "$board:blue:wps" "0"
94 set_usb_led "$board:blue:usb"
95 ;;
96 d105)
97 ucidef_set_led_default "power" "POWER" "$board:red:power" "1"
98 set_usb_led "$board:green:usb"
99 ;;
100 db-wrt01)
101 ucidef_set_led_default "power" "power" "$board:orange:power" "1"
102 ;;
103 dcs-930l-b1)
104 ucidef_set_led_default "power" "POWER" "$board:red:power" "1"
105 ucidef_set_led_netdev "wifi" "WiFi" "$board:blue:wps"
106 ;;
107 dir-300-b1|\
108 dir-600-b1|\
109 dir-600-b2|\
110 dir-620-a1)
111 ucidef_set_led_default "wan" "WAN LED (amber)" "$board:amber:wan" "1"
112 set_wifi_led "rt2800pci-phy0::radio"
113 ;;
114 dir-300-b7|\
115 dir-320-b1|\
116 dir-610-a1|\
117 esr-9753|\
118 hlk-rm04|\
119 sl-r7205|\
120 v11st-fe|\
121 w306r-v20|\
122 wt1520)
123 set_wifi_led "rt2800pci-phy0::radio"
124 ;;
125 dir-615-d|\
126 dir-615-h1)
127 ucidef_set_led_default "status" "Status LED (amber)" "$board:amber:status" "0"
128 set_wifi_led "rt2800pci-phy0::radio"
129 ;;
130 dir-620-d1|\
131 mzk-ex300np)
132 set_wifi_led "$board:green:wifi"
133 ;;
134 dir-810l|\
135 mzk-750dhp|\
136 mzk-dp150n)
137 ucidef_set_led_default "power" "power" "$board:green:power" "1"
138 ;;
139 ex2700)
140 ucidef_set_led_default "power_r" "POWER (red)" "$board:red:power" "0"
141 set_wifi_led "$board:green:router"
142 ;;
143 f5d8235-v1|\
144 f5d8235-v2)
145 set_usb_led "$board:blue:storage"
146 ;;
147 fonera20n)
148 set_usb_led "$board:orange:usb"
149 set_wifi_led "$board:orange:wifi"
150 ;;
151 gl-mt300a|\
152 gl-mt300n|\
153 gl-mt750)
154 set_wifi_led "$board:wlan"
155 ;;
156 hc5661)
157 ucidef_set_led_default "system" "system" "$board:blue:system" "1"
158 ucidef_set_led_netdev "internet" "internet" "$board:blue:internet" "eth0.2"
159 set_wifi_led "$board:blue:wlan2g"
160 ;;
161 hc5761)
162 ucidef_set_led_default "system" "system" "$board:blue:system" "1"
163 ucidef_set_led_netdev "internet" "internet" "$board:blue:internet" "eth0.2"
164 set_wifi_led "$board:blue:wlan2g"
165 ucidef_set_led_netdev "wifi5g" "wifi5g" "$board:blue:wlan5g" "rai0"
166 ;;
167 hc5861)
168 ucidef_set_led_default "system" "system" "$board:blue:system" "1"
169 ucidef_set_led_netdev "internet" "internet" "$board:blue:internet" "eth0.2"
170 set_wifi_led "$board:blue:wlan2g"
171 ucidef_set_led_netdev "wifi5g" "wifi5g" "$board:blue:wlan5g" "rai0"
172 ucidef_set_led_default "turbo" "turbo" "$board:blue:turbo" "0"
173 ;;
174 hg255d)
175 set_wifi_led "$board:green:wlan"
176 set_usb_led "$board:green:usb"
177 ucidef_set_led_netdev "internet" "internet" "$board:green:internet" "eth0.2"
178 ;;
179 hpm)
180 ucidef_set_led_default "power" "POWER" "$board:orange:power" "1"
181 ucidef_set_led_netdev "eth" "ETH" "$board:green:eth" "eth0"
182 set_wifi_led "$board:green:wifi"
183 ;;
184 ht-tm02)
185 ucidef_set_led_netdev "eth" "Ethernet" "$board:green:lan" "eth0"
186 set_wifi_led "$board:blue:wlan"
187 ;;
188 m2m)
189 set_wifi_led "$board:blue:wifi"
190 ucidef_set_led_netdev "eth" "Ethernet" "$board:green:wan" "eth0"
191 ;;
192 miniembplug)
193 set_wifi_led "$board:red:wlan"
194 set_usb_led "$board:green:mobile"
195 ;;
196 miwifi-mini|\
197 miwifi-nano)
198 ucidef_set_led_default "power" "power" "$board:red:status" "1"
199 ;;
200 miwifi-nano)
201 ucidef_set_led_default "power" "power" "$board:red:status" "1"
202 ucidef_set_led_wlan "radio_led" "radio" "$board:amber:radio" "phy0radio"
203 ucidef_set_led_wlan "wifi_led" "wifi" "$board:blue:wifi" "phy0assoc"
204 ;;
205 mlw221|\
206 mlwg2)
207 set_wifi_led "$board:blue:wifi"
208 ucidef_set_led_default "system" "system" "$board:blue:system" "1"
209 ;;
210 mpr-a1|\
211 mpr-a2)
212 set_wifi_led "$board:blue:system"
213 ;;
214 mr-102n)
215 set_wifi_led "$board:green:wlan"
216 set_usb_led "$board:green:usb"
217 ;;
218 mzk-ex750np)
219 ucidef_set_led_default "power" "power" "$board:red:power" "1"
220 set_wifi_led "$board:red:wifi"
221 ;;
222 na930)
223 set_usb_led "$board:blue:status"
224 ;;
225 nw718)
226 set_usb_led "$board:amber:usb"
227 ;;
228 oy-0001)
229 ucidef_set_led_default "power" "power" "$board:green:power" "1"
230 set_wifi_led "$board:green:wifi"
231 ;;
232 pbr-m1)
233 ucidef_set_led_netdev "internet" "internet" "$board:blue:internet" "eth0.2"
234 ucidef_set_led_default "power" "power" "$board:blue:power" "1"
235 ucidef_set_led_default "sys" "sys" "$board:blue:sys" "1"
236 ;;
237 psg1208)
238 set_wifi_led "$board:white:wlan2g"
239 ;;
240 px-4885)
241 set_wifi_led "$board:orange:wifi"
242 set_usb_led "$board:blue:storage"
243 ;;
244 re6500)
245 ucidef_set_led_default "power" "power" "$board:white:power" "1"
246 ucidef_set_led_default "wifi" "wifi" "$board:orange:wifi" "1"
247 ;;
248 rp-n53)
249 ucidef_set_led_netdev "eth" "Network" "$board:white:back" "eth0"
250 set_wifi_led "$board:blue:wifi"
251 ;;
252 rt-n14u)
253 ucidef_set_led_default "power" "power" "$board:blue:power" "1"
254 ucidef_set_led_netdev "lan" "lan" "$board:blue:lan" eth0.1
255 ucidef_set_led_netdev "wan" "wan" "$board:blue:wan" eth0.2
256 set_wifi_led "$board:blue:air"
257 set_usb_led "$board:blue:usb"
258 ;;
259 tiny-ac)
260 set_wifi_led "$board:orange:wifi"
261 set_usb_led "$board:green:usb"
262 ;;
263 vocore)
264 ucidef_set_led_netdev "eth" "ETH" "$board:orange:eth" "eth0"
265 set_wifi_led "$board:green:status"
266 ;;
267 w502u)
268 set_usb_led "$board:blue:usb"
269 set_wifi_led "rt2800pci-phy0::radio"
270 ;;
271 wcr-150gn)
272 set_usb_led "$board:amber:user"
273 ;;
274 whr-1166d|\
275 whr-300hp2|\
276 whr-600d)
277 ucidef_set_led_default "power" "power" "$board:green:power" "1"
278 ucidef_set_led_default "router" "router" "$board:green:router" "1"
279 ;;
280 wnce2001)
281 set_wifi_led "$board:green:wlan"
282 ;;
283 wrh-300cr)
284 set_wifi_led "$board:green:wlan"
285 ucidef_set_led_netdev "lan" "lan" "$board:green:ethernet" "eth0"
286 ;;
287 wndr3700v5)
288 ucidef_set_led_default "power" "POWER" "$board:green:power" "0"
289 ;;
290 wt3020)
291 ucidef_set_led_default "power" "power" "$board:blue:power" "0"
292 ;;
293 y1|\
294 y1s)
295 ucidef_set_led_default "power" "power" "$board:blue:power" "1"
296 set_usb_led "$board:blue:usb"
297 set_wifi_led "$board:blue:wifi"
298 ;;
299 zbt-wa05)
300 ucidef_set_led_default "power" "power" "$board:blue:power" "1"
301 set_wifi_led "$board:blue:air"
302 set_usb_led "$board:blue:usb"
303 ;;
304 zbt-we826)
305 ucidef_set_led_default "power" "power" "$board:green:power" "1"
306 set_wifi_led "$board:green:wifi"
307 set_usb_led "$board:green:usb"
308 ;;
309 zbt-wr8305rt)
310 ucidef_set_led_default "power" "power" "$board:green:sys" "1"
311 set_usb_led "$board:green:usb"
312 set_wifi_led "$board:green:wifi"
313 ;;
314 zte-q7)
315 set_wifi_led "$board:blue:status"
316 ;;
317 youku-yk1)
318 ucidef_set_led_default "power" "power" "$board:blue:power" "1"
319 set_wifi_led "$board:blue:air"
320 set_usb_led "$board:blue:usb"
321 ;;
322 esac
323
324 board_config_flush
325
326 exit 0