From 3789b1f5a0760bce2f56993685a3f7e7202d41d0 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 22 Nov 2015 19:06:51 +0000 Subject: ipq806x: update stmmac to the version from linux 4.3 Signed-off-by: Felix Fietkau SVN-Revision: 47593 --- ...orm-add-support-for-retreiving-mac-from-m.patch | 36 ++++++++++------------ 1 file changed, 16 insertions(+), 20 deletions(-) (limited to 'target/linux/ipq806x/patches-4.1/709-stmac-platform-add-support-for-retreiving-mac-from-m.patch') diff --git a/target/linux/ipq806x/patches-4.1/709-stmac-platform-add-support-for-retreiving-mac-from-m.patch b/target/linux/ipq806x/patches-4.1/709-stmac-platform-add-support-for-retreiving-mac-from-m.patch index 84c15c7566..d385c9a36c 100644 --- a/target/linux/ipq806x/patches-4.1/709-stmac-platform-add-support-for-retreiving-mac-from-m.patch +++ b/target/linux/ipq806x/patches-4.1/709-stmac-platform-add-support-for-retreiving-mac-from-m.patch @@ -9,27 +9,23 @@ Subject: [PATCH] stmac: platform: add support for retreiving mac from mtd --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c -@@ -302,6 +302,7 @@ static int stmmac_pltfr_probe(struct pla - struct stmmac_priv *priv = NULL; - struct plat_stmmacenet_data *plat_dat = NULL; - const char *mac = NULL; -+ u8 mtd_mac[ETH_ALEN] = { }; - int irq, wol_irq, lpi_irq; +@@ -116,6 +116,19 @@ stmmac_probe_config_dt(struct platform_d + return ERR_PTR(-ENOMEM); - /* Get IRQ information early to have an ability to ask for deferred -@@ -362,6 +363,15 @@ static int stmmac_pltfr_probe(struct pla - pr_err("%s: main dt probe failed", __func__); - return ret; - } + *mac = of_get_mac_address(np); ++ if (!*mac) { ++ u8 mtd_mac[ETH_ALEN]; ++ int ret; + -+ if (!mac) { -+ ret = of_get_mac_address_mtd(dev->of_node, &mtd_mac); -+ if (ret == -EPROBE_DEFER) -+ return ret; ++ ret = of_get_mac_address_mtd(np, mtd_mac); ++ if (ret == -EPROBE_DEFER) ++ return ERR_PTR(ret); + -+ if (is_valid_ether_addr(&mtd_mac)) -+ mac = mtd_mac; -+ } - } ++ if (is_valid_ether_addr(mtd_mac)) ++ *mac = devm_kmemdup(&pdev->dev, mtd_mac, ETH_ALEN, ++ GFP_KERNEL); ++ } ++ + plat->interface = of_get_phy_mode(np); - /* Custom setup (if needed) */ + /* Get max speed of operation from device tree */ -- cgit v1.2.3