diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-11-19 10:10:26 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-11-19 14:05:21 +0300 |
commit | d7d28e90e229a8af0472421015c5828f5cd1ad2e (patch) | |
tree | 3860467b3ba74d152942f64f8371750ccb18e0fc /drivers/net/ethernet/8390 | |
parent | 5114ddf8dd881f9059147d3f130e9415ce94125e (diff) | |
download | linux-d7d28e90e229a8af0472421015c5828f5cd1ad2e.tar.xz |
8390: hydra: use eth_hw_addr_set()
Loop with offsetting to every second byte, so use a temp buffer.
Fixes m68k build.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/8390')
-rw-r--r-- | drivers/net/ethernet/8390/hydra.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/8390/hydra.c b/drivers/net/ethernet/8390/hydra.c index 941754ea78ec..1df7601af86a 100644 --- a/drivers/net/ethernet/8390/hydra.c +++ b/drivers/net/ethernet/8390/hydra.c @@ -116,6 +116,7 @@ static int hydra_init(struct zorro_dev *z) unsigned long ioaddr = board+HYDRA_NIC_BASE; const char name[] = "NE2000"; int start_page, stop_page; + u8 macaddr[ETH_ALEN]; int j; int err; @@ -129,7 +130,8 @@ static int hydra_init(struct zorro_dev *z) return -ENOMEM; for (j = 0; j < ETH_ALEN; j++) - dev->dev_addr[j] = *((u8 *)(board + HYDRA_ADDRPROM + 2*j)); + macaddr[j] = *((u8 *)(board + HYDRA_ADDRPROM + 2*j)); + eth_hw_addr_set(dev, macaddr); /* We must set the 8390 for word mode. */ z_writeb(0x4b, ioaddr + NE_EN0_DCFG); |