ralink: add support for Kingston MLWG2
[openwrt/svn-archive/archive.git] / target / linux / ramips / base-files / etc / diag.sh
1 #!/bin/sh
2 # Copyright (C) 2010-2013 OpenWrt.org
3
4 . /lib/functions/leds.sh
5 . /lib/ramips.sh
6
7 get_status_led() {
8 case $(ramips_board_name) in
9 3g-6200n)
10 status_led="edimax:green:power"
11 ;;
12 3g300m | w150m)
13 status_led="tenda:blue:ap"
14 ;;
15 ai-br100)
16 status_led="aigale:blue:wlan"
17 ;;
18 ar670w)
19 status_led="ar670w:green:power"
20 ;;
21 ar725w)
22 status_led="ar725w:green:power"
23 ;;
24 awapn2403)
25 status_led="asiarf:green:wps"
26 ;;
27 argus-atp52b)
28 status_led="argus-atp52b:green:run"
29 ;;
30 asl26555)
31 status_led="asl26555:green:power"
32 ;;
33 br6524n)
34 status_led="edimax:blue:power"
35 ;;
36 br6425 | br-6475nd)
37 status_led="edimax:green:power"
38 ;;
39 cy-swr1100)
40 status_led="samsung:blue:wps"
41 ;;
42 d105)
43 status_led="d105:red:power"
44 ;;
45 dcs-930 | dir-300-b1 | dir-600-b1 | dir-600-b2 | dir-610-a1 | dir-615-h1 | dir-615-d | dir-620-a1| dir-620-d1| dir-300-b7| dir-320-b1)
46 status_led="d-link:green:status"
47 ;;
48 dir-645)
49 status_led="d-link:green:wps"
50 ;;
51 dap-1350)
52 status_led="d-link:blue:power"
53 ;;
54 e1700)
55 status_led="linksys:green:power"
56 ;;
57 esr-9753)
58 status_led="esr-9753:orange:power"
59 ;;
60 f5d8235-v2)
61 status_led="f5d8235v2:blue:router"
62 ;;
63 fonera20n)
64 status_led="fonera20n:green:power"
65 ;;
66 ip2202)
67 status_led="ip2202:green:run"
68 ;;
69 rt-n13u)
70 status_led="rt-n13u:power"
71 ;;
72 hlk-rm04)
73 status_led="hlk-rm04:red:power"
74 ;;
75 ht-tm02)
76 status_led="ht-tm02:blue:wlan"
77 ;;
78 all0239-3g|\
79 hw550-3g)
80 status_led="hw550-3g:green:status"
81 ;;
82 m3)
83 status_led="m3:blue:status"
84 ;;
85 m4)
86 status_led="m4:blue:status"
87 ;;
88 mlw221)
89 status_led="kingston:blue:status"
90 ;;
91 mlwg2)
92 status_led="kingston:blue:system"
93 ;;
94 mofi3500-3gn)
95 status_led="mofi3500-3gn:green:status"
96 ;;
97 mpr-a1)
98 status_led="hame:red:power"
99 ;;
100 mpr-a2)
101 status_led="hame:red:power"
102 ;;
103 nbg-419n)
104 status_led="nbg-419n:green:power"
105 ;;
106 nw718)
107 status_led="nw718:amber:cpu"
108 ;;
109 omni-emb|\
110 omni-emb-hpm)
111 status_led="emb:green:status"
112 ;;
113 psr-680w)
114 status_led="psr-680w:red:wan"
115 ;;
116 pwh2004)
117 status_led="pwh2004:green:power"
118 ;;
119 px4885)
120 status_led="7links:orange:wifi"
121 ;;
122 rt-n15)
123 status_led="rt-n15:blue:power"
124 ;;
125 rt-n10-plus)
126 status_led="asus:green:wps"
127 ;;
128 rt-n56u | wl-330n | wl-330n3g)
129 status_led="asus:blue:power"
130 ;;
131 rut5xx)
132 status_led="rut5xx:green:status"
133 ;;
134 sl-r7205)
135 status_led="sl-r7205:green:status"
136 ;;
137 tew-691gr|\
138 tew-692gr)
139 status_led="trendnet:green:wps"
140 ;;
141 v11st-fe)
142 status_led="v11st-fe:green:status"
143 ;;
144 v22rw-2x2)
145 status_led="v22rw-2x2:green:security"
146 ;;
147 vocore)
148 status_led="vocore:green:status"
149 ;;
150 w306r-v20)
151 status_led="w306r-v20:green:sys"
152 ;;
153 w502u)
154 status_led="alfa:blue:wps"
155 ;;
156 wcr-150gn)
157 status_led="wcr150gn:amber:power"
158 ;;
159 whr-g300n)
160 status_led="whr-g300n:green:router"
161 ;;
162 wmr300 | \
163 whr-300hp2 | \
164 whr-600d)
165 status_led="buffalo:green:status"
166 ;;
167 wli-tx4-ag300n)
168 status_led="buffalo:blue:power"
169 ;;
170 wl-351)
171 status_led="wl-351:amber:power"
172 ;;
173 wr512-3gn)
174 status_led="wr512:green:wps"
175 ;;
176 wr8305rt)
177 status_led="wr8305rt:sys"
178 ;;
179 wsr-600 | \
180 wsr-1166)
181 status_led="buffalo:orange:diag"
182 ;;
183 wnce2001)
184 status_led="netgear:green:power"
185 ;;
186 nexx-wt1520)
187 status_led="nexx-wt1520:white:power"
188 ;;
189 nexx-wt3020)
190 status_led="nexx:blue:power"
191 ;;
192 mzk-w300nh2)
193 status_led="mzkw300nh2:green:power"
194 ;;
195 ur-326n4g)
196 status_led="ur326:green:wps"
197 ;;
198 ur-336un)
199 status_led="ur336:green:wps"
200 ;;
201 x5)
202 status_led="x5:green:power"
203 ;;
204 x8)
205 status_led="x8:green:power"
206 ;;
207 xdxrn502j)
208 status_led="xdxrn502j:green:power"
209 ;;
210 f7c027)
211 status_led="belkin:orange:status"
212 ;;
213 na930)
214 status_led="na930:blue:power"
215 ;;
216 y1 | \
217 y1s)
218 status_led="lenovo:blue:power"
219 ;;
220 esac
221 }
222
223 set_state() {
224 get_status_led
225
226 case "$1" in
227 preinit)
228 status_led_blink_preinit
229 ;;
230 failsafe)
231 status_led_blink_failsafe
232 ;;
233 preinit_regular)
234 status_led_blink_preinit_regular
235 ;;
236 done)
237 status_led_on
238 ;;
239 esac
240 }