ramips: Add support for the D-Link DCS-930 B1
[openwrt/svn-archive/archive.git] / target / linux / ramips / base-files / etc / board.d / 01_leds
1 #!/bin/sh
2
3 . /lib/functions/uci-defaults-new.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 3g-6200n)
21 set_wifi_led "edimax:amber:wlan"
22 set_usb_led "edimax:blue:3g"
23 ;;
24 3g-6200nl)
25 set_wifi_led "edimax:green:wlan"
26 ;;
27 3g150b |\
28 3g300m)
29 set_usb_led "tenda:blue:3g"
30 ;;
31 ai-br100)
32 ucidef_set_led_netdev "wan" "wan" "aigale:blue:wan" "eth0.2"
33 set_wifi_led "aigale:blue:wlan"
34 ;;
35 a5-v11)
36 ucidef_set_led_default "power" "POWER" "a5-v11:red:power" "1"
37 ;;
38 air3gii)
39 set_wifi_led "airlive:green:wlan"
40 set_usb_led "airlive:green:mobile"
41 ;;
42 all0256n)
43 ucidef_set_rssimon "wlan0" "40000" "1"
44 ucidef_set_led_rssi "rssilow" "RSSILOW" "all0256n:green:rssilow" "wlan0" "1" "40" "0" "6"
45 ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "all0256n:green:rssimed" "wlan0" "30" "80" "-29" "5"
46 ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "all0256n:green:rssihigh" "wlan0" "70" "100" "-69" "8"
47 set_wifi_led "rt2800pci-phy0::radio"
48 ;;
49 ar670w|\
50 ar725w|\
51 awapn2403)
52 set_wifi_led "rt2800soc-phy0::radio"
53 ;;
54 asl26555)
55 ucidef_set_led_default "power" "POWER" "asl26555:green:power" "1"
56 ucidef_set_led_netdev "eth" "ETH" "asl26555:green:eth" "eth0"
57 set_wifi_led "asl26555:green:wlan"
58 set_usb_led "asl26555:green:3g"
59 ;;
60 bc2)
61 set_usb_led "bc2:blue:usb"
62 ;;
63 br6425)
64 set_wifi_led "edimax:orange:wlan"
65 ;;
66 br-6475nd)
67 set_wifi_led "edimax:amber:wlan"
68 ;;
69 broadway)
70 set_usb_led "red:diskmounted"
71 set_wifi_led "red:wps_active"
72 ;;
73 br6524n)
74 set_wifi_led "edimax:blue:wlan"
75 ;;
76 cf-wr800n)
77 ucidef_set_led_netdev "lan" "lan" "comfast:white:ethernet" eth0.1
78 set_wifi_led "comfast:white:wifi"
79 ;;
80 cy-swr1100)
81 ucidef_set_led_default "wps" "WPS" "samsung:blue:wps" "0"
82 set_usb_led "samsung:blue:usb"
83 ;;
84 d105)
85 ucidef_set_led_default "power" "POWER" "d105:red:power" "1"
86 set_usb_led "d105:green:usb"
87 ;;
88 dcs-930l-b1)
89 ucidef_set_led_default "power" "POWER" "d-link:red:power" "1"
90 ucidef_set_led_netdev "wifi" "WiFi" "d-link:blue:wps"
91 ;;
92 dir-300-b1|\
93 dir-600-b1|\
94 dir-600-b2|\
95 dir-620-a1)
96 # ANDed with vlan switch port 4 led state
97 ucidef_set_led_default "wan" "WAN LED (amber)" "d-link:amber:wan" "1"
98 set_wifi_led "rt2800pci-phy0::radio"
99 ;;
100 dir-615-d|\
101 dir-615-h1)
102 ucidef_set_led_default "status" "Status LED (amber)" "d-link:amber:status" "0"
103 set_wifi_led "rt2800pci-phy0::radio"
104 ;;
105 dir-620-d1)
106 set_wifi_led "d-link:green:wifi"
107 ;;
108 dir-810l)
109 ucidef_set_led_default "power" "POWER" "d-link:green:power" "1"
110 ;;
111 dir-610-a1 |\
112 dir-300-b7 |\
113 dir-320-b1 |\
114 esr-9753)
115 set_wifi_led "rt2800pci-phy0::radio"
116 ;;
117 f5d8235-v1)
118 set_usb_led "f5d8235-v1:blue:storage"
119 ;;
120 f5d8235-v2)
121 set_usb_led "f5d8235v2:blue:storage"
122 ;;
123 fonera20n)
124 set_usb_led "fonera20n:orange:usb"
125 set_wifi_led "fonera20n:orange:wifi"
126 ;;
127 hlk-rm04)
128 set_wifi_led "rt2800pci-phy0::radio"
129 ;;
130 ht-tm02)
131 ucidef_set_led_netdev "eth" "Ethernet" "ht-tm02:green:lan" "eth0"
132 set_wifi_led "ht-tm02:blue:wlan"
133 ;;
134 all0239-3g|\
135 hw550-3g)
136 set_usb_led "hw550-3g:green:usb"
137 ;;
138 mlw221|\
139 mlwg2)
140 set_wifi_led "kingston:blue:wifi"
141 ucidef_set_led_default "system" "system" "kingston:blue:system" "1"
142 ;;
143 mofi3500-3gn)
144 set_usb_led "mofi3500-3gn:green:usb"
145 ;;
146 mpr-a1)
147 set_wifi_led "hame:blue:system"
148 ;;
149 mpr-a2)
150 set_wifi_led "hame:blue:system"
151 ;;
152 mr-102n)
153 set_wifi_led "mr-102n:green:wlan"
154 set_usb_led "mr-102n:green:usb"
155 ;;
156 mzk-w300nh2)
157 set_wifi_led "mzkw300nh2:amber:wlan"
158 ;;
159 na930)
160 set_usb_led "na930:blue:status"
161 ;;
162 nw718)
163 set_usb_led "nw718:amber:usb"
164 ;;
165 m2m)
166 set_wifi_led "m2m:blue:wifi"
167 ucidef_set_led_netdev "eth" "Ethernet" "m2m:green:wan" "eth0"
168 ;;
169 omni-emb-hpm)
170 ucidef_set_led_default "power" "POWER" "emb:orange:power" "1"
171 ucidef_set_led_netdev "eth" "ETH" "emb:green:eth" "eth0"
172 set_wifi_led "emb:green:wifi"
173 ;;
174 omni-plug)
175 set_wifi_led "miniplug:green:wlan"
176 set_usb_led "miniplug:green:mobile"
177 ;;
178 px4885)
179 set_wifi_led "7links:orange:wifi"
180 set_usb_led "7links:blue:storage"
181 ;;
182 pbr-m1)
183 ucidef_set_led_netdev "internet" "internet" "pbr-m1:green:internet" "eth0.2"
184 ucidef_set_led_default "power" "power" "pbr-m1:green:power" "1"
185 ucidef_set_led_default "sys" "sys" "pbr-m1:green:sys" "1"
186 ;;
187 sl-r7205)
188 set_wifi_led "rt2800pci-phy0::radio"
189 ;;
190 v11st-fe)
191 set_wifi_led "rt2800pci-phy0::radio"
192 ;;
193 vocore)
194 ucidef_set_led_netdev "eth" "ETH" "vocore:orange:eth" "eth0"
195 set_wifi_led "vocore:green:status"
196 ;;
197 w306r-v20)
198 set_wifi_led "rt2800pci-phy0::radio"
199 ;;
200 w502u)
201 set_usb_led "alfa:blue:usb"
202 set_wifi_led "rt2800pci-phy0::radio"
203 ;;
204 wcr-150gn)
205 set_usb_led "wcr150gn:amber:user"
206 ;;
207 hg255d)
208 set_wifi_led "hg255d:wlan"
209 set_usb_led "hg255d:usb"
210 ucidef_set_led_interface "lan" "hg255d:internet"
211 ;;
212 wnce2001)
213 set_wifi_led "netgear:green:wlan"
214 ;;
215 rt-n14u)
216 ucidef_set_led_default "power" "power" "asus:blue:power" "1"
217 ucidef_set_led_netdev "lan" "lan" "asus:blue:lan" eth0.1
218 ucidef_set_led_netdev "wan" "wan" "asus:blue:wan" eth0.2
219 set_wifi_led "asus:blue:air"
220 set_usb_led "asus:blue:usb"
221 ;;
222 rp-n53)
223 ucidef_set_led_netdev "eth" "Network" "asus:white:back" "eth0"
224 set_wifi_led "asus:blue:wifi"
225 ;;
226 whr-300hp2 |\
227 whr-600d |\
228 whr-1166d)
229 ucidef_set_led_default "power" "power" "buffalo:green:power" "1"
230 ucidef_set_led_default "router" "router" "buffalo:green:router" "1"
231 ;;
232 zbt-wa05)
233 ucidef_set_led_default "power" "power" "zbtlink:blue:power" "1"
234 set_wifi_led "zbtlink:blue:air"
235 set_usb_led "zbtlink:blue:usb"
236 ;;
237 wr8305rt)
238 ucidef_set_led_default "power" "power" "wr8305rt:sys" "1"
239 set_usb_led "wr8305rt:usb"
240 set_wifi_led "wr8305rt:wifi"
241 ;;
242 wt1520)
243 set_wifi_led "rt2800pci-phy0::radio"
244 ;;
245 wt3020)
246 ucidef_set_led_default "power" "power" "nexx:blue:power" "0"
247 ;;
248 xiaomi-miwifi-mini)
249 ucidef_set_led_default "power" "power" "xiaomi:red:status" "1"
250 ;;
251 y1 |\
252 y1s)
253 ucidef_set_led_default "power" "power" "lenovo:blue:power" "1"
254 set_usb_led "lenovo:blue:usb"
255 set_wifi_led "lenovo:blue:wifi"
256 ;;
257 zte-q7)
258 set_wifi_led "zte:blue:status"
259 ;;
260 esac
261
262 board_config_flush
263
264 exit 0