summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/zydas
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-18 16:50:09 -0700
committerKalle Valo <kvalo@codeaurora.org>2021-10-20 12:39:43 +0300
commit8fac27fbc80ecdb22c2dd001e9bb0684eed55c01 (patch)
tree3f66360eb802a52301ac3fe15c2da721172ef8ca /drivers/net/wireless/zydas
parentfcb79f31d9068692f696e92c7fda199b37f5ee96 (diff)
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/zydas')
-rw-r--r--drivers/net/wireless/zydas/zd1201.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/zydas/zd1201.c b/drivers/net/wireless/zydas/zd1201.c
index 097805b55c59..6b735fee7b18 100644
--- a/drivers/net/wireless/zydas/zd1201.c
+++ b/drivers/net/wireless/zydas/zd1201.c
@@ -857,7 +857,7 @@ static int zd1201_set_mac_address(struct net_device *dev, void *p)
addr->sa_data, dev->addr_len, 1);
if (err)
return err;
- memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
+ eth_hw_addr_set(dev, addr->sa_data);
return zd1201_mac_reset(zd);
}