summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/amd/hplance.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-11-18 23:10:22 -0800
committerDavid S. Miller <davem@davemloft.net>2021-11-19 11:05:20 +0000
commit21942eef062781429b356974589d7965952940fb (patch)
treeacb328507c0b30a1f9c31ae48a6b9fb3f9913620 /drivers/net/ethernet/amd/hplance.c
parent285e4c664d6461b175b4613fc77126b5006a1912 (diff)
amd: hplance: 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/amd/hplance.c')
-rw-r--r--drivers/net/ethernet/amd/hplance.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/amd/hplance.c b/drivers/net/ethernet/amd/hplance.c
index 6784f8748638..055fda11c572 100644
--- a/drivers/net/ethernet/amd/hplance.c
+++ b/drivers/net/ethernet/amd/hplance.c
@@ -129,6 +129,7 @@ static void hplance_init(struct net_device *dev, struct dio_dev *d)
{
unsigned long va = (d->resource.start + DIO_VIRADDRBASE);
struct hplance_private *lp;
+ u8 addr[ETH_ALEN];
int i;
/* reset the board */
@@ -144,9 +145,10 @@ static void hplance_init(struct net_device *dev, struct dio_dev *d)
/* The NVRAM holds our ethernet address, one nibble per byte,
* at bytes NVRAMOFF+1,3,5,7,9...
*/
- dev->dev_addr[i] = ((in_8(va + HPLANCE_NVRAMOFF + i*4 + 1) & 0xF) << 4)
+ addr[i] = ((in_8(va + HPLANCE_NVRAMOFF + i*4 + 1) & 0xF) << 4)
| (in_8(va + HPLANCE_NVRAMOFF + i*4 + 3) & 0xF);
}
+ eth_hw_addr_set(dev, addr);
lp = netdev_priv(dev);
lp->lance.name = d->name;