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/rionet.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/rionet.c')
-rw-r--r-- | drivers/net/rionet.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/rionet.c b/drivers/net/rionet.c index 2056d6ad04b5..1a95f3beb784 100644 --- a/drivers/net/rionet.c +++ b/drivers/net/rionet.c @@ -482,6 +482,7 @@ static int rionet_setup_netdev(struct rio_mport *mport, struct net_device *ndev) { int rc = 0; struct rionet_private *rnet; + u8 addr[ETH_ALEN]; u16 device_id; const size_t rionet_active_bytes = sizeof(void *) * RIO_MAX_ROUTE_ENTRIES(mport->sys_size); @@ -501,12 +502,13 @@ static int rionet_setup_netdev(struct rio_mport *mport, struct net_device *ndev) /* Set the default MAC address */ device_id = rio_local_get_device_id(mport); - ndev->dev_addr[0] = 0x00; - ndev->dev_addr[1] = 0x01; - ndev->dev_addr[2] = 0x00; - ndev->dev_addr[3] = 0x01; - ndev->dev_addr[4] = device_id >> 8; - ndev->dev_addr[5] = device_id & 0xff; + addr[0] = 0x00; + addr[1] = 0x01; + addr[2] = 0x00; + addr[3] = 0x01; + addr[4] = device_id >> 8; + addr[5] = device_id & 0xff; + eth_hw_addr_set(ndev, addr); ndev->netdev_ops = &rionet_netdev_ops; ndev->mtu = RIONET_MAX_MTU; |