summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/wil6210
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-19 02:50:08 +0300
committerKalle Valo <kvalo@codeaurora.org>2021-10-20 12:39:42 +0300
commitfcb79f31d9068692f696e92c7fda199b37f5ee96 (patch)
tree418170cf180c2906d86f39d10ada6321a82d6e0d /drivers/net/wireless/ath/wil6210
parent708884e7f7f3adb00ddb32d1c1a772d30bf86747 (diff)
downloadlinux-fcb79f31d9068692f696e92c7fda199b37f5ee96.tar.xz
wireless: use eth_hw_addr_set() instead of ether_addr_copy()
Commit 406f42fa0d3c ("net-next: When a bond have a massive amount of VLANs...") introduced a rbtree for faster Ethernet address look up. To maintain netdev->dev_addr in this tree we need to make all the writes to it got through appropriate helpers. Convert wireless from ether_addr_copy() to eth_hw_addr_set(): @@ expression dev, np; @@ - ether_addr_copy(dev->dev_addr, np) + 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-3-kuba@kernel.org
Diffstat (limited to 'drivers/net/wireless/ath/wil6210')
-rw-r--r--drivers/net/wireless/ath/wil6210/cfg80211.c4
-rw-r--r--drivers/net/wireless/ath/wil6210/main.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c
index 1ff2679963f0..bd8d0a54af77 100644
--- a/drivers/net/wireless/ath/wil6210/cfg80211.c
+++ b/drivers/net/wireless/ath/wil6210/cfg80211.c
@@ -723,9 +723,9 @@ wil_cfg80211_add_iface(struct wiphy *wiphy, const char *name,
ndev = vif_to_ndev(vif);
ether_addr_copy(ndev->perm_addr, ndev_main->perm_addr);
if (is_valid_ether_addr(params->macaddr)) {
- ether_addr_copy(ndev->dev_addr, params->macaddr);
+ eth_hw_addr_set(ndev, params->macaddr);
} else {
- ether_addr_copy(ndev->dev_addr, ndev_main->perm_addr);
+ eth_hw_addr_set(ndev, ndev_main->perm_addr);
ndev->dev_addr[0] = (ndev->dev_addr[0] ^ (1 << vif->mid)) |
0x2; /* locally administered */
}
diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c
index 3ba5b2550a8c..7da87c9f363f 100644
--- a/drivers/net/wireless/ath/wil6210/main.c
+++ b/drivers/net/wireless/ath/wil6210/main.c
@@ -1358,7 +1358,7 @@ static int wil_get_bl_info(struct wil6210_priv *wil)
ether_addr_copy(ndev->perm_addr, mac);
ether_addr_copy(wiphy->perm_addr, mac);
if (!is_valid_ether_addr(ndev->dev_addr))
- ether_addr_copy(ndev->dev_addr, mac);
+ eth_hw_addr_set(ndev, mac);
if (rf_status) {/* bad RF cable? */
wil_err(wil, "RF communication error 0x%04x",
@@ -1431,7 +1431,7 @@ static int wil_get_otp_info(struct wil6210_priv *wil)
ether_addr_copy(ndev->perm_addr, mac);
ether_addr_copy(wiphy->perm_addr, mac);
if (!is_valid_ether_addr(ndev->dev_addr))
- ether_addr_copy(ndev->dev_addr, mac);
+ eth_hw_addr_set(ndev, mac);
return 0;
}
@@ -1609,7 +1609,7 @@ int wil_reset(struct wil6210_priv *wil, bool load_fw)
struct net_device *ndev = wil->main_ndev;
ether_addr_copy(ndev->perm_addr, mac);
- ether_addr_copy(ndev->dev_addr, ndev->perm_addr);
+ eth_hw_addr_set(ndev, ndev->perm_addr);
return 0;
}