ath79: fix source of label MAC address for Ubiquiti XM devices
[oweals/openwrt.git] / target / linux / ath79 / generic / base-files / etc / board.d / 02_network
index e4179b4d384d73e4656414cb4f9c8e00eede6b46..05ee1aa016fcbb8b1ab8735a39f186e6457e0f9c 100755 (executable)
@@ -89,7 +89,11 @@ ath79_setup_interfaces()
        comfast,cf-e314n-v2|\
        tplink,cpe210-v1|\
        tplink,cpe220-v2|\
+       tplink,cpe220-v3|\
        tplink,cpe510-v1|\
+       tplink,wbs210-v2|\
+       tplink,wbs510-v1|\
+       tplink,wbs510-v2|\
        ubnt,nanostation-m|\
        ubnt,routerstation)
                ucidef_set_interfaces_lan_wan "eth1" "eth0"
@@ -142,10 +146,6 @@ ath79_setup_interfaces()
                ucidef_add_switch "switch0" \
                        "0@eth0" "1:lan" "2:lan"
                ;;
-       glinet,gl-ar750s)
-               ucidef_add_switch "switch0" \
-                       "0@eth0" "2:lan:2" "3:lan:1" "1:wan"
-               ;;
        iodata,etg3-r|\
        iodata,wn-ac1167dgr|\
        iodata,wn-ac1600dgr|\
@@ -156,15 +156,17 @@ ath79_setup_interfaces()
        wd,mynet-n750)
                ucidef_add_switch "switch0" \
                        "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
-       ;;
+               ;;
        librerouter,librerouter-v1)
                ucidef_add_switch "switch0" \
                        "0@eth0" "5:wan" "6@eth1" "4:lan"
-       ;;
+               ;;
        nec,wg1200cr|\
        ubnt,nanostation-ac|\
        ubnt,unifiac-mesh-pro|\
-       ubnt,unifiac-pro)
+       ubnt,unifiac-pro|\
+       yuncore,a782|\
+       yuncore,xd4200)
                ucidef_add_switch "switch0" \
                        "0@eth0" "2:lan" "3:wan"
                ;;
@@ -205,6 +207,7 @@ ath79_setup_interfaces()
                ;;
        tplink,archer-a7-v5|\
        tplink,archer-c6-v2|\
+       tplink,archer-c6-v2-us|\
        tplink,archer-c7-v4|\
        tplink,archer-c7-v5|\
        tplink,tl-wdr3600-v1|\
@@ -284,17 +287,12 @@ ath79_setup_macs()
                lan_mac=$(mtd_get_mac_binary "Board data" 2)
                label_mac=$lan_mac
                ;;
-       alfa-network,ap121f|\
-       ubnt,airrouter|\
-       ubnt,bullet-m|\
-       ubnt,nanostation-m|\
-       ubnt,rocket-m|\
-       ubnt,unifi)
-               label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
+       alfa-network,ap121f)
+               label_mac=$(mtd_get_mac_binary art 0x1002)
                ;;
        avm,fritz300e)
                lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)"))
-               label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
+               label_mac=$(fritz_tffs -n macwlan -i $(find_mtd_part "tffs (1)"))
                ;;
        avm,fritz4020)
                lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)"))
@@ -394,6 +392,13 @@ ath79_setup_macs()
                wan_mac=$(mtd_get_mac_text mac 0x18)
                label_mac=$wan_mac
                ;;
+       ubnt,airrouter|\
+       ubnt,bullet-m|\
+       ubnt,nanostation-m|\
+       ubnt,rocket-m|\
+       ubnt,unifi)
+               label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
+               ;;
        ubnt,routerstation|\
        ubnt,routerstation-pro)
                wan_mac=$(fconfig -s -r -d $(find_mtd_part "RedBoot config") -n ar7100_esa)