ralink: DIR-300 B7 and DIR-320/NRU B1 on Ralink RT5350
[openwrt/svn-archive/archive.git] / target / linux / ramips / base-files / etc / uci-defaults / 01_leds
1 #!/bin/sh
2
3 . /lib/functions/uci-defaults.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 board=$(ramips_board_name)
15
16 case $board in
17 3g-6200n)
18 set_wifi_led "edimax:amber:wlan"
19 set_usb_led "edimax:blue:3g"
20 ;;
21 3g-6200nl)
22 set_wifi_led "edimax:green:wlan"
23 ;;
24 3g300m)
25 set_usb_led "tenda:blue:3g"
26 ;;
27 air3gii)
28 set_wifi_led "airlive:green:wlan"
29 set_usb_led "airlive:green:mobile"
30 ;;
31 all0256n)
32 ucidef_set_rssimon "wlan0" "40000" "1"
33 ucidef_set_led_rssi "rssilow" "RSSILOW" "all0256n:green:rssilow" "wlan0" "1" "40" "0" "6"
34 ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "all0256n:green:rssimed" "wlan0" "30" "80" "-29" "5"
35 ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "all0256n:green:rssihigh" "wlan0" "70" "100" "-69" "8"
36 set_wifi_led "rt2800pci-phy0::radio"
37 ;;
38 asl26555)
39 ucidef_set_led_default "power" "POWER" "asl26555:green:power" "1"
40 ucidef_set_led_netdev "eth" "ETH" "asl26555:green:eth" "eth0"
41 set_wifi_led "asl26555:green:wlan"
42 set_usb_led "asl26555:green:3g"
43 ;;
44 bc2)
45 set_usb_led "bc2:blue:usb"
46 ;;
47 br6425)
48 set_wifi_led "edimax:orange:wlan"
49 ;;
50 broadway)
51 set_usb_led "red:diskmounted"
52 set_wifi_led "red:wps_active"
53 ;;
54 br6524n)
55 set_wifi_led "edimax:blue:wlan"
56 ;;
57 d105)
58 ucidef_set_led_default "power" "POWER" "d105:red:power" "1"
59 set_usb_led "d105:green:usb"
60 ;;
61 dir-300-b1|\
62 dir-600-b1|\
63 dir-600-b2|\
64 dir-620-a1)
65 # ANDed with vlan switch port 4 led state
66 ucidef_set_led_default "wan" "WAN LED (amber)" "d-link:amber:wan" "1"
67 set_wifi_led "rt2800pci-phy0::radio"
68 ;;
69 dir-615-d|\
70 dir-615-h1)
71 ucidef_set_led_default "status" "Status LED (amber)" "d-link:amber:status" "0"
72 set_wifi_led "rt2800pci-phy0::radio"
73 ;;
74 dir-620-d1)
75 set_wifi_led "d-link:green:wifi"
76 ;;
77 dir-810l)
78 ucidef_set_led_default "power" "POWER" "dlink:green:power" "1"
79 ;;
80 dir-610-a1 |\
81 dir-300-b7 |\
82 dir-320-b1 |\
83 esr-9753)
84 set_wifi_led "rt2800pci-phy0::radio"
85 ;;
86 f5d8235-v1)
87 set_usb_led "f5d8235-v1:blue:storage"
88 ;;
89 f5d8235-v2)
90 set_usb_led "f5d8235v2:blue:storage"
91 ;;
92 fonera20n)
93 set_usb_led "fonera20n:orange:usb"
94 set_wifi_led "fonera20n:orange:wifi"
95 ;;
96 all0239-3g|\
97 hw550-3g)
98 set_usb_led "hw550-3g:green:usb"
99 ;;
100 mofi3500-3gn)
101 set_usb_led "mofi3500-3gn:green:usb"
102 ;;
103 mpr-a1)
104 set_wifi_led "mpr-a1:blue:system"
105 ;;
106 mpr-a2)
107 set_wifi_led "mpr-a2:blue:system"
108 ;;
109 mzk-w300nh2)
110 set_wifi_led "mzkw300nh2:amber:wlan"
111 ;;
112 nw718)
113 set_usb_led "nw718:amber:usb"
114 ;;
115 omni-emb-hpm)
116 ucidef_set_led_default "power" "POWER" "emb:orange:power" "1"
117 ucidef_set_led_netdev "eth" "ETH" "emb:green:eth" "eth0"
118 set_wifi_led "emb:green:wifi"
119 ;;
120 sl-r7205)
121 set_wifi_led "rt2800pci-phy0::radio"
122 ;;
123 v11st-fe)
124 set_wifi_led "rt2800pci-phy0::radio"
125 ;;
126 w306r-v20)
127 set_wifi_led "rt2800pci-phy0::radio"
128 ;;
129 w502u)
130 set_usb_led "alfa:blue:usb"
131 set_wifi_led "rt2800pci-phy0::radio"
132 ;;
133 wcr-150gn)
134 set_usb_led "wcr150gn:amber:user"
135 ;;
136 hg255d)
137 set_wifi_led "hg255d:wlan"
138 set_usb_led "hg255d:usb"
139 ucidef_set_led_netdev "eth" "Internet" "hg255d:internet" "eth0.2"
140 ;;
141 wnce2001)
142 set_wifi_led "netgear:green:wlan"
143 ;;
144 rp-n53)
145 ucidef_set_led_netdev "eth" "Network" "asus:white:back" "eth0"
146 set_wifi_led "asus:blue:wifi"
147 ;;
148 esac
149
150 ucidef_commit_leds
151
152 exit 0