aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mpc85xx/patches-3.18
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2015-05-03 17:59:46 +0000
committerImre Kaloz <kaloz@openwrt.org>2015-05-03 17:59:46 +0000
commit0b100446ed566837884246ba3c2ba76550f8f99c (patch)
treebfff77434d3e8b6584a32560997986133481b31b /target/linux/mpc85xx/patches-3.18
parente5745fa67b399d9f64fec96a899a8d36880a4a99 (diff)
downloadupstream-0b100446ed566837884246ba3c2ba76550f8f99c.tar.gz
upstream-0b100446ed566837884246ba3c2ba76550f8f99c.tar.bz2
upstream-0b100446ed566837884246ba3c2ba76550f8f99c.zip
mpc85xx: gianfar: add mtd-mac-address support
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45598 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/mpc85xx/patches-3.18')
-rw-r--r--target/linux/mpc85xx/patches-3.18/101-net-gianfar-use-mtd-mac-address.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/target/linux/mpc85xx/patches-3.18/101-net-gianfar-use-mtd-mac-address.patch b/target/linux/mpc85xx/patches-3.18/101-net-gianfar-use-mtd-mac-address.patch
new file mode 100644
index 0000000000..1b7abc8780
--- /dev/null
+++ b/target/linux/mpc85xx/patches-3.18/101-net-gianfar-use-mtd-mac-address.patch
@@ -0,0 +1,19 @@
+--- a/drivers/net/ethernet/freescale/gianfar.c
++++ b/drivers/net/ethernet/freescale/gianfar.c
+@@ -858,10 +858,13 @@ static int gfar_of_init(struct platform_
+ if (stash_len || stash_idx)
+ priv->device_flags |= FSL_GIANFAR_DEV_HAS_BUF_STASHING;
+
+- mac_addr = of_get_mac_address(np);
++ err = of_get_mac_address_mtd(np, dev->dev_addr);
++ if (err) {
++ mac_addr = of_get_mac_address(np);
+
+- if (mac_addr)
+- memcpy(dev->dev_addr, mac_addr, ETH_ALEN);
++ if (mac_addr)
++ memcpy(dev->dev_addr, mac_addr, ETH_ALEN);
++ }
+
+ if (model && !strcasecmp(model, "TSEC"))
+ priv->device_flags |= FSL_GIANFAR_DEV_HAS_GIGABIT |