Skip to content

Commit f889146

Browse files
ngoldstejmberg-intel
authored andcommitted
mac80211: do not start any work during reconfigure flow
It is not a good idea to try to perform any work (e.g. send an auth frame) during reconfigure flow. Prevent this from happening, and at the end of the reconfigure flow requeue all the works. Signed-off-by: Naftali Goldstein <[email protected]> Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
1 parent ebb3ca3 commit f889146

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

net/mac80211/ieee80211_i.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2037,6 +2037,13 @@ void __ieee80211_flush_queues(struct ieee80211_local *local,
20372037

20382038
static inline bool ieee80211_can_run_worker(struct ieee80211_local *local)
20392039
{
2040+
/*
2041+
* It's unsafe to try to do any work during reconfigure flow.
2042+
* When the flow ends the work will be requeued.
2043+
*/
2044+
if (local->in_reconfig)
2045+
return false;
2046+
20402047
/*
20412048
* If quiescing is set, we are racing with __ieee80211_suspend.
20422049
* __ieee80211_suspend flushes the workers after setting quiescing,

net/mac80211/util.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2480,6 +2480,10 @@ int ieee80211_reconfig(struct ieee80211_local *local)
24802480
mutex_lock(&local->mtx);
24812481
ieee80211_start_next_roc(local);
24822482
mutex_unlock(&local->mtx);
2483+
2484+
/* Requeue all works */
2485+
list_for_each_entry(sdata, &local->interfaces, list)
2486+
ieee80211_queue_work(&local->hw, &sdata->work);
24832487
}
24842488

24852489
ieee80211_wake_queues_by_reason(hw, IEEE80211_MAX_QUEUE_MAP,

0 commit comments

Comments
 (0)