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