Skip to content
Snippets Groups Projects
Commit ca45de77 authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville
Browse files

mac80211: tear down BA sessions properly on suspend


Currently, the code to tear down BA sessions will
execute after queues are stopped, but attempt to
send frames, so those frames will just get queued,
which isn't intended. Move this code to before to
tear down the sessions properly.

Additionally, after stopping queues, flush the TX
queues in the driver driver to make sure all the
frames went out.

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 31d291a7
No related branches found
No related tags found
No related merge requests found
...@@ -14,12 +14,23 @@ int __ieee80211_suspend(struct ieee80211_hw *hw) ...@@ -14,12 +14,23 @@ int __ieee80211_suspend(struct ieee80211_hw *hw)
ieee80211_scan_cancel(local); ieee80211_scan_cancel(local);
if (hw->flags & IEEE80211_HW_AMPDU_AGGREGATION) {
mutex_lock(&local->sta_mtx);
list_for_each_entry(sta, &local->sta_list, list) {
set_sta_flags(sta, WLAN_STA_BLOCK_BA);
ieee80211_sta_tear_down_BA_sessions(sta, true);
}
mutex_unlock(&local->sta_mtx);
}
ieee80211_stop_queues_by_reason(hw, ieee80211_stop_queues_by_reason(hw,
IEEE80211_QUEUE_STOP_REASON_SUSPEND); IEEE80211_QUEUE_STOP_REASON_SUSPEND);
/* flush out all packets */ /* flush out all packets */
synchronize_net(); synchronize_net();
drv_flush(local, false);
local->quiescing = true; local->quiescing = true;
/* make quiescing visible to timers everywhere */ /* make quiescing visible to timers everywhere */
mb(); mb();
...@@ -43,11 +54,6 @@ int __ieee80211_suspend(struct ieee80211_hw *hw) ...@@ -43,11 +54,6 @@ int __ieee80211_suspend(struct ieee80211_hw *hw)
/* tear down aggregation sessions and remove STAs */ /* tear down aggregation sessions and remove STAs */
mutex_lock(&local->sta_mtx); mutex_lock(&local->sta_mtx);
list_for_each_entry(sta, &local->sta_list, list) { list_for_each_entry(sta, &local->sta_list, list) {
if (hw->flags & IEEE80211_HW_AMPDU_AGGREGATION) {
set_sta_flags(sta, WLAN_STA_BLOCK_BA);
ieee80211_sta_tear_down_BA_sessions(sta, true);
}
if (sta->uploaded) { if (sta->uploaded) {
sdata = sta->sdata; sdata = sta->sdata;
if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment