summaryrefslogtreecommitdiff
path: root/drivers/net/usb/ax88172a.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/ax88172a.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/ax88172a.c')
-rw-r--r--drivers/net/usb/ax88172a.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/usb/ax88172a.c b/drivers/net/usb/ax88172a.c
index d9777d9a7c5d..3777c7e2e6fc 100644
--- a/drivers/net/usb/ax88172a.c
+++ b/drivers/net/usb/ax88172a.c
@@ -176,7 +176,7 @@ static int ax88172a_bind(struct usbnet *dev, struct usb_interface *intf)
ret = -EIO;
goto free;
}
- memcpy(dev->net->dev_addr, buf, ETH_ALEN);
+ eth_hw_addr_set(dev->net, buf);
dev->net->netdev_ops = &ax88172a_netdev_ops;
dev->net->ethtool_ops = &ax88172a_ethtool_ops;