diff options
| author | Jakub Kicinski <[email protected]> | 2021-10-01 21:32:21 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2021-10-02 13:18:25 +0000 |
| commit | 1681371762335221b02cb9266ac1a8b05c16fdef (patch) | |
| tree | e50b0b117dcbff1c187291d127fc9d204912ce82 /drivers/net/usb/asix_devices.c | |
| parent | ethernet: use eth_hw_addr_set() (diff) | |
| download | kernel-1681371762335221b02cb9266ac1a8b05c16fdef.tar.gz kernel-1681371762335221b02cb9266ac1a8b05c16fdef.zip | |
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/usb/asix_devices.c')
| -rw-r--r-- | drivers/net/usb/asix_devices.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c index 30821f6a6d7a..4514d35ef4c4 100644 --- a/drivers/net/usb/asix_devices.c +++ b/drivers/net/usb/asix_devices.c @@ -59,7 +59,7 @@ static void asix_status(struct usbnet *dev, struct urb *urb) static void asix_set_netdev_dev_addr(struct usbnet *dev, u8 *addr) { if (is_valid_ether_addr(addr)) { - memcpy(dev->net->dev_addr, addr, ETH_ALEN); + eth_hw_addr_set(dev->net, addr); } else { netdev_info(dev->net, "invalid hw address, using random\n"); eth_hw_addr_random(dev->net); |
