The following patch:
 * combines together boards with same configuration
 * removes unnecessary spaces

in base-files/etc/diag.sh script and:
 * sorts boards alphabetically

in base-files/etc/board.d/* scripts.

Signed-off-by: Piotr Dymacz <pep...@gmail.com>
---
 target/linux/ramips/base-files/etc/board.d/01_leds | 132 +++++-----
 .../linux/ramips/base-files/etc/board.d/02_network | 272 ++++++++++-----------
 target/linux/ramips/base-files/etc/diag.sh         | 152 ++++++------
 3 files changed, 284 insertions(+), 272 deletions(-)

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds 
b/target/linux/ramips/base-files/etc/board.d/01_leds
index d408659..2e6f2f9 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -17,6 +17,10 @@ board=$(ramips_board_name)
 board_config_update
 
 case $board in
+3g150b|\
+3g300m)
+       set_usb_led "tenda:blue:3g"
+       ;;
 3g-6200n)
        set_wifi_led "edimax:amber:wlan"
        set_usb_led "edimax:blue:3g"
@@ -24,21 +28,21 @@ case $board in
 3g-6200nl)
        set_wifi_led "edimax:green:wlan"
        ;;
-3g150b|\
-3g300m)
-       set_usb_led "tenda:blue:3g"
+a5-v11)
+       ucidef_set_led_default "power" "POWER" "a5-v11:red:power" "1"
        ;;
 ai-br100)
        ucidef_set_led_netdev "wan" "wan" "aigale:blue:wan" "eth0.2"
        set_wifi_led "aigale:blue:wlan"
        ;;
-a5-v11)
-       ucidef_set_led_default "power" "POWER" "a5-v11:red:power" "1"
-       ;;
 air3gii)
        set_wifi_led "airlive:green:wlan"
        set_usb_led "airlive:green:mobile"
        ;;
+all0239-3g|\
+hw550-3g)
+       set_usb_led "hw550-3g:green:usb"
+       ;;
 all0256n)
        ucidef_set_rssimon "wlan0" "40000" "1"
        ucidef_set_led_rssi "rssilow" "RSSILOW" "all0256n:green:rssilow" 
"wlan0" "1" "40" "0" "6"
@@ -66,13 +70,13 @@ br6425)
 br-6475nd)
        set_wifi_led "edimax:amber:wlan"
        ;;
+br6524n)
+       set_wifi_led "edimax:blue:wlan"
+       ;;
 broadway)
        set_usb_led "red:diskmounted"
        set_wifi_led "red:wps_active"
        ;;
-br6524n)
-       set_wifi_led "edimax:blue:wlan"
-       ;;
 cf-wr800n)
        ucidef_set_led_netdev "lan" "lan" "comfast:white:ethernet" eth0.1
        set_wifi_led "comfast:white:wifi"
@@ -97,17 +101,6 @@ dir-620-a1)
        ucidef_set_led_default "wan" "WAN LED (amber)" "d-link:amber:wan" "1"
        set_wifi_led "rt2800pci-phy0::radio"
        ;;
-dir-615-d|\
-dir-615-h1)
-       ucidef_set_led_default "status" "Status LED (amber)" 
"d-link:amber:status" "0"
-       set_wifi_led "rt2800pci-phy0::radio"
-       ;;
-dir-620-d1)
-       set_wifi_led "d-link:green:wifi"
-       ;;
-dir-810l)
-       ucidef_set_led_default "power" "POWER" "d-link:green:power" "1"
-       ;;
 dir-300-b7|\
 dir-320-b1|\
 dir-610-a1|\
@@ -119,6 +112,17 @@ w306r-v20|\
 wt1520)
        set_wifi_led "rt2800pci-phy0::radio"
        ;;
+dir-615-d|\
+dir-615-h1)
+       ucidef_set_led_default "status" "Status LED (amber)" 
"d-link:amber:status" "0"
+       set_wifi_led "rt2800pci-phy0::radio"
+       ;;
+dir-620-d1)
+       set_wifi_led "d-link:green:wifi"
+       ;;
+dir-810l)
+       ucidef_set_led_default "power" "POWER" "d-link:green:power" "1"
+       ;;
 f5d8235-v1)
        set_usb_led "f5d8235-v1:blue:storage"
        ;;
@@ -129,13 +133,18 @@ fonera20n)
        set_usb_led "fonera20n:orange:usb"
        set_wifi_led "fonera20n:orange:wifi"
        ;;
+hg255d)
+       set_wifi_led "hg255d:wlan"
+       set_usb_led "hg255d:usb"
+       ucidef_set_led_interface "lan" "hg255d:internet"
+       ;;
 ht-tm02)
        ucidef_set_led_netdev "eth" "Ethernet" "ht-tm02:green:lan" "eth0"
        set_wifi_led "ht-tm02:blue:wlan"
        ;;
-all0239-3g|\
-hw550-3g)
-       set_usb_led "hw550-3g:green:usb"
+m2m)
+       set_wifi_led "m2m:blue:wifi"
+       ucidef_set_led_netdev "eth" "Ethernet" "m2m:green:wan" "eth0"
        ;;
 mlw221|\
 mlwg2)
@@ -153,6 +162,9 @@ mr-102n)
        set_wifi_led "mr-102n:green:wlan"
        set_usb_led "mr-102n:green:usb"
        ;;
+mzk-dp150n)
+       ucidef_set_led_default "power" "power" "mzkdp150n:green:power" "1"
+       ;;
 mzk-w300nh2)
        set_wifi_led "mzkw300nh2:amber:wlan"
        ;;
@@ -162,10 +174,6 @@ na930)
 nw718)
        set_usb_led "nw718:amber:usb"
        ;;
-m2m)
-       set_wifi_led "m2m:blue:wifi"
-       ucidef_set_led_netdev "eth" "Ethernet" "m2m:green:wan" "eth0"
-       ;;
 omni-emb-hpm)
        ucidef_set_led_default "power" "POWER" "emb:orange:power" "1"
        ucidef_set_led_netdev "eth" "ETH" "emb:green:eth" "eth0"
@@ -175,15 +183,34 @@ omni-plug)
        set_wifi_led "miniplug:green:wlan"
        set_usb_led "miniplug:green:mobile"
        ;;
-px4885)
-       set_wifi_led "7links:orange:wifi"
-       set_usb_led "7links:blue:storage"
+oy-0001)
+       ucidef_set_led_default "power" "power" "oy:green:power" "1"
+       set_wifi_led "oy:green:wifi"
        ;;
 pbr-m1)
        ucidef_set_led_netdev "internet" "internet" "pbr-m1:green:internet" 
"eth0.2"
        ucidef_set_led_default "power" "power" "pbr-m1:green:power" "1"
        ucidef_set_led_default "sys" "sys" "pbr-m1:green:sys" "1"
        ;;
+px4885)
+       set_wifi_led "7links:orange:wifi"
+       set_usb_led "7links:blue:storage"
+       ;;
+re6500)
+       ucidef_set_led_default "power" "power" "linksys:white:power" "1"
+       ucidef_set_led_default "wifi" "wifi" "linksys:orange:wifi" "1"
+       ;;
+rp-n53)
+       ucidef_set_led_netdev "eth" "Network" "asus:white:back" "eth0"
+       set_wifi_led "asus:blue:wifi"
+       ;;
+rt-n14u)
+       ucidef_set_led_default "power" "power" "asus:blue:power" "1"
+       ucidef_set_led_netdev "lan" "lan" "asus:blue:lan" eth0.1
+       ucidef_set_led_netdev "wan" "wan" "asus:blue:wan" eth0.2
+       set_wifi_led "asus:blue:air"
+       set_usb_led "asus:blue:usb"
+       ;;
 sap-g3200u3)
        set_usb_led "storylink:green:usb"
        ;;
@@ -198,43 +225,14 @@ w502u)
 wcr-150gn)
        set_usb_led "wcr150gn:amber:user"
        ;;
-hg255d)
-       set_wifi_led "hg255d:wlan"
-       set_usb_led "hg255d:usb"
-       ucidef_set_led_interface "lan" "hg255d:internet"
-       ;;
-wnce2001)
-       set_wifi_led "netgear:green:wlan"
-       ;;
-re6500)
-       ucidef_set_led_default "power" "power" "linksys:white:power" "1"
-       ucidef_set_led_default "wifi" "wifi" "linksys:orange:wifi" "1"
-       ;;
-rt-n14u)
-       ucidef_set_led_default "power" "power" "asus:blue:power" "1"
-       ucidef_set_led_netdev "lan" "lan" "asus:blue:lan" eth0.1
-       ucidef_set_led_netdev "wan" "wan" "asus:blue:wan" eth0.2
-       set_wifi_led "asus:blue:air"
-       set_usb_led "asus:blue:usb"
-       ;;
-rp-n53)
-       ucidef_set_led_netdev "eth" "Network" "asus:white:back" "eth0"
-       set_wifi_led "asus:blue:wifi"
-       ;;
+whr-1166d|\
 whr-300hp2|\
-whr-600d|\
-whr-1166d)
+whr-600d)
        ucidef_set_led_default "power" "power" "buffalo:green:power" "1"
        ucidef_set_led_default "router" "router" "buffalo:green:router" "1"
        ;;
-zbt-wa05)
-       ucidef_set_led_default "power" "power" "zbtlink:blue:power" "1"
-       set_wifi_led "zbtlink:blue:air"
-       set_usb_led "zbtlink:blue:usb"
-       ;;
-oy-0001)
-       ucidef_set_led_default "power" "power" "oy:green:power" "1"
-       set_wifi_led "oy:green:wifi"
+wnce2001)
+       set_wifi_led "netgear:green:wlan"
        ;;
 wr8305rt)
        ucidef_set_led_default "power" "power" "wr8305rt:sys" "1"
@@ -253,12 +251,14 @@ y1s)
        set_usb_led "lenovo:blue:usb"
        set_wifi_led "lenovo:blue:wifi"
        ;;
+zbt-wa05)
+       ucidef_set_led_default "power" "power" "zbtlink:blue:power" "1"
+       set_wifi_led "zbtlink:blue:air"
+       set_usb_led "zbtlink:blue:usb"
+       ;;
 zte-q7)
        set_wifi_led "zte:blue:status"
        ;;
-mzk-dp150n)
-       ucidef_set_led_default "power" "power" "mzkdp150n:green:power" "1"
-       ;;
 esac
 
 board_config_flush
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network 
b/target/linux/ramips/base-files/etc/board.d/02_network
index 334e889..a781f46 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -37,16 +37,8 @@ ramips_setup_interfaces()
        ucidef_set_interface_loopback
 
        case $board in
-       a5-v11)
-               ucidef_set_interface_lan "eth0.1"
-               ucidef_add_switch "switch0" "1" "1"
-               ucidef_add_switch_vlan "switch0" "1" "0 6t"
-               ;;
        3g150b|\
        3g300m|\
-       microwrt|\
-       w150m|\
-       zte-q7|\
        all0256n|\
        all5002|\
        all5003|\
@@ -54,83 +46,33 @@ ramips_setup_interfaces()
        dcs-930|\
        dcs-930l-b1|\
        ht-tm02|\
+       microwrt|\
        ncs601w|\
-       wnce2001)
+       w150m|\
+       wnce2001\
+       zte-q7)
                ucidef_add_switch "switch0" "1" "0"
                ucidef_set_interface_lan "eth0"
                ;;
-       3g-6200nl|\
-       mlw221|\
-       mr-102n)
-               ucidef_set_interface_lan "eth0.2"
-               ;;
-       m2m)
-               ucidef_add_switch "switch0" "4"
-               ucidef_set_interface_lan "eth0"
-               ;;
-       mlwg2|\
-       wizard8800|\
-       wl-330n|\
-       wmr300)
-               ucidef_set_interface_lan "eth0.1"
-               ;;
-       b2c|\
-       nw718|\
-       psr-680w|\
-       sl-r7205|\
-       ur-336un|\
-       w502u|\
-       wr6202)
-               ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
-               ;;
-       awapn2403)
-               ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
-               ucidef_add_switch "switch0" "1" "1"
-               ucidef_add_switch_vlan "switch0" "1" "0 6t"
-               ucidef_add_switch_vlan "switch0" "2" "1 6t"
-               ;;
-       br-6475nd)
-               ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
-               ucidef_add_switch "switch0" "1" "1"
-               ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 9t"
-               ucidef_add_switch_vlan "switch0" "2" "0 9t"
-               ;;
-       re6500|\
-       asl26555)
-               ucidef_set_interface_lan "eth0.1"
-               ucidef_add_switch "switch0" "1" "1"
-               ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t"
-               ;;
-       cf-wr800n)
-               ucidef_set_interface_lan "eth0.1"
-               ucidef_add_switch "switch0" "1" "1"
-               ucidef_add_switch_vlan "switch0" "1" "4 6t"
-               ;;
-       cy-swr1100)
-               ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
-               ucidef_add_switch "switch0" "1" "1"
-               ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 9t"
-               ucidef_add_switch_vlan "switch0" "2" "4 9t"
-               ;;
        3g-6200n|\
        ai-br100|\
-       dir-610-a1|\
        dir-300-b7|\
        dir-320-b1|\
+       dir-610-a1|\
        dir-615-h1|\
        firewrt|\
-       pbr-m1|\
        hlk-rm04|\
        mt7621|\
        mt7628|\
-       mzk-w300nh2|\
        mzk-750dhp|\
-       whr-300hp2|\
-       whr-600d|\
+       mzk-w300nh2|\
        oy-0001|\
+       pbr-m1|\
        sap-g3200u3|\
-       wsr-600|\
+       whr-300hp2|\
+       whr-600d|\
        wsr-1166|\
+       wsr-600|\
        wt1520|\
        xiaomi-miwifi-mini|\
        y1)
@@ -139,30 +81,70 @@ ramips_setup_interfaces()
                ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 6t"
                ucidef_add_switch_vlan "switch0" "2" "4 6t"
                ;;
-       whr-1166d)
+       3g-6200nl|\
+       mlw221|\
+       mr-102n)
+               ucidef_set_interface_lan "eth0.2"
+               ;;
+       a5-v11)
+               ucidef_set_interface_lan "eth0.1"
+               ucidef_add_switch "switch0" "1" "1"
+               ucidef_add_switch_vlan "switch0" "1" "0 6t"
+               ;;
+       ar670w|\
+       ar725w|\
+       rt-n15|\
+       wl-351)
                ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
                ucidef_add_switch "switch0" "1" "1"
-               ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 6t"
-               ucidef_add_switch_vlan "switch0" "2" "5 6t"
+               ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5t"
+               ucidef_add_switch_vlan "switch0" "2" "4 5t"
                ;;
+       argus-atp52b|\
        awm002-evb|\
        awm003-evb|\
-       argus-atp52b|\
        dir-645|\
        dir-860l-b1|\
        f5d8235-v1|\
        f5d8235-v2|\
        hg255d|\
        rt-n14u|\
+       ur-326n4g|\
        wrtnode|\
        wt3020|\
-       ur-326n4g|\
        zbt-wa05)
                ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
                ucidef_add_switch "switch0" "1" "1"
                ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t"
                ucidef_add_switch_vlan "switch0" "2" "0 6t"
                ;;
+       asl26555|\
+       re6500)
+               ucidef_set_interface_lan "eth0.1"
+               ucidef_add_switch "switch0" "1" "1"
+               ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t"
+               ;;
+       awapn2403)
+               ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
+               ucidef_add_switch "switch0" "1" "1"
+               ucidef_add_switch_vlan "switch0" "1" "0 6t"
+               ucidef_add_switch_vlan "switch0" "2" "1 6t"
+               ;;
+       b2c|\
+       nw718|\
+       psr-680w|\
+       sl-r7205|\
+       ur-336un|\
+       w502u|\
+       wr6202)
+               ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
+               ;;
+       br-6475nd)
+               ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
+               ucidef_add_switch "switch0" "1" "1"
+               ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 9t"
+               ucidef_add_switch_vlan "switch0" "2" "0 9t"
+               ;;
        br6524n|\
        v11st-fe|\
        wzr-agl300nh)
@@ -171,14 +153,45 @@ ramips_setup_interfaces()
                ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 5t"
                ucidef_add_switch_vlan "switch0" "2" "0 5t"
                ;;
-       ar670w|\
-       ar725w|\
-       rt-n15|\
-       wl-351)
+       cf-wr800n)
+               ucidef_set_interface_lan "eth0.1"
+               ucidef_add_switch "switch0" "1" "1"
+               ucidef_add_switch_vlan "switch0" "1" "4 6t"
+               ;;
+       cy-swr1100)
                ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
                ucidef_add_switch "switch0" "1" "1"
-               ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5t"
-               ucidef_add_switch_vlan "switch0" "2" "4 5t"
+               ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 9t"
+               ucidef_add_switch_vlan "switch0" "2" "4 9t"
+               ;;
+       d105|\
+       na930|\
+       omni-emb-hpm|\
+       wli-tx4-ag300n)
+               ucidef_set_interface_lan "eth0"
+               ;;
+       e1700|\
+       mt7620a_mt7530)
+               ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
+               ucidef_add_switch "switch1" "1" "1"
+               ucidef_add_switch_vlan "switch1" "1" "0 1 2 3 6t"
+               ucidef_add_switch_vlan "switch1" "2" "4 6t"
+               ;;
+       m2m)
+               ucidef_add_switch "switch0" "4"
+               ucidef_set_interface_lan "eth0"
+               ;;
+       mlwg2|\
+       wizard8800|\
+       wl-330n|\
+       wmr300)
+               ucidef_set_interface_lan "eth0.1"
+               ;;
+       mzk-dp150n|\
+       vocore)
+               ucidef_set_interface_lan "eth0.1"
+               ucidef_add_switch "switch0" "1" "1"
+               ucidef_add_switch_vlan "switch0" "1" "0 4 6t"
                ;;
        rt-n56u)
                ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
@@ -193,18 +206,18 @@ ramips_setup_interfaces()
                ucidef_add_switch_vlan "switch0" "1" "0t 1 2 3 4"
                ucidef_add_switch_vlan "switch0" "2" "0t 5"
                ;;
-       mzk-dp150n|\
-       vocore)
-               ucidef_set_interface_lan "eth0.1"
-               ucidef_add_switch "switch0" "1" "1"
-               ucidef_add_switch_vlan "switch0" "1" "0 4 6t"
-               ;;
        wcr-150gn)
                ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
                ucidef_add_switch "switch0" "1" "1"
                ucidef_add_switch_vlan "switch0" "1" "0 6t"
                ucidef_add_switch_vlan "switch0" "2" "6t"
                ;;
+       whr-1166d)
+               ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
+               ucidef_add_switch "switch0" "1" "1"
+               ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 6t"
+               ucidef_add_switch_vlan "switch0" "2" "5 6t"
+               ;;
        wr8305rt)
                ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
                ucidef_add_switch "switch0" "1" "1"
@@ -217,19 +230,6 @@ ramips_setup_interfaces()
                ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 5 6t"
                ucidef_add_switch_vlan "switch0" "2" "0 6t"
                ;;
-       d105|\
-       na930|\
-       omni-emb-hpm|\
-       wli-tx4-ag300n)
-               ucidef_set_interface_lan "eth0"
-               ;;
-       e1700|\
-       mt7620a_mt7530)
-               ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
-               ucidef_add_switch "switch1" "1" "1"
-               ucidef_add_switch_vlan "switch1" "1" "0 1 2 3 6t"
-               ucidef_add_switch_vlan "switch1" "2" "4 6t"
-               ;;
        *)
                RT3X5X=`cat /proc/cpuinfo | egrep "(RT3.5|RT5350)"`
                if [ -n "${RT3X5X}" ]; then
@@ -248,45 +248,18 @@ ramips_setup_macs()
        local wan_mac=""
 
        case $board in
-       br-6475nd)
-               lan_mac=$(cat /sys/class/net/eth0/address)
-               wan_mac=$(mtd_get_mac_binary devdata 7)
-               ;;
-       oy-0001)
-               lan_mac=$(mtd_get_mac_binary factory 40)
-               wan_mac=$(mtd_get_mac_binary factory 46)
-               ;;
-       w306r-v20)
-               lan_mac=$(cat /sys/class/net/eth0/address)
-               wan_mac=$(macaddr_add "$lan_mac" 5)
-               ;;
-       tew-691gr)
-               lan_mac=$(cat /sys/class/net/eth0/address)
-               wan_mac=$(macaddr_add "$lan_mac" 3)
-               ;;
-       tew-692gr)
-               lan_mac=$(cat /sys/class/net/eth0/address)
-               wan_mac=$(macaddr_add "$lan_mac" 4)
-               ;;
-       m3|\
-       m4|\
-       x5|\
-       x8)
-               lan_mac=$(cat /sys/class/net/eth0/address)
-               lan_mac=$(macaddr_add "$lan_mac" -2)
-               ;;
        a5-v11|\
        bc2|\
        broadway|\
        d105|\
+       dir-300-b7|\
+       dir-320-b1|\
        dir-620-a1|\
        esr-9753|\
        freestation5|\
        hlk-rm04|\
        mpr-a1|\
        mpr-a2|\
-       dir-300-b7|\
-       dir-320-b1|\
        psr-680w|\
        sl-r7205|\
        y1|\
@@ -295,8 +268,16 @@ ramips_setup_macs()
                lan_mac=$(macaddr_setbit_la "$lan_mac")
                wan_mac=$(macaddr_add "$lan_mac" 1)
                ;;
-       ht-tm02)
+       all0239-3g|\
+       carambola|\
+       freestation5|\
+       w502u|\
+       wnce2001)
+               wan_mac=$(mtd_get_mac_binary factory 46)
+               ;;
+       br-6475nd)
                lan_mac=$(cat /sys/class/net/eth0/address)
+               wan_mac=$(mtd_get_mac_binary devdata 7)
                ;;
        cy-swr1100|\
        dir-645)
@@ -306,20 +287,39 @@ ramips_setup_macs()
        e1700)
                wan_mac=$(mtd_get_mac_ascii config WAN_MAC_ADDR)
                ;;
-       wcr-150gn)
-               wan_mac=$(mtd_get_mac_binary factory 40)
+       ht-tm02)
+               lan_mac=$(cat /sys/class/net/eth0/address)
+               ;;
+       m3|\
+       m4|\
+       x5|\
+       x8)
+               lan_mac=$(cat /sys/class/net/eth0/address)
+               lan_mac=$(macaddr_add "$lan_mac" -2)
+               ;;
+       oy-0001)
+               lan_mac=$(mtd_get_mac_binary factory 40)
+               wan_mac=$(mtd_get_mac_binary factory 46)
                ;;
        rt-n56u)
                lan_mac=$(cat /sys/class/net/eth0/address)
                lan_mac=$(macaddr_setbit_la "$lan_mac")
                wan_mac=$(mtd_get_mac_binary factory 32772)
                ;;
-       all0239-3g|\
-       carambola|\
-       freestation5|\
-       w502u|\
-       wnce2001)
-               wan_mac=$(mtd_get_mac_binary factory 46)
+       tew-691gr)
+               lan_mac=$(cat /sys/class/net/eth0/address)
+               wan_mac=$(macaddr_add "$lan_mac" 3)
+               ;;
+       tew-692gr)
+               lan_mac=$(cat /sys/class/net/eth0/address)
+               wan_mac=$(macaddr_add "$lan_mac" 4)
+               ;;
+       w306r-v20)
+               lan_mac=$(cat /sys/class/net/eth0/address)
+               wan_mac=$(macaddr_add "$lan_mac" 5)
+               ;;
+       wcr-150gn)
+               wan_mac=$(mtd_get_mac_binary factory 40)
                ;;
        whr-1166d|\
        whr-300hp2|\
diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh
index e63f0df..81e1dea 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -6,39 +6,44 @@
 
 get_status_led() {
        case $(ramips_board_name) in
-       3g-6200n)
-               status_led="edimax:green:power"
-               ;;
-       3g150b | 3g300m | w150m)
+       3g150b|\
+       3g300m|\
+       w150m)
                status_led="tenda:blue:ap"
                ;;
+       3g-6200n|\
+       br6425|\
+       br-6475nd)
+               status_led="edimax:green:power"
+               ;;
        a5-v11)
                status_led="a5-v11:red:power"
                ;;
        ai-br100)
                status_led="aigale:blue:wlan"
                ;;
+       all0239-3g|\
+       hw550-3g)
+               status_led="hw550-3g:green:status"
+               ;;
        ar670w)
                status_led="ar670w:green:power"
                ;;
        ar725w)
                status_led="ar725w:green:power"
                ;;
-       awapn2403)
-               status_led="asiarf:green:wps"
-               ;;
        argus-atp52b)
                status_led="argus-atp52b:green:run"
                ;;
        asl26555)
                status_led="asl26555:green:power"
                ;;
+       awapn2403)
+               status_led="asiarf:green:wps"
+               ;;
        br6524n)
                status_led="edimax:blue:power"
                ;;
-       br6425 | br-6475nd)
-               status_led="edimax:green:power"
-               ;;
        cf-wr800n)
                status_led="comfast:white:wps"
                ;;
@@ -48,7 +53,20 @@ get_status_led() {
        d105)
                status_led="d105:red:power"
                ;;
-       dcs-930 | dir-300-b1 | dir-600-b1 | dir-600-b2 | dir-610-a1 | 
dir-615-h1 | dir-615-d | dir-620-a1| dir-620-d1| dir-300-b7| dir-320-b1)
+       dap-1350)
+               status_led="d-link:blue:power"
+               ;;
+       dcs-930|\
+       dir-300-b1|\
+       dir-300-b7|\
+       dir-320-b1|\
+       dir-600-b1|\
+       dir-600-b2|\
+       dir-610-a1|\
+       dir-615-d|\
+       dir-615-h1|\
+       dir-620-a1|\
+       dir-620-d1)
                status_led="d-link:green:status"
                ;;
        dcs-930l-b1)
@@ -57,9 +75,6 @@ get_status_led() {
        dir-645)
                status_led="d-link:green:wps"
                ;;
-       dap-1350)
-               status_led="d-link:blue:power"
-               ;;
        e1700)
                status_led="linksys:green:power"
                ;;
@@ -69,24 +84,20 @@ get_status_led() {
        f5d8235-v2)
                status_led="f5d8235v2:blue:router"
                ;;
+       f7c027)
+               status_led="belkin:orange:status"
+               ;;
        fonera20n)
                status_led="fonera20n:green:power"
                ;;
-       ip2202)
-               status_led="ip2202:green:run"
-               ;;
-       rt-n13u)
-               status_led="rt-n13u:power"
-               ;;
        hlk-rm04)
                status_led="hlk-rm04:red:power"
                ;;
        ht-tm02)
                status_led="ht-tm02:blue:wlan"
                ;;
-       all0239-3g|\
-       hw550-3g)
-               status_led="hw550-3g:green:status"
+       ip2202)
+               status_led="ip2202:green:run"
                ;;
        m2m)
                status_led="m2m:blue:wifi"
@@ -104,18 +115,28 @@ get_status_led() {
        mofi3500-3gn)
                status_led="mofi3500-3gn:green:status"
                ;;
-       mpr-a1)
-               status_led="hame:red:power"
-               ;;
+       mpr-a1|\
        mpr-a2)
                status_led="hame:red:power"
                ;;
        mr-102n)
                status_led="mr-102n:amber:status"
                ;;
+       mzk-dp150n)
+               status_led="mzkdp150n:green:power"
+               ;;
+       mzk-w300nh2)
+               status_led="mzkw300nh2:green:power"
+               ;;
+       na930)
+               status_led="na930:blue:power"
+               ;;
        nbg-419n)
                status_led="nbg-419n:green:power"
                ;;
+       nexx-wt1520)
+               status_led="nexx-wt1520:white:power"
+               ;;
        nw718)
                status_led="nw718:amber:cpu"
                ;;
@@ -123,6 +144,9 @@ get_status_led() {
        omni-emb-hpm)
                status_led="emb:green:status"
                ;;
+       oy-0001)
+               status_led="oy:green:wifi"
+               ;;
        pbr-m1)
                status_led="pbr-m1:green:sys"
                ;;
@@ -138,15 +162,21 @@ get_status_led() {
        re6500)
                status_led="linksys:orange:wifi"
                ;;
-       rt-n15)
-               status_led="rt-n15:blue:power"
-               ;;
        rt-n10-plus)
                status_led="asus:green:wps"
                ;;
-       rt-n14u | rt-n56u | wl-330n | wl-330n3g)
+       rt-n13u)
+               status_led="rt-n13u:power"
+               ;;
+       rt-n14u|\
+       rt-n56u|\
+       wl-330n|\
+       wl-330n3g)
                status_led="asus:blue:power"
                ;;
+       rt-n15)
+               status_led="rt-n15:blue:power"
+               ;;
        rut5xx)
                status_led="rut5xx:green:status"
                ;;
@@ -160,6 +190,12 @@ get_status_led() {
        tew-692gr)
                status_led="trendnet:green:wps"
                ;;
+       ur-326n4g)
+               status_led="ur326:green:wps"
+               ;;
+       ur-336un)
+               status_led="ur336:green:wps"
+               ;;
        v11st-fe)
                status_led="v11st-fe:green:status"
                ;;
@@ -178,20 +214,27 @@ get_status_led() {
        wcr-150gn)
                status_led="wcr150gn:amber:power"
                ;;
+       whr-1166d|\
+       whr-300hp2|\
+       whr-600d|\
+       wsr-1166|\
+       wsr-600)
+               status_led="buffalo:orange:diag"
+               ;;
        whr-g300n)
                status_led="whr-g300n:green:router"
                ;;
-       wmr300)
-               status_led="buffalo:green:status"
+       wl-351)
+               status_led="wl-351:amber:power"
                ;;
        wli-tx4-ag300n)
                status_led="buffalo:blue:power"
                ;;
-       wzr-agl300nh)
-               status_led="buffalo:green:router"
+       wmr300)
+               status_led="buffalo:green:status"
                ;;
-       wl-351)
-               status_led="wl-351:amber:power"
+       wnce2001)
+               status_led="netgear:green:power"
                ;;
        wr512-3gn)
                status_led="wr512:green:wps"
@@ -199,30 +242,11 @@ get_status_led() {
        wr8305rt)
                status_led="wr8305rt:sys"
                ;;
-       whr-300hp2 | \
-       whr-600d | \
-       whr-1166d | \
-       wsr-600 | \
-       wsr-1166)
-               status_led="buffalo:orange:diag"
-               ;;
-       wnce2001)
-               status_led="netgear:green:power"
-               ;;
-       nexx-wt1520)
-               status_led="nexx-wt1520:white:power"
-               ;;
        wt3020)
                status_led="nexx:blue:power"
                ;;
-       mzk-w300nh2)
-               status_led="mzkw300nh2:green:power"
-               ;;
-       ur-326n4g)
-               status_led="ur326:green:wps"
-               ;;
-       ur-336un)
-               status_led="ur336:green:wps"
+       wzr-agl300nh)
+               status_led="buffalo:green:router"
                ;;
        x5)
                status_led="x5:green:power"
@@ -236,25 +260,13 @@ get_status_led() {
        xiaomi-mini)
                status_led="xiaomi:red:status"
                ;;
-       f7c027)
-               status_led="belkin:orange:status"
-               ;;
-       oy-0001)
-               status_led="oy:green:wifi"
-               ;;
-       na930)
-               status_led="na930:blue:power"
-               ;;
-       y1 | \
+       y1|\
        y1s)
                status_led="lenovo:blue:power"
                ;;
        zte-q7)
                status_led="zte:red:status"
                ;;
-       mzk-dp150n)
-               status_led="mzkdp150n:green:power"
-               ;;
        esac
 }
 
-- 
2.4.6
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to