ralink: add HLK-RM04 support
[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 argus-atp52b)
16 status_led="argus-atp52b:green:run"
17 ;;
18 asl26555)
19 status_led="asl26555:green:power"
20 ;;
21 br6524n)
22 status_led="edimax:blue:power"
23 ;;
24 br6425)
25 status_led="edimax:green:power"
26 ;;
27 d105)
28 status_led="d105:red:power"
29 ;;
30 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)
31 status_led="d-link:green:status"
32 ;;
33 dir-645)
34 status_led="d-link:green:wps"
35 ;;
36 dap-1350)
37 status_led="d-link:blue:power"
38 ;;
39 esr-9753)
40 status_led="esr-9753:orange:power"
41 ;;
42 f5d8235-v2)
43 status_led="f5d8235v2:blue:router"
44 ;;
45 fonera20n)
46 status_led="fonera20n:green:power"
47 ;;
48 ip2202)
49 status_led="ip2202:green:run"
50 ;;
51 rt-n13u)
52 status_led="rt-n13u:power"
53 ;;
54 hlk-rm04)
55 status_led="hlk-rm04:red:power"
56 ;;
57 all0239-3g|\
58 hw550-3g)
59 status_led="hw550-3g:green:status"
60 ;;
61 m3)
62 status_led="m3:blue:status"
63 ;;
64 m4)
65 status_led="m4:blue:status"
66 ;;
67 mofi3500-3gn)
68 status_led="mofi3500-3gn:green:status"
69 ;;
70 mpr-a1)
71 status_led="mpr-a1:red:power"
72 ;;
73 mpr-a2)
74 status_led="mpr-a2:red:power"
75 ;;
76 nbg-419n)
77 status_led="nbg-419n:green:power"
78 ;;
79 nw718)
80 status_led="nw718:amber:cpu"
81 ;;
82 omni-emb|\
83 omni-emb-hpm)
84 status_led="emb:green:status"
85 ;;
86 psr-680w)
87 status_led="psr-680w:red:wan"
88 ;;
89 pwh2004)
90 status_led="pwh2004:green:power"
91 ;;
92 rt-n15)
93 status_led="rt-n15:blue:power"
94 ;;
95 rt-n10-plus)
96 status_led="asus:green:wps"
97 ;;
98 rt-n56u | wl-330n | wl-330n3g)
99 status_led="asus:blue:power"
100 ;;
101 sl-r7205)
102 status_led="sl-r7205:green:status"
103 ;;
104 tew-691gr|\
105 tew-692gr)
106 status_led="trendnet:green:wps"
107 ;;
108 v11st-fe)
109 status_led="v11st-fe:green:status"
110 ;;
111 v22rw-2x2)
112 status_led="v22rw-2x2:green:security"
113 ;;
114 w306r-v20)
115 status_led="w306r-v20:green:sys"
116 ;;
117 w502u)
118 status_led="alfa:blue:wps"
119 ;;
120 wcr-150gn)
121 status_led="wcr150gn:amber:power"
122 ;;
123 whr-g300n)
124 status_led="whr-g300n:green:router"
125 ;;
126 wmr300 | \
127 whr-300hp2 | \
128 whr-600d)
129 status_led="buffalo:green:status"
130 ;;
131 wli-tx4-ag300n)
132 status_led="buffalo:blue:power"
133 ;;
134 wl-351)
135 status_led="wl-351:amber:power"
136 ;;
137 wr512-3gn)
138 status_led="wr512:green:wps"
139 ;;
140 wnce2001)
141 status_led="netgear:green:power"
142 ;;
143 mzk-w300nh2)
144 status_led="mzkw300nh2:green:power"
145 ;;
146 ur-326n4g)
147 status_led="ur326:green:wps"
148 ;;
149 ur-336un)
150 status_led="ur336:green:wps"
151 ;;
152 x5)
153 status_led="x5:green:power"
154 ;;
155 x8)
156 status_led="x8:green:power"
157 ;;
158 xdxrn502j)
159 status_led="xdxrn502j:green:power"
160 ;;
161 f7c027)
162 status_led="belkin:orange:status"
163 ;;
164 esac
165 }
166
167 set_state() {
168 get_status_led
169
170 case "$1" in
171 preinit)
172 status_led_blink_preinit
173 ;;
174 failsafe)
175 status_led_blink_failsafe
176 ;;
177 done)
178 status_led_on
179 ;;
180 esac
181 }