summaryrefslogtreecommitdiff
path: root/drivers/net/usb/sr9700.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-04 09:05:22 -0700
committerDavid S. Miller <davem@davemloft.net>2021-10-05 13:16:48 +0100
commit49ed8dde371522b2d330a7383aaa213748ad007e (patch)
tree52a737009b7e0d15d3c44640513eacef60d9b1dc /drivers/net/usb/sr9700.c
parenta05e4c0af490ca7c22fc77120aafebebdeaaf537 (diff)
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/sr9700.c')
-rw-r--r--drivers/net/usb/sr9700.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/usb/sr9700.c b/drivers/net/usb/sr9700.c
index 6516a37893e2..068f197f1786 100644
--- a/drivers/net/usb/sr9700.c
+++ b/drivers/net/usb/sr9700.c
@@ -296,7 +296,7 @@ static int sr9700_set_mac_address(struct net_device *netdev, void *p)
return -EINVAL;
}
- memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
+ eth_hw_addr_set(netdev, addr->sa_data);
sr_write_async(dev, SR_PAR, 6, netdev->dev_addr);
return 0;