aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys/visornic/visornic_main.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-19 10:12:41 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-10-20 19:33:58 +0200
commit13898e9341824f8d96cb37e5f36eb1828e9f2e63 (patch)
treef15e31f2389e638ff9702ab155bfb4881d6a0d17 /drivers/staging/unisys/visornic/visornic_main.c
parentstaging: rtl8712: prepare for const netdev->dev_addr (diff)
downloadlinux-dev-13898e9341824f8d96cb37e5f36eb1828e9f2e63.tar.xz
linux-dev-13898e9341824f8d96cb37e5f36eb1828e9f2e63.zip
staging: unisys: use eth_hw_addr_set()
Commit 406f42fa0d3c ("net-next: When a bond have a massive amount of VLANs...") introduced a rbtree for faster Ethernet address look up. To maintain netdev->dev_addr in this tree we need to make all the writes to it got through appropriate helpers. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Link: https://lore.kernel.org/r/20211019171243.1412240-7-kuba@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys/visornic/visornic_main.c')
-rw-r--r--drivers/staging/unisys/visornic/visornic_main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
index a3bc568c660d..62cd9b783732 100644
--- a/drivers/staging/unisys/visornic/visornic_main.c
+++ b/drivers/staging/unisys/visornic/visornic_main.c
@@ -1782,6 +1782,7 @@ static int visornic_probe(struct visor_device *dev)
struct net_device *netdev = NULL;
int err;
int channel_offset = 0;
+ u8 addr[ETH_ALEN];
u64 features;
netdev = alloc_etherdev(sizeof(struct visornic_devdata));
@@ -1798,14 +1799,14 @@ static int visornic_probe(struct visor_device *dev)
/* Get MAC address from channel and read it into the device. */
netdev->addr_len = ETH_ALEN;
channel_offset = offsetof(struct visor_io_channel, vnic.macaddr);
- err = visorbus_read_channel(dev, channel_offset, netdev->dev_addr,
- ETH_ALEN);
+ err = visorbus_read_channel(dev, channel_offset, addr, ETH_ALEN);
if (err < 0) {
dev_err(&dev->device,
"%s failed to get mac addr from chan (%d)\n",
__func__, err);
goto cleanup_netdev;
}
+ eth_hw_addr_set(netdev, addr);
devdata = devdata_initialize(netdev_priv(netdev), dev);
if (!devdata) {