aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-03-27 17:49:19 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-04-08 03:17:00 -0400
commitc8f994eec2a966a7a5fb6a3be517e3ede6a3cafa (patch)
treee2c04a5459150da9f57ad60849351642b6a4fa92 /net/mac80211
parentafdc7c18e9f2a768865b6caa886e605719a6304e (diff)
mac80211: purge remain-on-channel items when suspending
They can't really be executed while suspended and could trigger work warnings, so abort all ROC items. When the system resumes the notifications about this will be delivered to userspace which can then act accordingly (though it will assume they were canceled/finished.) Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/ieee80211_i.h3
-rw-r--r--net/mac80211/iface.c2
-rw-r--r--net/mac80211/offchannel.c6
-rw-r--r--net/mac80211/pm.c2
4 files changed, 8 insertions, 5 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index c783e996bcce..693c1812b7bc 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1315,7 +1315,8 @@ void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local);
1315void ieee80211_offchannel_return(struct ieee80211_local *local); 1315void ieee80211_offchannel_return(struct ieee80211_local *local);
1316void ieee80211_roc_setup(struct ieee80211_local *local); 1316void ieee80211_roc_setup(struct ieee80211_local *local);
1317void ieee80211_start_next_roc(struct ieee80211_local *local); 1317void ieee80211_start_next_roc(struct ieee80211_local *local);
1318void ieee80211_roc_purge(struct ieee80211_sub_if_data *sdata); 1318void ieee80211_roc_purge(struct ieee80211_local *local,
1319 struct ieee80211_sub_if_data *sdata);
1319void ieee80211_roc_notify_destroy(struct ieee80211_roc_work *roc); 1320void ieee80211_roc_notify_destroy(struct ieee80211_roc_work *roc);
1320void ieee80211_sw_roc_work(struct work_struct *work); 1321void ieee80211_sw_roc_work(struct work_struct *work);
1321void ieee80211_handle_roc_started(struct ieee80211_roc_work *roc); 1322void ieee80211_handle_roc_started(struct ieee80211_roc_work *roc);
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 760268e51951..75b322f9d945 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -693,7 +693,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
693 if (sdata->dev) 693 if (sdata->dev)
694 netif_tx_stop_all_queues(sdata->dev); 694 netif_tx_stop_all_queues(sdata->dev);
695 695
696 ieee80211_roc_purge(sdata); 696 ieee80211_roc_purge(local, sdata);
697 697
698 if (sdata->vif.type == NL80211_IFTYPE_STATION) 698 if (sdata->vif.type == NL80211_IFTYPE_STATION)
699 ieee80211_mgd_stop(sdata); 699 ieee80211_mgd_stop(sdata);
diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c
index b01eb7314ec6..e19d6cf26dde 100644
--- a/net/mac80211/offchannel.c
+++ b/net/mac80211/offchannel.c
@@ -436,15 +436,15 @@ void ieee80211_roc_setup(struct ieee80211_local *local)
436 INIT_LIST_HEAD(&local->roc_list); 436 INIT_LIST_HEAD(&local->roc_list);
437} 437}
438 438
439void ieee80211_roc_purge(struct ieee80211_sub_if_data *sdata) 439void ieee80211_roc_purge(struct ieee80211_local *local,
440 struct ieee80211_sub_if_data *sdata)
440{ 441{
441 struct ieee80211_local *local = sdata->local;
442 struct ieee80211_roc_work *roc, *tmp; 442 struct ieee80211_roc_work *roc, *tmp;
443 LIST_HEAD(tmp_list); 443 LIST_HEAD(tmp_list);
444 444
445 mutex_lock(&local->mtx); 445 mutex_lock(&local->mtx);
446 list_for_each_entry_safe(roc, tmp, &local->roc_list, list) { 446 list_for_each_entry_safe(roc, tmp, &local->roc_list, list) {
447 if (roc->sdata != sdata) 447 if (sdata && roc->sdata != sdata)
448 continue; 448 continue;
449 449
450 if (roc->started && local->ops->remain_on_channel) { 450 if (roc->started && local->ops->remain_on_channel) {
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c
index 3d16f4e61743..b98d927dd0f3 100644
--- a/net/mac80211/pm.c
+++ b/net/mac80211/pm.c
@@ -19,6 +19,8 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
19 19
20 ieee80211_dfs_cac_cancel(local); 20 ieee80211_dfs_cac_cancel(local);
21 21
22 ieee80211_roc_purge(local, NULL);
23
22 if (hw->flags & IEEE80211_HW_AMPDU_AGGREGATION) { 24 if (hw->flags & IEEE80211_HW_AMPDU_AGGREGATION) {
23 mutex_lock(&local->sta_mtx); 25 mutex_lock(&local->sta_mtx);
24 list_for_each_entry(sta, &local->sta_list, list) { 26 list_for_each_entry(sta, &local->sta_list, list) {