提交 f8891461 编写于 作者: N Naftali Goldstein 提交者: Johannes Berg

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: NNaftali Goldstein <naftali.goldstein@intel.com>
Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 ebb3ca3b
...@@ -2037,6 +2037,13 @@ void __ieee80211_flush_queues(struct ieee80211_local *local, ...@@ -2037,6 +2037,13 @@ void __ieee80211_flush_queues(struct ieee80211_local *local,
static inline bool ieee80211_can_run_worker(struct ieee80211_local *local) static inline bool ieee80211_can_run_worker(struct ieee80211_local *local)
{ {
/*
* It's unsafe to try to do any work during reconfigure flow.
* When the flow ends the work will be requeued.
*/
if (local->in_reconfig)
return false;
/* /*
* If quiescing is set, we are racing with __ieee80211_suspend. * If quiescing is set, we are racing with __ieee80211_suspend.
* __ieee80211_suspend flushes the workers after setting quiescing, * __ieee80211_suspend flushes the workers after setting quiescing,
......
...@@ -2480,6 +2480,10 @@ int ieee80211_reconfig(struct ieee80211_local *local) ...@@ -2480,6 +2480,10 @@ int ieee80211_reconfig(struct ieee80211_local *local)
mutex_lock(&local->mtx); mutex_lock(&local->mtx);
ieee80211_start_next_roc(local); ieee80211_start_next_roc(local);
mutex_unlock(&local->mtx); mutex_unlock(&local->mtx);
/* Requeue all works */
list_for_each_entry(sdata, &local->interfaces, list)
ieee80211_queue_work(&local->hw, &sdata->work);
} }
ieee80211_wake_queues_by_reason(hw, IEEE80211_MAX_QUEUE_MAP, ieee80211_wake_queues_by_reason(hw, IEEE80211_MAX_QUEUE_MAP,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册