treewide: use the generic board_name function
[openwrt/staging/mkresin.git] / target / linux / ramips / base-files / etc / board.d / 01_leds
index 2a35fc4bc21af9676bcc27ed598c865b88512e74..83141dedd8db3aa45ec0be7fb9b7e37c651d0e30 100755 (executable)
@@ -1,7 +1,6 @@
 #!/bin/sh
 
 . /lib/functions/uci-defaults.sh
-. /lib/ramips.sh
 
 set_usb_led() {
        ucidef_set_led_usbdev "usb" "USB" "${1}" "${2:-1-1}"
@@ -12,7 +11,7 @@ set_wifi_led() {
 }
 
 
-board=$(ramips_board_name)
+board=$(board_name)
 
 board_config_update
 
@@ -189,6 +188,9 @@ gl-mt300n|\
 gl-mt750)
        set_wifi_led "$board:wlan"
        ;;
+gl-mt300n-v2)
+       set_wifi_led "$board:red:wlan"
+       ;;
 hc5661|\
 hc5661a)
        ucidef_set_led_default "system" "system" "$board:blue:system" "1"
@@ -333,6 +335,19 @@ tiny-ac)
        set_wifi_led "$board:orange:wifi"
        set_usb_led "$board:green:usb"
        ;;
+tl-wr840n-v4)
+       set_wifi_led "$board:green:wlan"
+       ucidef_set_led_switch "lan" "lan" "$board:green:lan" "switch0" "0x1e"
+       ucidef_set_led_switch "wan" "wan" "$board:green:wan" "switch0" "0x01"
+       ;;
+tl-wr841n-v13)
+       set_wifi_led "$board:green:wlan"
+       ucidef_set_led_switch "lan1" "lan1" "$board:green:lan1" "switch0" "0x2"
+       ucidef_set_led_switch "lan2" "lan2" "$board:green:lan2" "switch0" "0x4"
+       ucidef_set_led_switch "lan3" "lan3" "$board:green:lan3" "switch0" "0x8"
+       ucidef_set_led_switch "lan4" "lan4" "$board:green:lan4" "switch0" "0x10"
+       ucidef_set_led_switch "wan" "wan" "$board:green:wan" "switch0" "0x01"
+       ;;
 vocore-8M|\
 vocore-16M)
        ucidef_set_led_netdev "eth" "ETH" "vocore:orange:eth" "eth0"
@@ -356,9 +371,9 @@ whr-600d)
        ;;
 wl-wn575a3)
        ucidef_set_rssimon "wlan1" "200000" "1"
-       ucidef_set_led_rssi "wifi-low" "wifi-low" "$board:green:wifi-low" "wlan1" "1" "49" "0" "1"
-       ucidef_set_led_rssi "wifi-med" "wifi-med" "$board:green:wifi-med" "wlan1" "50" "84" "0" "1"
-       ucidef_set_led_rssi "wifi-high" "wifi-high" "$board:green:wifi-high" "wlan1" "85" "100" "0" "1"
+       ucidef_set_led_rssi "wifi-low" "wifi-low" "$board:green:wifi-low" "wlan1" "1" "49"
+       ucidef_set_led_rssi "wifi-med" "wifi-med" "$board:green:wifi-med" "wlan1" "50" "84"
+       ucidef_set_led_rssi "wifi-high" "wifi-high" "$board:green:wifi-high" "wlan1" "85" "100"
        ;;
 wrh-300cr)
        set_wifi_led "$board:green:wlan"