diff options
author | David S. Miller <davem@davemloft.net> | 2021-10-02 14:18:26 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-02 14:18:26 +0100 |
commit | e9637775c05f2bbae24f060a91b7f8459bbe2286 (patch) | |
tree | fc737b1464f6d6faaa12c636506bc78b51208d9c /drivers/net/ethernet/intel/ice/ice_main.c | |
parent | fa8274b788a3766c299a3172d4f5416e574ec42d (diff) | |
parent | 16be9a16340b1cec90be018162e434c8bdd1fcd1 (diff) |
Merge branch 'hw_addr_set'
Jakub Kicinski says:
====================
Use netdev->dev_addr write helpers (part 1)
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.
This is the first installment of predictably tedious conversion.
It tackles:
memcpy(netdev->dev_addr, something, ETH_ADDR)
and
ether_addr_copy(netdev->dev_addr, something)
replacing both with eth_hw_addr_set().
The first 7 patches are done entirely by sparse.
Next 4 were semi-manual because the sparse conversion
resulted in errors.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_main.c')
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index 909e5cd98054..57e24aeffbc5 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -3143,7 +3143,7 @@ static int ice_cfg_netdev(struct ice_vsi *vsi) if (vsi->type == ICE_VSI_PF) { SET_NETDEV_DEV(netdev, ice_pf_to_dev(vsi->back)); ether_addr_copy(mac_addr, vsi->port_info->mac.perm_addr); - ether_addr_copy(netdev->dev_addr, mac_addr); + eth_hw_addr_set(netdev, mac_addr); ether_addr_copy(netdev->perm_addr, mac_addr); } @@ -5172,7 +5172,7 @@ err_update_filters: netdev_err(netdev, "can't set MAC %pM. filter update failed\n", mac); netif_addr_lock_bh(netdev); - ether_addr_copy(netdev->dev_addr, old_mac); + eth_hw_addr_set(netdev, old_mac); netif_addr_unlock_bh(netdev); return err; } |