summaryrefslogtreecommitdiff
path: root/drivers/net/usb/sr9800.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-02 00:32:21 +0300
committerDavid S. Miller <davem@davemloft.net>2021-10-02 16:18:25 +0300
commit1681371762335221b02cb9266ac1a8b05c16fdef (patch)
treee50b0b117dcbff1c187291d127fc9d204912ce82 /drivers/net/usb/sr9800.c
parenta96d317fb1a30b9f323548eb2ff05d4e4600ead9 (diff)
downloadlinux-1681371762335221b02cb9266ac1a8b05c16fdef.tar.xz
net: usb: use eth_hw_addr_set()
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. Convert usb 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 'drivers/net/usb/sr9800.c')
-rw-r--r--drivers/net/usb/sr9800.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/usb/sr9800.c b/drivers/net/usb/sr9800.c
index 576401c8b1be..838f4e9e8b58 100644
--- a/drivers/net/usb/sr9800.c
+++ b/drivers/net/usb/sr9800.c
@@ -503,7 +503,7 @@ static int sr_set_mac_address(struct net_device *net, void *p)
if (!is_valid_ether_addr(addr->sa_data))
return -EADDRNOTAVAIL;
- memcpy(net->dev_addr, addr->sa_data, ETH_ALEN);
+ eth_hw_addr_set(net, addr->sa_data);
/* We use the 20 byte dev->data
* for our 6 byte mac buffer