diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-04 18:05:22 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-05 14:16:48 +0200 |
commit | 49ed8dde371522b2d330a7383aaa213748ad007e (patch) | |
tree | 52a737009b7e0d15d3c44640513eacef60d9b1dc /drivers/net/usb/dm9601.c | |
parent | ethernet: use eth_hw_addr_set() for dev->addr_len cases (diff) | |
download | linux-49ed8dde371522b2d330a7383aaa213748ad007e.tar.xz linux-49ed8dde371522b2d330a7383aaa213748ad007e.zip |
net: usb: use eth_hw_addr_set() for dev->addr_len cases
Convert usb drivers from memcpy(... dev->addr_len)
to eth_hw_addr_set():
@@
expression dev, np;
@@
- memcpy(dev->dev_addr, np, dev->addr_len)
+ eth_hw_addr_set(dev, np)
Manually checked these are either usbnet or pure etherdevs.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/dm9601.c')
-rw-r--r-- | drivers/net/usb/dm9601.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c index f4b03202472d..dcdb46314685 100644 --- a/drivers/net/usb/dm9601.c +++ b/drivers/net/usb/dm9601.c @@ -331,7 +331,7 @@ static int dm9601_set_mac_address(struct net_device *net, void *p) return -EINVAL; } - memcpy(net->dev_addr, addr->sa_data, net->addr_len); + eth_hw_addr_set(net, addr->sa_data); __dm9601_set_mac_address(dev); return 0; |