summaryrefslogtreecommitdiff
path: root/net/wireless/mlme.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2022-06-27 17:19:18 +0300
committerJohannes Berg <johannes.berg@intel.com>2022-07-15 12:43:16 +0300
commit8f6e0dfc2245d8ca1a3335a06a1219c56df04bb8 (patch)
tree7d11c72e2c13dd7a3f24577554262e67cfcda36c /net/wireless/mlme.c
parent98b0b467466c6afe8f2863158383444fbbc5f322 (diff)
downloadlinux-8f6e0dfc2245d8ca1a3335a06a1219c56df04bb8.tar.xz
wifi: cfg80211: remove BSS pointer from cfg80211_disassoc_request
The race described by the comment in mac80211 hasn't existed since the locking rework to use the same lock and for MLO we need to pass the AP MLD address, so just pass the BSSID or AP MLD address instead of the BSS struct pointer, and adjust all the code accordingly. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/mlme.c')
-rw-r--r--net/wireless/mlme.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index 935537c64ed8..4a35b3559daa 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -370,7 +370,7 @@ int cfg80211_mlme_deauth(struct cfg80211_registered_device *rdev,
}
int cfg80211_mlme_disassoc(struct cfg80211_registered_device *rdev,
- struct net_device *dev, const u8 *bssid,
+ struct net_device *dev, const u8 *ap_addr,
const u8 *ie, int ie_len, u16 reason,
bool local_state_change)
{
@@ -380,6 +380,7 @@ int cfg80211_mlme_disassoc(struct cfg80211_registered_device *rdev,
.local_state_change = local_state_change,
.ie = ie,
.ie_len = ie_len,
+ .ap_addr = ap_addr,
};
int err;
@@ -388,10 +389,7 @@ int cfg80211_mlme_disassoc(struct cfg80211_registered_device *rdev,
if (!wdev->connected)
return -ENOTCONN;
- if (ether_addr_equal(wdev->links[0].client.current_bss->pub.bssid,
- bssid))
- req.bss = &wdev->links[0].client.current_bss->pub;
- else
+ if (memcmp(wdev->u.client.connected_addr, ap_addr, ETH_ALEN))
return -ENOTCONN;
err = rdev_disassoc(rdev, dev, &req);