summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/cirrus
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-11-19 10:10:32 +0300
committerDavid S. Miller <davem@davemloft.net>2021-11-19 14:05:21 +0300
commit9a962aedd30f7fceb828d3161a80e0526e358eb5 (patch)
treecbb85d7db6244576ad263915a1f348fc11887d85 /drivers/net/ethernet/cirrus
parente217fc4affc8c7392e4db48488b36d2a5d446e9d (diff)
downloadlinux-9a962aedd30f7fceb828d3161a80e0526e358eb5.tar.xz
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>
Diffstat (limited to 'drivers/net/ethernet/cirrus')
-rw-r--r--drivers/net/ethernet/cirrus/mac89x0.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/ethernet/cirrus/mac89x0.c b/drivers/net/ethernet/cirrus/mac89x0.c
index 84251b85fc93..21a70b1f0ac5 100644
--- a/drivers/net/ethernet/cirrus/mac89x0.c
+++ b/drivers/net/ethernet/cirrus/mac89x0.c
@@ -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);