1 Index: linux-4.3/drivers/net/ethernet/marvell/sky2.c
2 ===================================================================
3 --- linux-4.3.orig/drivers/net/ethernet/marvell/sky2.c 2015-11-01 16:05:25.000000000 -0800
4 +++ linux-4.3/drivers/net/ethernet/marvell/sky2.c 2015-12-18 10:39:44.983158318 -0800
6 * 1) from device tree data
7 * 2) from internal registers set by bootloader
9 - iap = of_get_mac_address(hw->pdev->dev.of_node);
12 + if (IS_ENABLED(CONFIG_OF)) {
13 + struct device_node *np;
14 + np = of_find_node_by_path("/aliases");
16 + const char *path = of_get_property(np, "sky2", NULL);
18 + np = of_find_node_by_path(path);
20 + path = of_get_mac_address(np);
22 + iap = (unsigned char *) path;
27 + iap = of_get_mac_address(hw->pdev->dev.of_node);
29 memcpy(dev->dev_addr, iap, ETH_ALEN);