diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-08 10:59:13 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-09 11:46:57 +0100 |
commit | 8ce218b6e58ad9d2149402ea48ae8dbb0c57b1b5 (patch) | |
tree | 0a2de992be4a84f5017305fee96d67c76b1c8388 /drivers/net/ethernet/8390/axnet_cs.c | |
parent | a7639279c93c1e07a703c0f86f0831d4ea2314f0 (diff) | |
download | linux-8ce218b6e58ad9d2149402ea48ae8dbb0c57b1b5.tar.gz linux-8ce218b6e58ad9d2149402ea48ae8dbb0c57b1b5.tar.bz2 linux-8ce218b6e58ad9d2149402ea48ae8dbb0c57b1b5.zip |
ethernet: 8390: remove direct netdev->dev_addr writes
8390 contains a lot of loops assigning netdev->dev_addr
byte by byte. Convert what's possible directly to
eth_hw_addr_set(), use local buf in other places.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/8390/axnet_cs.c')
-rw-r--r-- | drivers/net/ethernet/8390/axnet_cs.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/ethernet/8390/axnet_cs.c b/drivers/net/ethernet/8390/axnet_cs.c index 3c370e686ec3..3aef959fc25b 100644 --- a/drivers/net/ethernet/8390/axnet_cs.c +++ b/drivers/net/ethernet/8390/axnet_cs.c @@ -187,6 +187,7 @@ static int get_prom(struct pcmcia_device *link) { struct net_device *dev = link->priv; unsigned int ioaddr = dev->base_addr; + u8 addr[ETH_ALEN]; int i, j; /* This is based on drivers/net/ethernet/8390/ne.c */ @@ -220,9 +221,11 @@ static int get_prom(struct pcmcia_device *link) for (i = 0; i < 6; i += 2) { j = inw(ioaddr + AXNET_DATAPORT); - dev->dev_addr[i] = j & 0xff; - dev->dev_addr[i+1] = j >> 8; + addr[i] = j & 0xff; + addr[i+1] = j >> 8; } + eth_hw_addr_set(dev, addr); + return 1; } /* get_prom */ |