ethernet: use eth_hw_addr_set() instead of ether_addr_copy()
Convert Ethernet from ether_addr_copy() to eth_hw_addr_set(): @@ expression dev, np; @@ - ether_addr_copy(dev->dev_addr, np) + eth_hw_addr_set(dev, np) Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
e35b8d7dbb
commit
f3956ebb3b
@@ -181,11 +181,11 @@ int efx_set_mac_address(struct net_device *net_dev, void *data)
|
||||
|
||||
/* save old address */
|
||||
ether_addr_copy(old_addr, net_dev->dev_addr);
|
||||
ether_addr_copy(net_dev->dev_addr, new_addr);
|
||||
eth_hw_addr_set(net_dev, new_addr);
|
||||
if (efx->type->set_mac_address) {
|
||||
rc = efx->type->set_mac_address(efx);
|
||||
if (rc) {
|
||||
ether_addr_copy(net_dev->dev_addr, old_addr);
|
||||
eth_hw_addr_set(net_dev, old_addr);
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user