X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=target%2Flinux%2Fimx6%2Fpatches-4.3%2F208-sky2-allow-mac-to-come-from-dt.patch;fp=target%2Flinux%2Fimx6%2Fpatches-4.3%2F208-sky2-allow-mac-to-come-from-dt.patch;h=0000000000000000000000000000000000000000;hb=6533374d2c98822871513b9fd23ecb5c214b7a37;hp=9a94212235bf7aafd9a267785d1667670435765b;hpb=c5687c13a487a27da485c281d791a59aff2a2585;p=openwrt.git diff --git a/target/linux/imx6/patches-4.3/208-sky2-allow-mac-to-come-from-dt.patch b/target/linux/imx6/patches-4.3/208-sky2-allow-mac-to-come-from-dt.patch deleted file mode 100644 index 9a94212235..0000000000 --- a/target/linux/imx6/patches-4.3/208-sky2-allow-mac-to-come-from-dt.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/drivers/net/ethernet/marvell/sky2.c -+++ b/drivers/net/ethernet/marvell/sky2.c -@@ -4812,7 +4812,24 @@ static struct net_device *sky2_init_netd - * 1) from device tree data - * 2) from internal registers set by bootloader - */ -- iap = of_get_mac_address(hw->pdev->dev.of_node); -+ -+ iap = NULL; -+ if (IS_ENABLED(CONFIG_OF)) { -+ struct device_node *np; -+ np = of_find_node_by_path("/aliases"); -+ if (np) { -+ const char *path = of_get_property(np, "sky2", NULL); -+ if (path) -+ np = of_find_node_by_path(path); -+ if (np) -+ path = of_get_mac_address(np); -+ if (path) -+ iap = (unsigned char *) path; -+ } -+ } -+ -+ if (!iap) -+ iap = of_get_mac_address(hw->pdev->dev.of_node); - if (iap) - memcpy(dev->dev_addr, iap, ETH_ALEN); - else