diff options
author | Eliad Peller <eliad@wizery.com> | 2015-12-14 09:26:57 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2016-01-14 05:10:14 -0500 |
commit | 470f4d613b51806e15e055428234a04a99f076fc (patch) | |
tree | da223fd2bd22e92c56da22c923da87ffa4707769 /net | |
parent | c3826807bbb3de693208da4ecb9c9602de16c616 (diff) |
mac80211: avoid ROC during hw restart
Defer ROC requests during hw restart, as the driver
might not be fully configured in this stage (e.g.
channel contexts were not added yet)
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/main.c | 5 | ||||
-rw-r--r-- | net/mac80211/offchannel.c | 4 | ||||
-rw-r--r-- | net/mac80211/util.c | 11 |
3 files changed, 18 insertions, 2 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 6bcf0faa4a89..ed4c8e66b44a 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -256,6 +256,11 @@ static void ieee80211_restart_work(struct work_struct *work) | |||
256 | list_for_each_entry(sdata, &local->interfaces, list) | 256 | list_for_each_entry(sdata, &local->interfaces, list) |
257 | flush_delayed_work(&sdata->dec_tailroom_needed_wk); | 257 | flush_delayed_work(&sdata->dec_tailroom_needed_wk); |
258 | ieee80211_scan_cancel(local); | 258 | ieee80211_scan_cancel(local); |
259 | |||
260 | /* make sure any new ROC will consider local->in_reconfig */ | ||
261 | flush_delayed_work(&local->roc_work); | ||
262 | flush_work(&local->hw_roc_done); | ||
263 | |||
259 | ieee80211_reconfig(local); | 264 | ieee80211_reconfig(local); |
260 | rtnl_unlock(); | 265 | rtnl_unlock(); |
261 | } | 266 | } |
diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c index fbc34e9088de..55a9c5b94ce1 100644 --- a/net/mac80211/offchannel.c +++ b/net/mac80211/offchannel.c | |||
@@ -408,6 +408,10 @@ void ieee80211_start_next_roc(struct ieee80211_local *local) | |||
408 | return; | 408 | return; |
409 | } | 409 | } |
410 | 410 | ||
411 | /* defer roc if driver is not started (i.e. during reconfig) */ | ||
412 | if (local->in_reconfig) | ||
413 | return; | ||
414 | |||
411 | roc = list_first_entry(&local->roc_list, struct ieee80211_roc_work, | 415 | roc = list_first_entry(&local->roc_list, struct ieee80211_roc_work, |
412 | list); | 416 | list); |
413 | 417 | ||
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 3943d4bf289c..4f6e0b79ef69 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -2051,8 +2051,15 @@ int ieee80211_reconfig(struct ieee80211_local *local) | |||
2051 | cfg80211_sched_scan_stopped_rtnl(local->hw.wiphy); | 2051 | cfg80211_sched_scan_stopped_rtnl(local->hw.wiphy); |
2052 | 2052 | ||
2053 | wake_up: | 2053 | wake_up: |
2054 | local->in_reconfig = false; | 2054 | if (local->in_reconfig) { |
2055 | barrier(); | 2055 | local->in_reconfig = false; |
2056 | barrier(); | ||
2057 | |||
2058 | /* Restart deferred ROCs */ | ||
2059 | mutex_lock(&local->mtx); | ||
2060 | ieee80211_start_next_roc(local); | ||
2061 | mutex_unlock(&local->mtx); | ||
2062 | } | ||
2056 | 2063 | ||
2057 | if (local->monitors == local->open_count && local->monitors > 0) | 2064 | if (local->monitors == local->open_count && local->monitors > 0) |
2058 | ieee80211_add_virtual_monitor(local); | 2065 | ieee80211_add_virtual_monitor(local); |