|
@@ -750,15 +750,6 @@ int __must_check __sta_info_destroy(struct sta_info *sta)
|
|
|
|
|
|
sta->dead = true;
|
|
sta->dead = true;
|
|
|
|
|
|
- if (test_sta_flag(sta, WLAN_STA_PS_STA)) {
|
|
|
|
- BUG_ON(!sdata->bss);
|
|
|
|
-
|
|
|
|
- clear_sta_flag(sta, WLAN_STA_PS_STA);
|
|
|
|
-
|
|
|
|
- atomic_dec(&sdata->bss->num_sta_ps);
|
|
|
|
- sta_info_recalc_tim(sta);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
local->num_sta--;
|
|
local->num_sta--;
|
|
local->sta_generation++;
|
|
local->sta_generation++;
|
|
|
|
|
|
@@ -790,6 +781,15 @@ int __must_check __sta_info_destroy(struct sta_info *sta)
|
|
*/
|
|
*/
|
|
synchronize_rcu();
|
|
synchronize_rcu();
|
|
|
|
|
|
|
|
+ if (test_sta_flag(sta, WLAN_STA_PS_STA)) {
|
|
|
|
+ BUG_ON(!sdata->bss);
|
|
|
|
+
|
|
|
|
+ clear_sta_flag(sta, WLAN_STA_PS_STA);
|
|
|
|
+
|
|
|
|
+ atomic_dec(&sdata->bss->num_sta_ps);
|
|
|
|
+ sta_info_recalc_tim(sta);
|
|
|
|
+ }
|
|
|
|
+
|
|
for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
|
|
for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
|
|
local->total_ps_buffered -= skb_queue_len(&sta->ps_tx_buf[ac]);
|
|
local->total_ps_buffered -= skb_queue_len(&sta->ps_tx_buf[ac]);
|
|
__skb_queue_purge(&sta->ps_tx_buf[ac]);
|
|
__skb_queue_purge(&sta->ps_tx_buf[ac]);
|