summaryrefslogtreecommitdiffstats
path: root/net/ethernet/eth.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-01 23:32:20 +0200
committerDavid S. Miller <davem@davemloft.net>2021-10-02 15:18:25 +0200
commita96d317fb1a30b9f323548eb2ff05d4e4600ead9 (patch)
treeaf0fc5c39eef0461e5e15a6cf2f5d9eac93fd101 /net/ethernet/eth.c
parentnet: use eth_hw_addr_set() (diff)
downloadlinux-a96d317fb1a30b9f323548eb2ff05d4e4600ead9.tar.xz
linux-a96d317fb1a30b9f323548eb2ff05d4e4600ead9.zip
ethernet: use eth_hw_addr_set()
Convert all Ethernet drivers from memcpy(... ETH_ADDR) to eth_hw_addr_set(): @@ expression dev, np; @@ - memcpy(dev->dev_addr, np, ETH_ALEN) + eth_hw_addr_set(dev, np) Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ethernet/eth.c')
-rw-r--r--net/ethernet/eth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
index 73fce9467467..b57530c231a6 100644
--- a/net/ethernet/eth.c
+++ b/net/ethernet/eth.c
@@ -304,7 +304,7 @@ void eth_commit_mac_addr_change(struct net_device *dev, void *p)
{
struct sockaddr *addr = p;
- memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
+ eth_hw_addr_set(dev, addr->sa_data);
}
EXPORT_SYMBOL(eth_commit_mac_addr_change);