4fa4434efefaa5f85374ad144f76cc6eba38a3d0
[openwrt/openwrt.git] / target / linux / ath79 / 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 "avm,fritz300e")
12 ucidef_set_led_netdev "lan" "LAN" "$boardname:green:lan" "eth0"
13 ucidef_set_rssimon "wlan0" "200000" "1"
14 ucidef_set_led_rssi "rssilow" "RSSILOW" "$boardname:green:rssi0" "wlan0" "1" "100"
15 ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "$boardname:green:rssi1" "wlan0" "20" "100"
16 ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "$boardname:green:rssi2" "wlan0" "40" "100"
17 ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "$boardname:green:rssi3" "wlan0" "60" "100"
18 ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$boardname:green:rssi4" "wlan0" "80" "100"
19 ;;
20 "etactica,eg200")
21 ucidef_set_led_netdev "lan" "LAN" "$boardname:red:eth0" "eth0"
22 ucidef_set_led_oneshot "modbus" "Modbus" "$boardname:red:modbus" "100" "33"
23 ucidef_set_led_default "etactica" "etactica" "$boardname:red:etactica" "ignore"
24 ;;
25 "netgear,wnr612-v2"|\
26 "on,n150r")
27 ucidef_set_led_netdev "wan" "WAN" "netgear:green:wan" "eth0"
28 ucidef_set_led_switch "lan1" "LAN1" "netgear:green:lan1" "switch0" "0x02" "0x0f"
29 ucidef_set_led_switch "lan2" "LAN2" "netgear:green:lan2" "switch0" "0x04" "0x0f"
30 ;;
31
32 "pcs,cap324")
33 ucidef_set_led_netdev "lan" "LAN" "pcs:lan:green" "eth0"
34 ;;
35
36 "pcs,cr5000")
37 ucidef_set_led_usbdev "usb" "USB" "pcs:white:wps" "1-1"
38 ;;
39
40 "tplink,re450-v2")
41 ucidef_set_led_netdev "lan_data" "LAN Data" "tp-link:green:lan_data" "eth0" "tx rx"
42 ucidef_set_led_netdev "lan_link" "LAN Link" "tp-link:green:lan_link" "eth0" "link"
43 ;;
44 "tplink,tl-mr3020-v1")
45 ucidef_set_led_switch "lan" "LAN" "tp-link:green:lan" "switch0" "0x02"
46 ;;
47 "tplink,tl-wr1043nd-v4")
48 ucidef_set_led_switch "wan" "WAN" "tp-link:green:wan" "switch0" "0x20"
49 ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
50 ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
51 ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x04"
52 ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
53 ;;
54 "tplink,tl-wr740n-v2")
55 ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth0"
56 ucidef_set_led_switch "lan1" "LAN1" "$boardname:green:lan1" "switch0" "0x02"
57 ucidef_set_led_switch "lan2" "LAN2" "$boardname:green:lan2" "switch0" "0x04"
58 ucidef_set_led_switch "lan3" "LAN3" "$boardname:green:lan3" "switch0" "0x08"
59 ucidef_set_led_switch "lan4" "LAN4" "$boardname:green:lan4" "switch0" "0x10"
60 ;;
61 "tplink,tl-wr741nd-v4"|\
62 "tplink,tl-wr740nd-v4")
63 ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth1"
64 ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x04"
65 ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
66 ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x10"
67 ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
68 ;;
69 esac
70
71 board_config_flush
72
73 exit 0