diff options
Diffstat (limited to 'net/mac80211/pm.c')
| -rw-r--r-- | net/mac80211/pm.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c index 75202b295a4e..d287fde0431d 100644 --- a/net/mac80211/pm.c +++ b/net/mac80211/pm.c | |||
| @@ -40,22 +40,14 @@ int __ieee80211_suspend(struct ieee80211_hw *hw) | |||
| 40 | list_for_each_entry(sdata, &local->interfaces, list) | 40 | list_for_each_entry(sdata, &local->interfaces, list) |
| 41 | ieee80211_disable_keys(sdata); | 41 | ieee80211_disable_keys(sdata); |
| 42 | 42 | ||
| 43 | /* Tear down aggregation sessions */ | 43 | /* tear down aggregation sessions and remove STAs */ |
| 44 | 44 | mutex_lock(&local->sta_mtx); | |
| 45 | rcu_read_lock(); | 45 | list_for_each_entry(sta, &local->sta_list, list) { |
| 46 | 46 | if (hw->flags & IEEE80211_HW_AMPDU_AGGREGATION) { | |
| 47 | if (hw->flags & IEEE80211_HW_AMPDU_AGGREGATION) { | ||
| 48 | list_for_each_entry_rcu(sta, &local->sta_list, list) { | ||
| 49 | set_sta_flags(sta, WLAN_STA_BLOCK_BA); | 47 | set_sta_flags(sta, WLAN_STA_BLOCK_BA); |
| 50 | ieee80211_sta_tear_down_BA_sessions(sta); | 48 | ieee80211_sta_tear_down_BA_sessions(sta); |
| 51 | } | 49 | } |
| 52 | } | ||
| 53 | 50 | ||
| 54 | rcu_read_unlock(); | ||
| 55 | |||
| 56 | /* remove STAs */ | ||
| 57 | mutex_lock(&local->sta_mtx); | ||
| 58 | list_for_each_entry(sta, &local->sta_list, list) { | ||
| 59 | if (sta->uploaded) { | 51 | if (sta->uploaded) { |
| 60 | sdata = sta->sdata; | 52 | sdata = sta->sdata; |
| 61 | if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) | 53 | if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) |
| @@ -72,6 +64,8 @@ int __ieee80211_suspend(struct ieee80211_hw *hw) | |||
| 72 | 64 | ||
| 73 | /* remove all interfaces */ | 65 | /* remove all interfaces */ |
| 74 | list_for_each_entry(sdata, &local->interfaces, list) { | 66 | list_for_each_entry(sdata, &local->interfaces, list) { |
| 67 | cancel_work_sync(&sdata->work); | ||
| 68 | |||
| 75 | switch(sdata->vif.type) { | 69 | switch(sdata->vif.type) { |
| 76 | case NL80211_IFTYPE_STATION: | 70 | case NL80211_IFTYPE_STATION: |
| 77 | ieee80211_sta_quiesce(sdata); | 71 | ieee80211_sta_quiesce(sdata); |
