diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-21 06:12:13 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-10-22 10:16:16 -0700 |
commit | 5f07da89bcd0759ac8391b917245a07fbdcf9234 (patch) | |
tree | 75692cd727c057640366032ed741551376de0292 /drivers/net/sb1000.c | |
parent | 7996acffd7cc83504eb300e791c80ac9c7f7e893 (diff) |
net: sb1000,rionet: use eth_hw_addr_set()
Get these two oldies ready for constant netdev->dev_addr.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/sb1000.c')
-rw-r--r-- | drivers/net/sb1000.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/sb1000.c b/drivers/net/sb1000.c index f01c9db01b16..57a6d598467b 100644 --- a/drivers/net/sb1000.c +++ b/drivers/net/sb1000.c @@ -149,6 +149,7 @@ sb1000_probe_one(struct pnp_dev *pdev, const struct pnp_device_id *id) unsigned short ioaddr[2], irq; unsigned int serial_number; int error = -ENODEV; + u8 addr[ETH_ALEN]; if (pnp_device_attach(pdev) < 0) return -ENODEV; @@ -203,10 +204,13 @@ sb1000_probe_one(struct pnp_dev *pdev, const struct pnp_device_id *id) dev->netdev_ops = &sb1000_netdev_ops; /* hardware address is 0:0:serial_number */ - dev->dev_addr[2] = serial_number >> 24 & 0xff; - dev->dev_addr[3] = serial_number >> 16 & 0xff; - dev->dev_addr[4] = serial_number >> 8 & 0xff; - dev->dev_addr[5] = serial_number >> 0 & 0xff; + addr[0] = 0; + addr[1] = 0; + addr[2] = serial_number >> 24 & 0xff; + addr[3] = serial_number >> 16 & 0xff; + addr[4] = serial_number >> 8 & 0xff; + addr[5] = serial_number >> 0 & 0xff; + eth_hw_addr_set(dev, addr); pnp_set_drvdata(pdev, dev); |