]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mac80211: purge remain-on-channel items when suspending
authorJohannes Berg <johannes.berg@intel.com>
Wed, 27 Mar 2013 21:49:19 +0000 (22:49 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 8 Apr 2013 07:17:00 +0000 (09:17 +0200)
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>
net/mac80211/ieee80211_i.h
net/mac80211/iface.c
net/mac80211/offchannel.c
net/mac80211/pm.c

index c783e996bcce578c0d82b2de84d00237435edb43..693c1812b7bc945c16e852385a1c1df9d227aa91 100644 (file)
@@ -1315,7 +1315,8 @@ void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local);
 void ieee80211_offchannel_return(struct ieee80211_local *local);
 void ieee80211_roc_setup(struct ieee80211_local *local);
 void ieee80211_start_next_roc(struct ieee80211_local *local);
-void ieee80211_roc_purge(struct ieee80211_sub_if_data *sdata);
+void ieee80211_roc_purge(struct ieee80211_local *local,
+                        struct ieee80211_sub_if_data *sdata);
 void ieee80211_roc_notify_destroy(struct ieee80211_roc_work *roc);
 void ieee80211_sw_roc_work(struct work_struct *work);
 void ieee80211_handle_roc_started(struct ieee80211_roc_work *roc);
index 760268e51951b29b29dafcafeb709ae93a1b1444..75b322f9d9450e0ceeb5ceed5a51b6f720585cc1 100644 (file)
@@ -693,7 +693,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
        if (sdata->dev)
                netif_tx_stop_all_queues(sdata->dev);
 
-       ieee80211_roc_purge(sdata);
+       ieee80211_roc_purge(local, sdata);
 
        if (sdata->vif.type == NL80211_IFTYPE_STATION)
                ieee80211_mgd_stop(sdata);
index b01eb7314ec670ebab5d686a3ac2df7acd5616a2..e19d6cf26ddee722c4d571446b6c96ecdad251c2 100644 (file)
@@ -436,15 +436,15 @@ void ieee80211_roc_setup(struct ieee80211_local *local)
        INIT_LIST_HEAD(&local->roc_list);
 }
 
-void ieee80211_roc_purge(struct ieee80211_sub_if_data *sdata)
+void ieee80211_roc_purge(struct ieee80211_local *local,
+                        struct ieee80211_sub_if_data *sdata)
 {
-       struct ieee80211_local *local = sdata->local;
        struct ieee80211_roc_work *roc, *tmp;
        LIST_HEAD(tmp_list);
 
        mutex_lock(&local->mtx);
        list_for_each_entry_safe(roc, tmp, &local->roc_list, list) {
-               if (roc->sdata != sdata)
+               if (sdata && roc->sdata != sdata)
                        continue;
 
                if (roc->started && local->ops->remain_on_channel) {
index 3d16f4e6174388f27e030f9612a64bbd752c04ea..b98d927dd0f38a47a01b4d4e7838ba1f11be6163 100644 (file)
@@ -19,6 +19,8 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
 
        ieee80211_dfs_cac_cancel(local);
 
+       ieee80211_roc_purge(local, NULL);
+
        if (hw->flags & IEEE80211_HW_AMPDU_AGGREGATION) {
                mutex_lock(&local->sta_mtx);
                list_for_each_entry(sta, &local->sta_list, list) {