Commit 9a962aed authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller

cirrus: mac89x0: use eth_hw_addr_set()

Byte by byte assignments.

Fixes build on m68k.
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e217fc4a
...@@ -242,12 +242,15 @@ static int mac89x0_device_probe(struct platform_device *pdev) ...@@ -242,12 +242,15 @@ static int mac89x0_device_probe(struct platform_device *pdev)
pr_info("No EEPROM, giving up now.\n"); pr_info("No EEPROM, giving up now.\n");
goto out1; goto out1;
} else { } else {
u8 addr[ETH_ALEN];
for (i = 0; i < ETH_ALEN; i += 2) { for (i = 0; i < ETH_ALEN; i += 2) {
/* Big-endian (why??!) */ /* Big-endian (why??!) */
unsigned short s = readreg(dev, PP_IA + i); unsigned short s = readreg(dev, PP_IA + i);
dev->dev_addr[i] = s >> 8; addr[i] = s >> 8;
dev->dev_addr[i+1] = s & 0xff; addr[i+1] = s & 0xff;
} }
eth_hw_addr_set(dev, addr);
} }
dev->irq = SLOT2IRQ(slot); dev->irq = SLOT2IRQ(slot);
......
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