aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/pm.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/pm.c')
-rw-r--r--net/mac80211/pm.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c
index ef7be1ce2c87..1e6152ac6778 100644
--- a/net/mac80211/pm.c
+++ b/net/mac80211/pm.c
@@ -21,6 +21,19 @@ int __ieee80211_suspend(struct ieee80211_hw *hw)
21 list_for_each_entry(sdata, &local->interfaces, list) 21 list_for_each_entry(sdata, &local->interfaces, list)
22 ieee80211_disable_keys(sdata); 22 ieee80211_disable_keys(sdata);
23 23
24 /* Tear down aggregation sessions */
25
26 rcu_read_lock();
27
28 if (hw->flags & IEEE80211_HW_AMPDU_AGGREGATION) {
29 list_for_each_entry_rcu(sta, &local->sta_list, list) {
30 set_sta_flags(sta, WLAN_STA_SUSPEND);
31 ieee80211_sta_tear_down_BA_sessions(sta);
32 }
33 }
34
35 rcu_read_unlock();
36
24 /* remove STAs */ 37 /* remove STAs */
25 if (local->ops->sta_notify) { 38 if (local->ops->sta_notify) {
26 spin_lock_irqsave(&local->sta_lock, flags); 39 spin_lock_irqsave(&local->sta_lock, flags);
@@ -102,6 +115,18 @@ int __ieee80211_resume(struct ieee80211_hw *hw)
102 spin_unlock_irqrestore(&local->sta_lock, flags); 115 spin_unlock_irqrestore(&local->sta_lock, flags);
103 } 116 }
104 117
118 /* Clear Suspend state so that ADDBA requests can be processed */
119
120 rcu_read_lock();
121
122 if (hw->flags & IEEE80211_HW_AMPDU_AGGREGATION) {
123 list_for_each_entry_rcu(sta, &local->sta_list, list) {
124 clear_sta_flags(sta, WLAN_STA_SUSPEND);
125 }
126 }
127
128 rcu_read_unlock();
129
105 /* add back keys */ 130 /* add back keys */
106 list_for_each_entry(sdata, &local->interfaces, list) 131 list_for_each_entry(sdata, &local->interfaces, list)
107 if (netif_running(sdata->dev)) 132 if (netif_running(sdata->dev))