ipq806x: ecw5410: use bootloader provided MAC-s
[openwrt/openwrt.git] / target / linux / ipq806x / base-files / etc / board.d / 02_network
index 1a1cec51aa9595ed60f0111c33b6d6acd97a6577..65a0e98b3b315a2ebe45f25d5e4efa8b5ffd8df6 100644 (file)
@@ -29,14 +29,6 @@ tplink,vr2600v)
        ;;
 edgecore,ecw5410)
        ucidef_set_interfaces_lan_wan "eth1" "eth0"
-       if [ -b "$(find_mtd_part 0:art)" ]; then
-               ucidef_set_interface_macaddr "lan" "$(mtd_get_mac_binary "0:art" 0x6)"
-               ucidef_set_interface_macaddr "wan" "$(mtd_get_mac_binary "0:art" 0x0)"
-       else
-               # XXX: drop upper case after kernel v5.4 is gone (qcom-smem)
-               ucidef_set_interface_macaddr "lan" "$(mtd_get_mac_binary "0:ART" 0x6)"
-               ucidef_set_interface_macaddr "wan" "$(mtd_get_mac_binary "0:ART" 0x0)"
-       fi
        ;;
 linksys,ea7500-v1)
        hw_mac_addr=$(mtd_get_mac_ascii devinfo hw_mac_addr)
@@ -57,6 +49,7 @@ nec,wg2600hp3)
                "2:lan" "3:lan" "4:lan" "5:lan" "0@eth1" "1:wan" "6@eth0"
        ;;
 netgear,r7800 |\
+netgear,xr500 |\
 tplink,c2600)
        ucidef_add_switch "switch0" \
                "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "6@eth1" "5:wan" "0@eth0"
@@ -80,9 +73,6 @@ ubnt,unifi-ac-hd)
        ;;
 zyxel,nbg6817)
        hw_mac_addr=$(mtd_get_mac_ascii 0:appsblenv ethaddr)
-       # XXX: drop upper case after kernel v5.4 is gone (qcom-smem)
-       [ -n "$hw_mac_addr" ] || \
-               hw_mac_addr=$(mtd_get_mac_ascii 0:APPSBLENV ethaddr)
        ucidef_add_switch "switch0" \
                "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
        ucidef_set_interface_macaddr "lan" "$(macaddr_add $hw_mac_addr 2)"