ramips: Added WIZnet WizFi630A Platform based on Ralink RT5350
[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 board=$(ramips_board_name)
9
10 case $board in
11 3g150b|\
12 3g300m|\
13 w150m)
14 status_led="$board:blue:ap"
15 ;;
16 3g-6200n|\
17 ar670w|\
18 ar725w|\
19 asl26555|\
20 br-6425|\
21 br-6475nd|\
22 e1700|\
23 fonera20n|\
24 mzk-dp150n|\
25 mzk-w300nh2|\
26 nbg-419n|\
27 pwh2004|\
28 wnce2001|\
29 x5|\
30 x8|\
31 xdxrn502j)
32 status_led="$board:green:power"
33 ;;
34 a5-v11|\
35 d105|\
36 dcs-930l-b1|\
37 hlk-rm04|\
38 mpr-a1|\
39 mpr-a2)
40 status_led="$board:red:power"
41 ;;
42 ai-br100|\
43 ht-tm02)
44 status_led="$board:blue:wlan"
45 ;;
46 all0239-3g|\
47 dcs-930|\
48 dir-300-b1|\
49 dir-300-b7|\
50 dir-320-b1|\
51 dir-600-b1|\
52 dir-600-b2|\
53 dir-610-a1|\
54 dir-615-d|\
55 dir-615-h1|\
56 dir-620-a1|\
57 dir-620-d1|\
58 hpm|\
59 hw550-3g|\
60 miniembwifi|\
61 mofi3500-3gn|\
62 rut5xx|\
63 v11st-fe|\
64 vocore|\
65 wmr-300)
66 status_led="$board:green:status"
67 ;;
68 atp-52b|\
69 ip2202)
70 status_led="$board:green:run"
71 ;;
72 awapn2403|\
73 dir-645)
74 status_led="$board:green:wps"
75 ;;
76 cf-wr800n)
77 status_led="$board:white:wps"
78 ;;
79 cy-swr1100|\
80 w502u)
81 status_led="$board:blue:wps"
82 ;;
83 dap-1350|\
84 na930|\
85 rt-n13u|\
86 rt-n14u|\
87 rt-n15|\
88 rt-n56u|\
89 wl-330n|\
90 wl-330n3g|\
91 wli-tx4-ag300n|\
92 wt3020|\
93 y1|\
94 y1s)
95 status_led="$board:blue:power"
96 ;;
97 db-wrt01|\
98 esr-9753)
99 status_led="$board:orange:power"
100 ;;
101 f5d8235-v2)
102 status_led="$board:blue:router"
103 ;;
104 f7c027)
105 status_led="$board:orange:status"
106 ;;
107 m2m)
108 status_led="$board:blue:wifi"
109 ;;
110 m3|\
111 m4)
112 status_led="$board:blue:status"
113 ;;
114 miwifi-mini|\
115 zte-q7)
116 status_led="$board:red:status"
117 ;;
118 mlw221|\
119 mlwg2)
120 status_led="$board:blue:system"
121 ;;
122 mr-102n)
123 status_led="$board:amber:status"
124 ;;
125 nw718)
126 status_led="$board:amber:cpu"
127 ;;
128 oy-0001|\
129 sl-r7205)
130 status_led="$board:green:wifi"
131 ;;
132 pbr-m1|\
133 w306r-v20|\
134 zbt-wr8305rt)
135 status_led="$board:green:sys"
136 ;;
137 psr-680w)
138 status_led="$board:red:wan"
139 ;;
140 px-4885|\
141 re6500|\
142 whr-1166d|\
143 whr-300hp2|\
144 whr-600d)
145 status_led="$board:orange:wifi"
146 ;;
147 rt-n10-plus|\
148 tew-691gr|\
149 tew-692gr|\
150 ur-326n4g|\
151 ur-336un|\
152 wr512-3gn)
153 status_led="$board:green:wps"
154 ;;
155 sap-g3200u3)
156 status_led="$board:green:usb"
157 ;;
158 v22rw-2x2)
159 status_led="$board:green:security"
160 ;;
161 wcr-150gn|\
162 wl-351)
163 status_led="$board:amber:power"
164 ;;
165 whr-g300n|\
166 wzr-agl300nh)
167 status_led="$board:green:router"
168 ;;
169 wizfi630a)
170 status_led="$board::run"
171 ;;
172 wsr-1166|\
173 wsr-600)
174 status_led="$board:orange:diag"
175 ;;
176 esac
177 }
178
179 set_state() {
180 get_status_led
181
182 case "$1" in
183 preinit)
184 status_led_blink_preinit
185 ;;
186 failsafe)
187 status_led_blink_failsafe
188 ;;
189 preinit_regular)
190 status_led_blink_preinit_regular
191 ;;
192 done)
193 status_led_on
194 ;;
195 esac
196 }