ramips: fix USB LED for Belkin F9K1109v1
[oweals/openwrt.git] / target / linux / ramips / rt3883 / base-files / etc / board.d / 01_leds
1 #!/bin/sh
2
3 . /lib/functions/leds.sh
4 . /lib/functions/uci-defaults.sh
5
6 set_wifi_led() {
7         ucidef_set_led_netdev "wifi_led" "wifi" "${1}" "${2:-wlan0}"
8 }
9
10
11 board=$(board_name)
12 boardname="${board##*,}"
13
14 board_config_update
15
16 led_wlan="$(get_dt_led wlan)"
17 [ -n "$led_wlan" ] && ucidef_set_led_wlan "wifi_led" "wifi" "$led_wlan" "phy0tpt"
18
19 case $board in
20 belkin,f9k1109v1)
21         ucidef_set_led_usbport "usb" "USB" "$boardname:green:usb1" "usb1-port1"
22         ucidef_set_led_netdev "lan" "lan" "$boardname:blue:wps" "eth0"
23         ;;
24 edimax,br-6475nd)
25         set_wifi_led "$boardname:amber:wlan"
26         ;;
27 omnima,hpm)
28         ucidef_set_led_netdev "eth" "ETH" "$boardname:green:eth" "eth0"
29         set_wifi_led "$boardname:green:wifi"
30         ;;
31 esac
32
33 board_config_flush
34
35 exit 0