mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-03 23:37:40 -04:00
wifi: mac80211: remove keys after disabling beaconing
We shouldn't remove keys before disable beaconing, at least when
beacon protection is used, since that would remove keys that are
still used for beacon transmission at the same time. Stop before
removing keys so there's no race.
Fixes: af2d14b01c ("mac80211: Beacon protection using the new BIGTK (STA)")
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260303150339.574e7887b3ab.I50d708f5aa22584506a91d0da7f8a73ba39fceac@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
@@ -1904,12 +1904,6 @@ static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev,
|
||||
|
||||
__sta_info_flush(sdata, true, link_id, NULL);
|
||||
|
||||
ieee80211_remove_link_keys(link, &keys);
|
||||
if (!list_empty(&keys)) {
|
||||
synchronize_net();
|
||||
ieee80211_free_key_list(local, &keys);
|
||||
}
|
||||
|
||||
ieee80211_stop_mbssid(sdata);
|
||||
RCU_INIT_POINTER(link_conf->tx_bss_conf, NULL);
|
||||
|
||||
@@ -1921,6 +1915,12 @@ static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev,
|
||||
ieee80211_link_info_change_notify(sdata, link,
|
||||
BSS_CHANGED_BEACON_ENABLED);
|
||||
|
||||
ieee80211_remove_link_keys(link, &keys);
|
||||
if (!list_empty(&keys)) {
|
||||
synchronize_net();
|
||||
ieee80211_free_key_list(local, &keys);
|
||||
}
|
||||
|
||||
if (sdata->wdev.links[link_id].cac_started) {
|
||||
chandef = link_conf->chanreq.oper;
|
||||
wiphy_hrtimer_work_cancel(wiphy, &link->dfs_cac_timer_work);
|
||||
|
||||
Reference in New Issue
Block a user