Commit 8bdd2494 authored by Thomas Bogendoerfer's avatar Thomas Bogendoerfer Committed by Jakub Kicinski

amd: declance: use eth_hw_addr_set()

Copy scattered mac address octets into an array then eth_hw_addr_set().

Fixes: adeef3e3 ("net: constify netdev->dev_addr")
Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
Link: https://lore.kernel.org/r/20220125144007.64407-1-tsbogend@alpha.franken.deSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 2f61353c
......@@ -1032,6 +1032,7 @@ static int dec_lance_probe(struct device *bdev, const int type)
int i, ret;
unsigned long esar_base;
unsigned char *esar;
u8 addr[ETH_ALEN];
const char *desc;
if (dec_lance_debug && version_printed++ == 0)
......@@ -1228,7 +1229,8 @@ static int dec_lance_probe(struct device *bdev, const int type)
break;
}
for (i = 0; i < 6; i++)
dev->dev_addr[i] = esar[i * 4];
addr[i] = esar[i * 4];
eth_hw_addr_set(dev, addr);
printk("%s: %s, addr = %pM, irq = %d\n",
name, desc, dev->dev_addr, dev->irq);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment