diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-16 00:53:04 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-18 15:20:38 +0300 |
commit | 4abd7cffc09a38015fa14a22471e3de48a4ca032 (patch) | |
tree | b6a0100f08a5de51263210934a6ce8f4fec1f4f0 /drivers/net/ethernet/huawei | |
parent | 0e9e7598c68f1dc17ce1053b08494b8ed6dd4985 (diff) | |
download | linux-4abd7cffc09a38015fa14a22471e3de48a4ca032.tar.xz |
ethernet: use eth_hw_addr_set() in unmaintained drivers
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/huawei')
-rw-r--r-- | drivers/net/ethernet/huawei/hinic/hinic_main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/huawei/hinic/hinic_main.c b/drivers/net/ethernet/huawei/hinic/hinic_main.c index 6414e922cf8c..f9a766b8ac43 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_main.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_main.c @@ -1181,6 +1181,7 @@ static int nic_dev_init(struct pci_dev *pdev) struct net_device *netdev; struct hinic_hwdev *hwdev; struct devlink *devlink; + u8 addr[ETH_ALEN]; int err, num_qps; devlink = hinic_devlink_alloc(&pdev->dev); @@ -1259,11 +1260,12 @@ static int nic_dev_init(struct pci_dev *pdev) pci_set_drvdata(pdev, netdev); - err = hinic_port_get_mac(nic_dev, netdev->dev_addr); + err = hinic_port_get_mac(nic_dev, addr); if (err) { dev_err(&pdev->dev, "Failed to get mac address\n"); goto err_get_mac; } + eth_hw_addr_set(netdev, addr); if (!is_valid_ether_addr(netdev->dev_addr)) { if (!HINIC_IS_VF(nic_dev->hwdev->hwif)) { |