diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-19 01:50:07 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2021-10-20 11:39:42 +0200 |
commit | 708884e7f7f3adb00ddb32d1c1a772d30bf86747 (patch) | |
tree | 15b09b36168e9dad9c15312a19bacdfefcd5cb12 /drivers/net/wireless/marvell/libertas/main.c | |
parent | iwlwifi: cfg: set low-latency-xtal for some integrated So devices (diff) | |
download | linux-708884e7f7f3adb00ddb32d1c1a772d30bf86747.tar.xz linux-708884e7f7f3adb00ddb32d1c1a772d30bf86747.zip |
wireless: use eth_hw_addr_set()
Convert all WiFi 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 <kuba@kernel.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20211018235021.1279697-2-kuba@kernel.org
Diffstat (limited to 'drivers/net/wireless/marvell/libertas/main.c')
-rw-r--r-- | drivers/net/wireless/marvell/libertas/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/marvell/libertas/main.c b/drivers/net/wireless/marvell/libertas/main.c index 64fc5e410864..5c9f295536ea 100644 --- a/drivers/net/wireless/marvell/libertas/main.c +++ b/drivers/net/wireless/marvell/libertas/main.c @@ -302,9 +302,9 @@ int lbs_set_mac_address(struct net_device *dev, void *addr) dev = priv->dev; memcpy(priv->current_addr, phwaddr->sa_data, ETH_ALEN); - memcpy(dev->dev_addr, phwaddr->sa_data, ETH_ALEN); + eth_hw_addr_set(dev, phwaddr->sa_data); if (priv->mesh_dev) - memcpy(priv->mesh_dev->dev_addr, phwaddr->sa_data, ETH_ALEN); + eth_hw_addr_set(priv->mesh_dev, phwaddr->sa_data); return ret; } |