31bd9e05b18c84f30d18c807e287d29b20c83c1c
[openwrt/openwrt.git] / target / linux / ramips / mt76x8 / base-files / etc / board.d / 01_leds
1 #!/bin/sh
2
3 . /lib/functions/leds.sh
4 . /lib/functions/uci-defaults.sh
5
6 board=$(board_name)
7
8 board_config_update
9
10 case $board in
11 alfa-network,awusfree1)
12 ucidef_set_led_netdev "wifi_led" "wifi" "blue:wlan" "wlan0"
13 ;;
14 asus,rt-n10p-v3|\
15 asus,rt-n11p-b1|\
16 asus,rt-n12-vp-b1|\
17 netgear,r6020|\
18 netgear,r6080|\
19 netgear,r6120)
20 ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0xf"
21 ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x10"
22 ;;
23 cudy,wr1000)
24 ucidef_set_led_switch "wan" "wan" "blue:wan" "switch0" "0x10"
25 ucidef_set_led_switch "lan1" "lan1" "blue:lan1" "switch0" "0x08"
26 ucidef_set_led_switch "lan2" "lan2" "blue:lan2" "switch0" "0x04"
27 ;;
28 glinet,gl-mt300n-v2)
29 ucidef_set_led_netdev "wifi_led" "wifi" "red:wlan" "wlan0"
30 ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x1"
31 ;;
32 hilink,hlk-7628n|\
33 skylab,skw92a)
34 ucidef_set_led_netdev "wifi_led" "wifi" "green:wlan" "wlan0"
35 ;;
36 hiwifi,hc5661a|\
37 hiwifi,hc5761a)
38 ucidef_set_led_switch "internet" "internet" "blue:internet" "switch0" "0x10"
39 ;;
40 mediatek,linkit-smart-7688)
41 ucidef_set_led_wlan "wifi" "wifi" "orange:wifi" "phy0tpt"
42 ;;
43 rakwireless,rak633)
44 ucidef_set_led_netdev "wifi_led" "wifi" "blue:wifi" "wlan0"
45 ;;
46 tama,w06)
47 ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0"
48 ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt"
49 ;;
50 tplink,archer-c20-v4|\
51 tplink,archer-c20-v5|\
52 tplink,tl-wr850n-v2)
53 ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x1e"
54 ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x01"
55 ;;
56 tplink,archer-c50-v3|\
57 tplink,archer-c50-v4)
58 ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x1e"
59 ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x01"
60 ucidef_set_led_wlan "wlan2g" "wlan2g" "green:wlan2g" "phy0tpt"
61 ucidef_set_led_wlan "wlan5g" "wlan5g" "green:wlan5g" "phy1tpt"
62 ;;
63 tplink,re200-v2|\
64 tplink,re200-v3|\
65 tplink,re200-v4|\
66 tplink,re220-v2|\
67 tplink,tl-mr3020-v3|\
68 tplink,tl-wa801nd-v5)
69 ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0"
70 ;;
71 tplink,tl-mr3420-v5|\
72 tplink,tl-wr840n-v4|\
73 tplink,tl-wr842n-v5)
74 ucidef_set_led_wlan "wlan2g" "wlan2g" "green:wlan" "phy0tpt"
75 ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x1e"
76 ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x01"
77 ;;
78 tplink,tl-mr6400-v4)
79 ucidef_set_led_switch "lan" "lan" "white:lan" "switch0" "0x0e"
80 ucidef_set_led_switch "wan" "wan" "white:wan" "switch0" "0x10"
81 ;;
82 tplink,tl-mr6400-v5)
83 ucidef_set_led_switch "lan" "lan" "white:lan" "switch0" "0x07"
84 ucidef_set_led_switch "wan" "wan" "white:wan" "switch0" "0x08"
85 ;;
86 tplink,tl-wr841n-v13)
87 ucidef_set_led_wlan "wlan2g" "wlan2g" "green:wlan" "phy0tpt"
88 ucidef_set_led_switch "lan1" "lan1" "green:lan1" "switch0" "0x2"
89 ucidef_set_led_switch "lan2" "lan2" "green:lan2" "switch0" "0x4"
90 ucidef_set_led_switch "lan3" "lan3" "green:lan3" "switch0" "0x8"
91 ucidef_set_led_switch "lan4" "lan4" "green:lan4" "switch0" "0x10"
92 ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x01"
93 ;;
94 tplink,tl-wr841n-v14)
95 ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x1e"
96 ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x01"
97 ucidef_set_led_wlan "wifi_led" "wifi" "green:wlan" "phy0tpt"
98 ;;
99 tplink,tl-wr902ac-v3)
100 ucidef_set_led_wlan "wlan2g" "wlan2g" "green:wlan" "phy0tpt"
101 ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x10"
102 ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x10"
103 ;;
104 unielec,u7628-01-16m)
105 ucidef_set_led_switch "lan1" "lan1" "green:lan1" "switch0" "0x2"
106 ucidef_set_led_switch "lan2" "lan2" "green:lan2" "switch0" "0x4"
107 ucidef_set_led_switch "lan3" "lan3" "green:lan3" "switch0" "0x8"
108 ucidef_set_led_switch "lan4" "lan4" "green:lan4" "switch0" "0x10"
109 ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x01"
110 ucidef_set_led_netdev "wifi_led" "wifi" "green:wlan" "wlan0"
111 ;;
112 wavlink,wl-wn570ha1)
113 ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x01"
114 ucidef_set_rssimon "wlan0" "200000" "1"
115 ucidef_set_led_rssi "wifi-low" "wifi-low" "green:wifi-low" "wlan0" "1" "49"
116 ucidef_set_led_rssi "wifi-med" "wifi-med" "green:wifi-med" "wlan0" "50" "84"
117 ucidef_set_led_rssi "wifi-high" "wifi-high" "green:wifi-high" "wlan0" "85" "100"
118 ucidef_set_led_netdev "wifi_led" "wifi" "green:wifi" "wlan0"
119 ;;
120 wavlink,wl-wn575a3)
121 ucidef_set_rssimon "wlan1" "200000" "1"
122 ucidef_set_led_rssi "wifi-low" "wifi-low" "green:wifi-low" "wlan1" "1" "49"
123 ucidef_set_led_rssi "wifi-med" "wifi-med" "green:wifi-med" "wlan1" "50" "84"
124 ucidef_set_led_rssi "wifi-high" "wifi-high" "green:wifi-high" "wlan1" "85" "100"
125 ;;
126 wavlink,wl-wn577a2)
127 ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x8"
128 ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x10"
129 ;;
130 zbtlink,zbt-we1226)
131 ucidef_set_led_netdev "wifi_led" "wifi" "green:wlan" "wlan0"
132 ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x01"
133 ucidef_set_led_switch "lan2" "LAN2" "green:lan2" "switch0" "0x02"
134 ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x10"
135 ;;
136 zyxel,keenetic-extra-ii)
137 ucidef_set_led_netdev "wifi_led" "wifi" "green:wifi" "wlan0"
138 ucidef_set_led_switch "internet" "internet" "green:internet" "switch0" "0x01"
139 ;;
140 esac
141
142 board_config_flush
143
144 exit 0