ar71xx: use correct wan mac address for the TP-Link Archer C7 v4
[openwrt/openwrt.git] / target / linux / ar71xx / base-files / etc / board.d / 02_network
index d9a0e969be65c9c144c165569218044a4e55cd75..ef83896664476de5d62708ae69df6e44558db34c 100755 (executable)
@@ -71,9 +71,11 @@ ar71xx_setup_interfaces()
        aw-nr580|\
        bullet-m|\
        c-55|\
+       cap324|\
        cap4200ag|\
        cf-e380ac-v1|\
        cf-e380ac-v2|\
+       cpe210-v2|\
        dr342|\
        eap120|\
        eap300v2|\
@@ -112,6 +114,7 @@ ar71xx_setup_interfaces()
        rb-sxt2n|\
        rb-sxt5n|\
        rb-wap-2nd|\
+       rb-wapr-2nd|\
        rb-wapg-5hact2hnd|\
        re355|\
        re450|\
@@ -168,7 +171,6 @@ ar71xx_setup_interfaces()
        pb42|\
        pb44|\
        rb-951ui-2hnd|\
-       rb-952ui-5ac2nd|\
        routerstation|\
        tl-wr710n|\
        tl-wr720n-v3|\
@@ -181,7 +183,8 @@ ar71xx_setup_interfaces()
        rb-750-r2|\
        rb-750p-pbr2|\
        rb-750up-r2|\
-       rb-951ui-2nd)
+       rb-951ui-2nd|\
+       rb-952ui-5ac2nd)
                ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
                ucidef_add_switch "switch0" \
                        "0@eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
@@ -246,6 +249,7 @@ ar71xx_setup_interfaces()
                ;;
        archer-c58-v1|\
        archer-c59-v1|\
+       archer-c59-v2|\
        fritz4020|\
        rb-450g)
                ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
@@ -272,7 +276,6 @@ ar71xx_setup_interfaces()
                ucidef_add_switch "switch0" \
                        "0@eth0" "3:wan" "4:lan"
                ;;
-       cap324|\
        rme-eg200)
                ucidef_set_interface_lan "eth0" "dhcp"
                ;;
@@ -305,14 +308,21 @@ ar71xx_setup_interfaces()
        dir-835-a1|\
        esr900|\
        mynet-n750|\
-       sr3200|\
-       tl-wr1043n-v5)
+       sr3200)
                ucidef_add_switch "switch0" \
                        "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
                ;;
+       tl-wr1043n-v5)
+               ucidef_add_switch "switch0" \
+                       "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
+               ;;
        dap-2695-a1)
                ucidef_add_switch "switch0" "0@eth0" "2:lan" "3:wan" "6@eth1"
                ;;
+       rb-931-2nd)
+               ucidef_add_switch "switch0" \
+                       "0@eth0" "1:lan:3" "2:lan:2" "3:wan:1"
+       ;;
        rb-941-2nd)
                ucidef_add_switch "switch0" \
                        "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:wan:1"
@@ -379,11 +389,17 @@ ar71xx_setup_interfaces()
                ucidef_add_switch_attr "switch0" "enable" "false"
                ;;
        e1700ac-v2|\
+       e750g-v8|\
        unifiac-pro|\
        xd3200)
                ucidef_add_switch "switch0" \
                        "0@eth0" "2:lan" "3:wan"
                ;;
+       e558-v2)
+               ucidef_set_interfaces_lan_wan "eth1.1" "eth0.2"
+               ucidef_add_switch "switch0" \
+                       "0@eth1" "4:lan" "5:lan" "6@eth0"  "3:wan"
+               ;;
        ebr-2310-c1)
                ucidef_set_interfaces_lan_wan "eth0.1" "eth1"
                ucidef_add_switch "switch0" \
@@ -487,6 +503,7 @@ ar71xx_setup_interfaces()
                        "0@eth1" "1:lan:4" "2:lan:1" "3:lan:2" "4:lan:3"
                ;;
        archer-c7-v4|\
+       archer-c7-v5|\
        tl-wdr4300|\
        tl-wr1041n-v2)
                ucidef_add_switch "switch0" \
@@ -572,6 +589,10 @@ ar71xx_setup_macs()
        local wan_mac=""
 
        case $board in
+       archer-c7-v4)
+               base_mac=$(mtd_get_mac_binary config 8)
+               wan_mac=$(macaddr_add "$base_mac" 1)
+               ;;
        dgl-5500-a1|\
        dir-825-c1)
                wan_mac=$(mtd_get_mac_ascii nvram "wan_mac")
@@ -583,6 +604,13 @@ ar71xx_setup_macs()
                lan_mac=$(mtd_get_mac_binary caldata 0)
                wan_mac=$(mtd_get_mac_binary caldata 6)
                ;;
+       dir-869-a1|\
+       mynet-n750)
+               wan_mac=$(mtd_get_mac_ascii devdata "wanmac")
+               ;;
+       esr900)
+               wan_mac=$(mtd_get_mac_ascii u-boot-env "wanaddr")
+               ;;
        fritz300e)
                lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)"))
                ;;
@@ -591,13 +619,6 @@ ar71xx_setup_macs()
                lan_mac=$(mtd_get_mac_binary product-info 8)
                wan_mac=$(macaddr_add "$lan_mac" 1)
                ;;
-       esr900)
-               wan_mac=$(mtd_get_mac_ascii u-boot-env "wanaddr")
-               ;;
-       dir-869-a1|\
-       mynet-n750)
-               wan_mac=$(mtd_get_mac_ascii devdata "wanmac")
-               ;;
        wlr8100)
                lan_mac=$(mtd_get_mac_ascii u-boot-env "ethaddr")
                wan_mac=$(mtd_get_mac_ascii u-boot-env "wanaddr")