diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-02 00:32:21 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-02 16:18:25 +0300 |
commit | 1681371762335221b02cb9266ac1a8b05c16fdef (patch) | |
tree | e50b0b117dcbff1c187291d127fc9d204912ce82 /drivers/net/usb/ipheth.c | |
parent | a96d317fb1a30b9f323548eb2ff05d4e4600ead9 (diff) | |
download | linux-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/ipheth.c')
-rw-r--r-- | drivers/net/usb/ipheth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c index 06e2181e5810..cd33955df0b6 100644 --- a/drivers/net/usb/ipheth.c +++ b/drivers/net/usb/ipheth.c @@ -303,7 +303,7 @@ static int ipheth_get_macaddr(struct ipheth_device *dev) __func__, retval); retval = -EINVAL; } else { - memcpy(net->dev_addr, dev->ctrl_buf, ETH_ALEN); + eth_hw_addr_set(net, dev->ctrl_buf); retval = 0; } |