diff options
author | Eyal Shapira <eyal@wizery.com> | 2012-06-20 13:10:14 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-06-20 17:39:51 +0200 |
commit | 9ea4fa158f3a038d5be82ccc7e142f198233f059 (patch) | |
tree | 1aa410e64e528f52932cd69f6e19018c7fd36164 /net/mac80211/pm.c | |
parent | 00e96decfd0b927f975c98340a5982c5039eeaae (diff) | |
download | blackbird-op-linux-9ea4fa158f3a038d5be82ccc7e142f198233f059.tar.gz blackbird-op-linux-9ea4fa158f3a038d5be82ccc7e142f198233f059.zip |
mac80211: fix cleanup if driver suspend callback fails
In case the driver suspend callback fails, mac80211 is left
with stopped queues which prevents any further traffic as well
as all STAs are left marked with WLAN_STA_BLOCK_BA which will
cause any further ADDBA requests to be declined. Fix it by
undoing both before returning from __iee80211_suspend.
Reported-by: Vitaly Wool <vitalywool@gmail.com>
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/pm.c')
-rw-r--r-- | net/mac80211/pm.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c index 98c128be3827..5c572e7a1a71 100644 --- a/net/mac80211/pm.c +++ b/net/mac80211/pm.c @@ -78,6 +78,16 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan) if (err < 0) { local->quiescing = false; local->wowlan = false; + if (hw->flags & IEEE80211_HW_AMPDU_AGGREGATION) { + mutex_lock(&local->sta_mtx); + list_for_each_entry(sta, + &local->sta_list, list) { + clear_sta_flag(sta, WLAN_STA_BLOCK_BA); + } + mutex_unlock(&local->sta_mtx); + } + ieee80211_wake_queues_by_reason(hw, + IEEE80211_QUEUE_STOP_REASON_SUSPEND); return err; } else if (err > 0) { WARN_ON(err != 1); |