1 --- a/drivers/net/ethernet/marvell/sky2.c
2 +++ b/drivers/net/ethernet/marvell/sky2.c
3 @@ -4812,7 +4812,24 @@ static struct net_device *sky2_init_netd
4 * 1) from device tree data
5 * 2) from internal registers set by bootloader
7 - iap = of_get_mac_address(hw->pdev->dev.of_node);
10 + if (IS_ENABLED(CONFIG_OF)) {
11 + struct device_node *np;
12 + np = of_find_node_by_path("/aliases");
14 + const char *path = of_get_property(np, "sky2", NULL);
16 + np = of_find_node_by_path(path);
18 + path = of_get_mac_address(np);
20 + iap = (unsigned char *) path;
25 + iap = of_get_mac_address(hw->pdev->dev.of_node);
27 memcpy(dev->dev_addr, iap, ETH_ALEN);