mvebu: use device-tree board detection
[openwrt/staging/dedeckeh.git] / target / linux / mvebu / base-files / lib / preinit / 06_set_iface_mac
index 534a271..aba8da2 100644 (file)
@@ -9,12 +9,7 @@ preinit_set_mac_address() {
        . /lib/functions.sh
 
        case $(board_name) in
-       armada-xp-linksys-mamba)
-               mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
-               ip link set dev eth0 address $mac 2>/dev/null
-               ip link set dev eth1 address $mac 2>/dev/null
-               ;;
-       armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-385-linksys-venom)
+       linksys,caiman|linksys,cobra|linksys,rango|linksys,shelby|linksys,venom)
                # rename interfaces back to the way they were with 4.4
                case "$(readlink /sys/class/net/eth0)" in
                        *f1070000*)
@@ -29,7 +24,12 @@ preinit_set_mac_address() {
                ip link set dev eth1 address $mac 2>/dev/null
                ip link set dev eth0 address $mac_wan 2>/dev/null
                ;;
-       armada-385-db-ap|armada-388-clearfog)
+       linksys,mamba)
+               mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
+               ip link set dev eth0 address $mac 2>/dev/null
+               ip link set dev eth1 address $mac 2>/dev/null
+               ;;
+       marvell,a385-db-ap|solidrun,clearfog*a1)
                # rename interfaces back to the way they were with 4.4
                case "$(readlink /sys/class/net/eth0)" in
                        *f1070000*)