aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/agg-tx.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/agg-tx.c')
-rw-r--r--net/mac80211/agg-tx.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index b50b2bc3b8c5..adf01fcd462e 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -175,12 +175,14 @@ static void sta_addba_resp_timer_expired(unsigned long data)
175 175
176 /* check if the TID waits for addBA response */ 176 /* check if the TID waits for addBA response */
177 spin_lock_bh(&sta->lock); 177 spin_lock_bh(&sta->lock);
178 if (!(*state & HT_ADDBA_REQUESTED_MSK)) { 178 if ((*state & (HT_ADDBA_REQUESTED_MSK | HT_ADDBA_RECEIVED_MSK)) !=
179 HT_ADDBA_REQUESTED_MSK) {
179 spin_unlock_bh(&sta->lock); 180 spin_unlock_bh(&sta->lock);
180 *state = HT_AGG_STATE_IDLE; 181 *state = HT_AGG_STATE_IDLE;
181#ifdef CONFIG_MAC80211_HT_DEBUG 182#ifdef CONFIG_MAC80211_HT_DEBUG
182 printk(KERN_DEBUG "timer expired on tid %d but we are not " 183 printk(KERN_DEBUG "timer expired on tid %d but we are not "
183 "expecting addBA response there", tid); 184 "(or no longer) expecting addBA response there",
185 tid);
184#endif 186#endif
185 return; 187 return;
186 } 188 }
@@ -649,21 +651,21 @@ void ieee80211_process_addba_resp(struct ieee80211_local *local,
649 651
650 state = &sta->ampdu_mlme.tid_state_tx[tid]; 652 state = &sta->ampdu_mlme.tid_state_tx[tid];
651 653
652 del_timer_sync(&sta->ampdu_mlme.tid_tx[tid]->addba_resp_timer);
653
654 spin_lock_bh(&sta->lock); 654 spin_lock_bh(&sta->lock);
655 655
656 if (!(*state & HT_ADDBA_REQUESTED_MSK)) 656 if (!(*state & HT_ADDBA_REQUESTED_MSK))
657 goto timer_still_needed; 657 goto out;
658 658
659 if (mgmt->u.action.u.addba_resp.dialog_token != 659 if (mgmt->u.action.u.addba_resp.dialog_token !=
660 sta->ampdu_mlme.tid_tx[tid]->dialog_token) { 660 sta->ampdu_mlme.tid_tx[tid]->dialog_token) {
661#ifdef CONFIG_MAC80211_HT_DEBUG 661#ifdef CONFIG_MAC80211_HT_DEBUG
662 printk(KERN_DEBUG "wrong addBA response token, tid %d\n", tid); 662 printk(KERN_DEBUG "wrong addBA response token, tid %d\n", tid);
663#endif /* CONFIG_MAC80211_HT_DEBUG */ 663#endif /* CONFIG_MAC80211_HT_DEBUG */
664 goto timer_still_needed; 664 goto out;
665 } 665 }
666 666
667 del_timer(&sta->ampdu_mlme.tid_tx[tid]->addba_resp_timer);
668
667#ifdef CONFIG_MAC80211_HT_DEBUG 669#ifdef CONFIG_MAC80211_HT_DEBUG
668 printk(KERN_DEBUG "switched off addBA timer for tid %d \n", tid); 670 printk(KERN_DEBUG "switched off addBA timer for tid %d \n", tid);
669#endif /* CONFIG_MAC80211_HT_DEBUG */ 671#endif /* CONFIG_MAC80211_HT_DEBUG */
@@ -682,10 +684,6 @@ void ieee80211_process_addba_resp(struct ieee80211_local *local,
682 ___ieee80211_stop_tx_ba_session(sta, tid, WLAN_BACK_INITIATOR); 684 ___ieee80211_stop_tx_ba_session(sta, tid, WLAN_BACK_INITIATOR);
683 } 685 }
684 686
685 goto out;
686
687 timer_still_needed:
688 add_timer(&sta->ampdu_mlme.tid_tx[tid]->addba_resp_timer);
689 out: 687 out:
690 spin_unlock_bh(&sta->lock); 688 spin_unlock_bh(&sta->lock);
691} 689}