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