ath79: add support for TP-Link TL-WR940N v6
[openwrt/openwrt.git] / target / linux / ath79 / tiny / base-files / etc / board.d / 01_leds
1 #!/bin/sh
2
3 . /lib/functions/uci-defaults.sh
4
5 board_config_update
6
7 board=$(board_name)
8 boardname="${board##*,}"
9
10 case "$board" in
11 buffalo,whr-g301n)
12 ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth0"
13 ucidef_set_led_switch "lan1" "LAN1" "$boardname:green:lan1" "switch0" "0x02"
14 ucidef_set_led_switch "lan2" "LAN2" "$boardname:green:lan2" "switch0" "0x04"
15 ucidef_set_led_switch "lan3" "LAN3" "$boardname:green:lan3" "switch0" "0x08"
16 ucidef_set_led_switch "lan4" "LAN4" "$boardname:green:lan4" "switch0" "0x10"
17 ;;
18 dlink,dir-615-e4)
19 ucidef_set_led_netdev "wan" "WAN" "d-link:green:wan" "eth0"
20 ucidef_set_led_switch "lan1" "LAN1" "d-link:green:lan1" "switch0" "0x02"
21 ucidef_set_led_switch "lan2" "LAN2" "d-link:green:lan2" "switch0" "0x04"
22 ucidef_set_led_switch "lan3" "LAN3" "d-link:green:lan3" "switch0" "0x08"
23 ucidef_set_led_switch "lan4" "LAN4" "d-link:green:lan4" "switch0" "0x10"
24 ;;
25 netgear,wnr1000-v2|\
26 netgear,wnr2000-v3)
27 ucidef_set_led_netdev "wan-amber" "WAN (amber)" "netgear:amber:wan" "eth0"
28 ucidef_set_led_switch "lan1green" "LAN1 (green)" "netgear:green:lan1" "switch0" "0x02" "0x04"
29 ucidef_set_led_switch "lan2green" "LAN2 (green)" "netgear:green:lan2" "switch0" "0x04" "0x04"
30 ucidef_set_led_switch "lan3green" "LAN3 (green)" "netgear:green:lan3" "switch0" "0x08" "0x04"
31 ucidef_set_led_switch "lan4green" "LAN4 (green)" "netgear:green:lan4" "switch0" "0x10" "0x04"
32 ucidef_set_led_switch "lan1amber" "LAN1 (amber)" "netgear:amber:lan1" "switch0" "0x02" "0x02"
33 ucidef_set_led_switch "lan2amber" "LAN2 (amber)" "netgear:amber:lan2" "switch0" "0x04" "0x02"
34 ucidef_set_led_switch "lan3amber" "LAN3 (amber)" "netgear:amber:lan3" "switch0" "0x08" "0x02"
35 ucidef_set_led_switch "lan4amber" "LAN4 (amber)" "netgear:amber:lan4" "switch0" "0x10" "0x02"
36 ;;
37 netgear,wnr612-v2|\
38 on,n150r)
39 ucidef_set_led_netdev "wan" "WAN" "netgear:green:wan" "eth0"
40 ucidef_set_led_switch "lan1" "LAN1" "netgear:green:lan1" "switch0" "0x02" "0x0f"
41 ucidef_set_led_switch "lan2" "LAN2" "netgear:green:lan2" "switch0" "0x04" "0x0f"
42 ;;
43 tplink,tl-mr3020-v1|\
44 tplink,tl-mr3040-v2|\
45 tplink,tl-wa830re-v1)
46 ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
47 ;;
48 tplink,tl-mr3420-v2|\
49 tplink,tl-wr740n-v4|\
50 tplink,tl-wr741nd-v4|\
51 tplink,tl-wr841-v8)
52 ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth1"
53 ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x04"
54 ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
55 ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x10"
56 ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
57 ;;
58 tplink,tl-wa850re-v1|\
59 tplink,tl-wa850re-v2)
60 ucidef_set_led_netdev "lan" "LAN" "tp-link:blue:lan" "eth0"
61 ucidef_set_rssimon "wlan0" "200000" "1"
62 ucidef_set_led_rssi "rssilow" "RSSILOW" "tp-link:blue:signal1" "wlan0" "1" "100"
63 ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "tp-link:blue:signal2" "wlan0" "20" "100"
64 ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "tp-link:blue:signal3" "wlan0" "40" "100"
65 ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "tp-link:blue:signal4" "wlan0" "60" "100"
66 ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:blue:signal5" "wlan0" "80" "100"
67 ;;
68 tplink,tl-wr740n-v1|\
69 tplink,tl-wr740n-v3|\
70 tplink,tl-wr741-v1|\
71 tplink,tl-wr743nd-v1|\
72 tplink,tl-wr841-v5|\
73 tplink,tl-wr941-v4)
74 ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth0"
75 ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x02"
76 ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x04"
77 ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x08"
78 ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x10"
79 ;;
80 tplink,tl-wr841-v9|\
81 tplink,tl-wr841-v10|\
82 tplink,tl-wr841-v11|\
83 tplink,tl-wr841-v12)
84 ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth1"
85 ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
86 ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
87 ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x04"
88 ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
89 ;;
90 tplink,tl-wr940n-v3|\
91 tplink,tl-wr940n-v4|\
92 tplink,tl-wr941nd-v6)
93 ucidef_set_led_netdev "wan" "WAN" "tp-link:blue:wan" "eth1"
94 ucidef_set_led_switch "lan1" "LAN1" "tp-link:blue:lan1" "switch0" "0x10"
95 ucidef_set_led_switch "lan2" "LAN2" "tp-link:blue:lan2" "switch0" "0x08"
96 ucidef_set_led_switch "lan3" "LAN3" "tp-link:blue:lan3" "switch0" "0x04"
97 ucidef_set_led_switch "lan4" "LAN4" "tp-link:blue:lan4" "switch0" "0x02"
98 ;;
99 tplink,tl-wr940n-v6)
100 ucidef_set_led_netdev "wan" "WAN" "tp-link:blue:wan" "eth1"
101 ;;
102 esac
103
104 board_config_flush
105
106 exit 0