diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-11-22 19:06:51 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-11-22 19:06:51 +0000 |
commit | 3789b1f5a0760bce2f56993685a3f7e7202d41d0 (patch) | |
tree | 5fa9d37601b64b81ca4fce683b6cd8bc58b44843 /target/linux/ipq806x/patches-4.1/709-stmac-platform-add-support-for-retreiving-mac-from-m.patch | |
parent | b1a91ca57fc9bbdb648e77790a0812fd9bd96373 (diff) | |
download | upstream-3789b1f5a0760bce2f56993685a3f7e7202d41d0.tar.gz upstream-3789b1f5a0760bce2f56993685a3f7e7202d41d0.tar.bz2 upstream-3789b1f5a0760bce2f56993685a3f7e7202d41d0.zip |
ipq806x: update stmmac to the version from linux 4.3
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 47593
Diffstat (limited to 'target/linux/ipq806x/patches-4.1/709-stmac-platform-add-support-for-retreiving-mac-from-m.patch')
-rw-r--r-- | target/linux/ipq806x/patches-4.1/709-stmac-platform-add-support-for-retreiving-mac-from-m.patch | 36 |
1 files changed, 16 insertions, 20 deletions
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 */ |