treewide: use the generic board_name function
[openwrt/openwrt.git] / target / linux / ar71xx / base-files / etc / diag.sh
index 369abde9d49e84f616363d19bc2496ca04ccf07a..1dc48624a0ec57e0e6ed47c94795ac9c8412e11a 100644 (file)
@@ -1,11 +1,11 @@
 #!/bin/sh
 # Copyright (C) 2009-2013 OpenWrt.org
 
+. /lib/functions.sh
 . /lib/functions/leds.sh
-. /lib/ar71xx.sh
 
 get_status_led() {
-       local board=$(ar71xx_board_name)
+       local board=$(board_name)
 
        case $board in
        a40)
@@ -51,14 +51,18 @@ get_status_led() {
        ap135-020)
                status_led="ap135:green:status"
                ;;
+       archer-c25-v1|\
+       archer-c58-v1|\
        archer-c59-v1|\
        archer-c60-v1|\
+       fritz300e|\
        mr12|\
        mr16|\
        nbg6616|\
        sc1750|\
        sc450|\
-       tl-wpa8630)
+       tl-wpa8630|\
+       tl-wr902ac-v1)
                status_led="$board:green:power"
                ;;
        ap90q|\
@@ -171,7 +175,7 @@ get_status_led() {
                status_led="$board:blue:status"
                ;;
        eap120)
-               status_led="$(ar71xx_board_name):green:system"
+               status_led="$board:green:system"
                ;;
        eap300v2)
                status_led="engenius:blue:power"
@@ -367,6 +371,7 @@ get_status_led() {
        tl-wa850re-v2)
                status_led="tp-link:blue:re"
                ;;
+       tl-wa855re-v1|\
        tl-wa860re)
                status_led="tp-link:green:power"
                ;;
@@ -511,7 +516,7 @@ set_state() {
                ;;
        done)
                status_led_on
-               case $(ar71xx_board_name) in
+               case $(board_name) in
                gl-ar300m)
                        fw_printenv lc >/dev/null 2>&1 && fw_setenv "bootcount" 0
                        ;;