diff options
author | John Crispin <john@openwrt.org> | 2015-12-17 09:25:24 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2015-12-17 09:25:24 +0000 |
commit | 31116661ff8c33f002d457c9945616df01b138c1 (patch) | |
tree | 0735bd55e5bc9b19d991a5cbb59404f0261b4847 /target/linux/ramips/patches-4.3/0600-net-mediatek-add-of_get_mac_address_mtd-support.patch | |
parent | a99c78a09ac39c80e6a4a0b3eb8daca3bbb3806c (diff) | |
download | master-31e0f0ae-31116661ff8c33f002d457c9945616df01b138c1.tar.gz master-31e0f0ae-31116661ff8c33f002d457c9945616df01b138c1.tar.bz2 master-31e0f0ae-31116661ff8c33f002d457c9945616df01b138c1.zip |
ralink: add reworked ethernet driver
update to the version of the driver that is on its way upstream
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 47898
Diffstat (limited to 'target/linux/ramips/patches-4.3/0600-net-mediatek-add-of_get_mac_address_mtd-support.patch')
-rw-r--r-- | target/linux/ramips/patches-4.3/0600-net-mediatek-add-of_get_mac_address_mtd-support.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/target/linux/ramips/patches-4.3/0600-net-mediatek-add-of_get_mac_address_mtd-support.patch b/target/linux/ramips/patches-4.3/0600-net-mediatek-add-of_get_mac_address_mtd-support.patch new file mode 100644 index 0000000000..38ef4187af --- /dev/null +++ b/target/linux/ramips/patches-4.3/0600-net-mediatek-add-of_get_mac_address_mtd-support.patch @@ -0,0 +1,36 @@ +From fce0d89383e0a2a694723989da608df1a464bae4 Mon Sep 17 00:00:00 2001 +From: John Crispin <blogic@openwrt.org> +Date: Sun, 13 Dec 2015 17:45:19 +0100 +Subject: [PATCH 1/2] net: mediatek: add of_get_mac_address_mtd() support + +Signed-off-by: John Crispin <blogic@openwrt.org> +--- + drivers/net/ethernet/mediatek/mtk_eth_soc.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +index fb435fa..9999768 100644 +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +@@ -1273,7 +1273,6 @@ static int __init fe_init(struct net_device *dev) + { + struct fe_priv *priv = netdev_priv(dev); + struct device_node *port; +- const char *mac_addr; + int err; + + priv->soc->reset_fe(); +@@ -1281,9 +1280,7 @@ static int __init fe_init(struct net_device *dev) + if (priv->soc->switch_init) + priv->soc->switch_init(priv); + +- mac_addr = of_get_mac_address(priv->device->of_node); +- if (mac_addr) +- ether_addr_copy(dev->dev_addr, mac_addr); ++ of_get_mac_address_mtd(priv->device->of_node, dev->dev_addr); + + /*If the mac address is invalid, use random mac address */ + if (!is_valid_ether_addr(dev->dev_addr)) { +-- +1.7.10.4 + |