diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-16 00:53:04 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-18 15:20:38 +0300 |
commit | 4abd7cffc09a38015fa14a22471e3de48a4ca032 (patch) | |
tree | b6a0100f08a5de51263210934a6ce8f4fec1f4f0 /drivers/net/ethernet/silan/sc92031.c | |
parent | 0e9e7598c68f1dc17ce1053b08494b8ed6dd4985 (diff) | |
download | linux-4abd7cffc09a38015fa14a22471e3de48a4ca032.tar.xz |
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/silan/sc92031.c')
-rw-r--r-- | drivers/net/ethernet/silan/sc92031.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/ethernet/silan/sc92031.c b/drivers/net/ethernet/silan/sc92031.c index 1fd08a04bd4e..ff4197f5e46d 100644 --- a/drivers/net/ethernet/silan/sc92031.c +++ b/drivers/net/ethernet/silan/sc92031.c @@ -1400,6 +1400,7 @@ static int sc92031_probe(struct pci_dev *pdev, const struct pci_device_id *id) void __iomem* port_base; struct net_device *dev; struct sc92031_priv *priv; + u8 addr[ETH_ALEN]; u32 mac0, mac1; err = pci_enable_device(pdev); @@ -1458,12 +1459,13 @@ static int sc92031_probe(struct pci_dev *pdev, const struct pci_device_id *id) mac0 = ioread32(port_base + MAC0); mac1 = ioread32(port_base + MAC0 + 4); - dev->dev_addr[0] = mac0 >> 24; - dev->dev_addr[1] = mac0 >> 16; - dev->dev_addr[2] = mac0 >> 8; - dev->dev_addr[3] = mac0; - dev->dev_addr[4] = mac1 >> 8; - dev->dev_addr[5] = mac1; + addr[0] = mac0 >> 24; + addr[1] = mac0 >> 16; + addr[2] = mac0 >> 8; + addr[3] = mac0; + addr[4] = mac1 >> 8; + addr[5] = mac1; + eth_hw_addr_set(dev, addr); err = register_netdev(dev); if (err < 0) |