summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/calxeda
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-15 23:53:04 +0200
committerDavid S. Miller <davem@davemloft.net>2021-10-18 14:20:38 +0200
commit4abd7cffc09a38015fa14a22471e3de48a4ca032 (patch)
treeb6a0100f08a5de51263210934a6ce8f4fec1f4f0 /drivers/net/ethernet/calxeda
parentocteontx2-nic: fix mixed module build (diff)
downloadlinux-4abd7cffc09a38015fa14a22471e3de48a4ca032.tar.xz
linux-4abd7cffc09a38015fa14a22471e3de48a4ca032.zip
ethernet: use eth_hw_addr_set() in unmaintained drivers
Commit 406f42fa0d3c ("net-next: When a bond have a massive amount of VLANs...") introduced a rbtree for faster Ethernet address look up. To maintain netdev->dev_addr in this tree we need to make all the writes to it got through appropriate helpers. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/calxeda')
-rw-r--r--drivers/net/ethernet/calxeda/xgmac.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/calxeda/xgmac.c b/drivers/net/ethernet/calxeda/xgmac.c
index 9ad89a53c3e6..457cb7121000 100644
--- a/drivers/net/ethernet/calxeda/xgmac.c
+++ b/drivers/net/ethernet/calxeda/xgmac.c
@@ -1693,6 +1693,7 @@ static int xgmac_probe(struct platform_device *pdev)
struct resource *res;
struct net_device *ndev = NULL;
struct xgmac_priv *priv = NULL;
+ u8 addr[ETH_ALEN];
u32 uid;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -1785,7 +1786,8 @@ static int xgmac_probe(struct platform_device *pdev)
ndev->max_mtu = XGMAC_MAX_MTU;
/* Get the MAC address */
- xgmac_get_mac_addr(priv->base, ndev->dev_addr, 0);
+ xgmac_get_mac_addr(priv->base, addr, 0);
+ eth_hw_addr_set(ndev, addr);
if (!is_valid_ether_addr(ndev->dev_addr))
netdev_warn(ndev, "MAC address %pM not valid",
ndev->dev_addr);