summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-11-18 23:10:25 -0800
committerDavid S. Miller <davem@davemloft.net>2021-11-19 11:05:20 +0000
commit5114ddf8dd881f9059147d3f130e9415ce94125e (patch)
treed985c9a75a0def849245fa1aab1dd5c0fea5bfb7
parentcc71b8b9376ff5072d23b191654408c144dac6aa (diff)
downloadlinux-5114ddf8dd881f9059147d3f130e9415ce94125e.tar.bz2
8390: smc-ultra: use eth_hw_addr_set()
IO reads, so save to an array then eth_hw_addr_set(). Fixes build on Alpha. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/8390/smc-ultra.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/8390/smc-ultra.c b/drivers/net/ethernet/8390/smc-ultra.c
index 0890fa493f70..6e62c37c9400 100644
--- a/drivers/net/ethernet/8390/smc-ultra.c
+++ b/drivers/net/ethernet/8390/smc-ultra.c
@@ -204,6 +204,7 @@ static int __init ultra_probe1(struct net_device *dev, int ioaddr)
{
int i, retval;
int checksum = 0;
+ u8 macaddr[ETH_ALEN];
const char *model_name;
unsigned char eeprom_irq = 0;
static unsigned version_printed;
@@ -239,7 +240,8 @@ static int __init ultra_probe1(struct net_device *dev, int ioaddr)
model_name = (idreg & 0xF0) == 0x20 ? "SMC Ultra" : "SMC EtherEZ";
for (i = 0; i < 6; i++)
- dev->dev_addr[i] = inb(ioaddr + 8 + i);
+ macaddr[i] = inb(ioaddr + 8 + i);
+ eth_hw_addr_set(dev, macaddr);
netdev_info(dev, "%s at %#3x, %pM", model_name,
ioaddr, dev->dev_addr);