diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-11-18 23:10:19 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-11-19 11:05:20 +0000 |
commit | 0222ee53c483df7572eea7ba8585dda59328d46e (patch) | |
tree | b63a7e13036d6b964824a5af2001a999bde18173 /drivers/net/ethernet/amd/lance.c | |
parent | 82f60a011c5f7287f06241f7720739b51d5da6fc (diff) | |
download | linux-next-0222ee53c483df7572eea7ba8585dda59328d46e.tar.gz |
amd: lance: use eth_hw_addr_set()
IO reads, so save to an array then eth_hw_addr_set().
Fixes build on x86 (32bit).
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amd/lance.c')
-rw-r--r-- | drivers/net/ethernet/amd/lance.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/amd/lance.c b/drivers/net/ethernet/amd/lance.c index 945bf1d87507..462016666752 100644 --- a/drivers/net/ethernet/amd/lance.c +++ b/drivers/net/ethernet/amd/lance.c @@ -480,6 +480,7 @@ static int __init lance_probe1(struct net_device *dev, int ioaddr, int irq, int unsigned long flags; int err = -ENOMEM; void __iomem *bios; + u8 addr[ETH_ALEN]; /* First we look for special cases. Check for HP's on-board ethernet by looking for 'HP' in the BIOS. @@ -541,7 +542,8 @@ static int __init lance_probe1(struct net_device *dev, int ioaddr, int irq, int /* There is a 16 byte station address PROM at the base address. The first six bytes are the station address. */ for (i = 0; i < 6; i++) - dev->dev_addr[i] = inb(ioaddr + i); + addr[i] = inb(ioaddr + i); + eth_hw_addr_set(dev, addr); printk("%pM", dev->dev_addr); dev->base_addr = ioaddr; |