summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/ibm/ibmvnic.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2021-10-02 14:18:26 +0100
committerDavid S. Miller <davem@davemloft.net>2021-10-02 14:18:26 +0100
commite9637775c05f2bbae24f060a91b7f8459bbe2286 (patch)
treefc737b1464f6d6faaa12c636506bc78b51208d9c /drivers/net/ethernet/ibm/ibmvnic.c
parentfa8274b788a3766c299a3172d4f5416e574ec42d (diff)
parent16be9a16340b1cec90be018162e434c8bdd1fcd1 (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/ibm/ibmvnic.c')
-rw-r--r--drivers/net/ethernet/ibm/ibmvnic.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 21efd76dd427..9d61167ba767 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -4766,8 +4766,7 @@ static int handle_change_mac_rsp(union ibmvnic_crq *crq,
/* crq->change_mac_addr.mac_addr is the requested one
* crq->change_mac_addr_rsp.mac_addr is the returned valid one.
*/
- ether_addr_copy(netdev->dev_addr,
- &crq->change_mac_addr_rsp.mac_addr[0]);
+ eth_hw_addr_set(netdev, &crq->change_mac_addr_rsp.mac_addr[0]);
ether_addr_copy(adapter->mac_addr,
&crq->change_mac_addr_rsp.mac_addr[0]);
out:
@@ -5723,7 +5722,7 @@ static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id)
bitmap_set(adapter->map_ids, 0, 1);
ether_addr_copy(adapter->mac_addr, mac_addr_p);
- ether_addr_copy(netdev->dev_addr, adapter->mac_addr);
+ eth_hw_addr_set(netdev, adapter->mac_addr);
netdev->irq = dev->irq;
netdev->netdev_ops = &ibmvnic_netdev_ops;
netdev->ethtool_ops = &ibmvnic_ethtool_ops;