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