summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sis
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-18 16:29:30 +0200
committerDavid S. Miller <davem@davemloft.net>2021-10-19 13:41:48 +0200
commit74fad215ee3d27b6e6aae1acc0c2c4dade7a68b1 (patch)
tree21bb2ffcbc5c6c1ef4999604dcfea7b2b0eeb742 /drivers/net/ethernet/sis
parentethernet: sis190: use eth_hw_addr_set() (diff)
downloadlinux-74fad215ee3d27b6e6aae1acc0c2c4dade7a68b1.tar.xz
linux-74fad215ee3d27b6e6aae1acc0c2c4dade7a68b1.zip
ethernet: sis900: use eth_hw_addr_set()
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. Read the address into an array on the stack, then call eth_hw_addr_set(). Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sis')
-rw-r--r--drivers/net/ethernet/sis/sis900.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sis/sis900.c b/drivers/net/ethernet/sis/sis900.c
index 3f5717a1874f..cc2d907c4c4b 100644
--- a/drivers/net/ethernet/sis/sis900.c
+++ b/drivers/net/ethernet/sis/sis900.c
@@ -292,6 +292,7 @@ static int sis630e_get_mac_addr(struct pci_dev *pci_dev,
struct net_device *net_dev)
{
struct pci_dev *isa_bridge = NULL;
+ u8 addr[ETH_ALEN];
u8 reg;
int i;
@@ -308,8 +309,9 @@ static int sis630e_get_mac_addr(struct pci_dev *pci_dev,
for (i = 0; i < 6; i++) {
outb(0x09 + i, 0x70);
- ((u8 *)(net_dev->dev_addr))[i] = inb(0x71);
+ addr[i] = inb(0x71);
}
+ eth_hw_addr_set(net_dev, addr);
pci_write_config_byte(isa_bridge, 0x48, reg & ~0x40);
pci_dev_put(isa_bridge);