summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/atmel
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-19 02:50:09 +0300
committerKalle Valo <kvalo@codeaurora.org>2021-10-20 12:39:43 +0300
commit8fac27fbc80ecdb22c2dd001e9bb0684eed55c01 (patch)
tree3f66360eb802a52301ac3fe15c2da721172ef8ca /drivers/net/wireless/atmel
parentfcb79f31d9068692f696e92c7fda199b37f5ee96 (diff)
downloadlinux-8fac27fbc80ecdb22c2dd001e9bb0684eed55c01.tar.xz
wireless: use eth_hw_addr_set() for dev->addr_len cases
Convert all WiFi 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 the netdevs are allocated with alloc_etherdev(), so dev->addr_len must be equal to ETH_ALEN. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20211018235021.1279697-4-kuba@kernel.org
Diffstat (limited to 'drivers/net/wireless/atmel')
-rw-r--r--drivers/net/wireless/atmel/atmel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/atmel/atmel.c b/drivers/net/wireless/atmel/atmel.c
index 3d782fabbfe6..8290cf881a1b 100644
--- a/drivers/net/wireless/atmel/atmel.c
+++ b/drivers/net/wireless/atmel/atmel.c
@@ -1296,7 +1296,7 @@ static int atmel_set_mac_address(struct net_device *dev, void *p)
{
struct sockaddr *addr = p;
- memcpy (dev->dev_addr, addr->sa_data, dev->addr_len);
+ eth_hw_addr_set(dev, addr->sa_data);
return atmel_open(dev);
}