mirror of
https://github.com/openwrt/openwrt.git
synced 2025-03-13 07:54:14 +00:00
Fixes: - CVE-2019-11479 - CVE-2019-11478 - CVE-2019-11477 - CVE-2019-11833 - CVE-2019-11091 - CVE-2018-12126 - CVE-2018-12130 - CVE-2018-12127 - CVE-2019-3882 - CVE-2019-6974 - CVE-2019-3819 - CVE-2019-7221 - CVE-2019-7222 - CVE-2019-3701 - CVE-2018-19985 - CVE-2018-1120 And probably more Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
29 lines
755 B
Diff
29 lines
755 B
Diff
--- a/drivers/net/ethernet/marvell/sky2.c
|
|
+++ b/drivers/net/ethernet/marvell/sky2.c
|
|
@@ -4813,7 +4813,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
|