cirrus: mac89x0: use eth_hw_addr_set()

Byte by byte assignments.

Fixes build on m68k.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jakub Kicinski 2021-11-18 23:10:32 -08:00 committed by David S. Miller
parent e217fc4aff
commit 9a962aedd3
1 changed files with 5 additions and 2 deletions

View File

@ -242,12 +242,15 @@ static int mac89x0_device_probe(struct platform_device *pdev)
pr_info("No EEPROM, giving up now.\n");
goto out1;
} else {
u8 addr[ETH_ALEN];
for (i = 0; i < ETH_ALEN; i += 2) {
/* Big-endian (why??!) */
unsigned short s = readreg(dev, PP_IA + i);
dev->dev_addr[i] = s >> 8;
dev->dev_addr[i+1] = s & 0xff;
addr[i] = s >> 8;
addr[i+1] = s & 0xff;
}
eth_hw_addr_set(dev, addr);
}
dev->irq = SLOT2IRQ(slot);