diff options
Diffstat (limited to 'net/mac80211/agg-tx.c')
-rw-r--r-- | net/mac80211/agg-tx.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c index 947aaaad35d2..9e5762ad307d 100644 --- a/net/mac80211/agg-tx.c +++ b/net/mac80211/agg-tx.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/ieee80211.h> | 16 | #include <linux/ieee80211.h> |
17 | #include <net/mac80211.h> | 17 | #include <net/mac80211.h> |
18 | #include "ieee80211_i.h" | 18 | #include "ieee80211_i.h" |
19 | #include "driver-ops.h" | ||
19 | #include "wme.h" | 20 | #include "wme.h" |
20 | 21 | ||
21 | /** | 22 | /** |
@@ -131,11 +132,14 @@ static int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, | |||
131 | 132 | ||
132 | state = &sta->ampdu_mlme.tid_state_tx[tid]; | 133 | state = &sta->ampdu_mlme.tid_state_tx[tid]; |
133 | 134 | ||
135 | if (*state == HT_AGG_STATE_OPERATIONAL) | ||
136 | sta->ampdu_mlme.addba_req_num[tid] = 0; | ||
137 | |||
134 | *state = HT_AGG_STATE_REQ_STOP_BA_MSK | | 138 | *state = HT_AGG_STATE_REQ_STOP_BA_MSK | |
135 | (initiator << HT_AGG_STATE_INITIATOR_SHIFT); | 139 | (initiator << HT_AGG_STATE_INITIATOR_SHIFT); |
136 | 140 | ||
137 | ret = local->ops->ampdu_action(&local->hw, IEEE80211_AMPDU_TX_STOP, | 141 | ret = drv_ampdu_action(local, IEEE80211_AMPDU_TX_STOP, |
138 | &sta->sta, tid, NULL); | 142 | &sta->sta, tid, NULL); |
139 | 143 | ||
140 | /* HW shall not deny going back to legacy */ | 144 | /* HW shall not deny going back to legacy */ |
141 | if (WARN_ON(ret)) { | 145 | if (WARN_ON(ret)) { |
@@ -306,8 +310,8 @@ int ieee80211_start_tx_ba_session(struct ieee80211_hw *hw, u8 *ra, u16 tid) | |||
306 | 310 | ||
307 | start_seq_num = sta->tid_seq[tid]; | 311 | start_seq_num = sta->tid_seq[tid]; |
308 | 312 | ||
309 | ret = local->ops->ampdu_action(hw, IEEE80211_AMPDU_TX_START, | 313 | ret = drv_ampdu_action(local, IEEE80211_AMPDU_TX_START, |
310 | &sta->sta, tid, &start_seq_num); | 314 | &sta->sta, tid, &start_seq_num); |
311 | 315 | ||
312 | if (ret) { | 316 | if (ret) { |
313 | #ifdef CONFIG_MAC80211_HT_DEBUG | 317 | #ifdef CONFIG_MAC80211_HT_DEBUG |
@@ -336,6 +340,7 @@ int ieee80211_start_tx_ba_session(struct ieee80211_hw *hw, u8 *ra, u16 tid) | |||
336 | sta->ampdu_mlme.tid_tx[tid]->dialog_token, | 340 | sta->ampdu_mlme.tid_tx[tid]->dialog_token, |
337 | sta->ampdu_mlme.tid_tx[tid]->ssn, | 341 | sta->ampdu_mlme.tid_tx[tid]->ssn, |
338 | 0x40, 5000); | 342 | 0x40, 5000); |
343 | sta->ampdu_mlme.addba_req_num[tid]++; | ||
339 | /* activate the timer for the recipient's addBA response */ | 344 | /* activate the timer for the recipient's addBA response */ |
340 | sta->ampdu_mlme.tid_tx[tid]->addba_resp_timer.expires = | 345 | sta->ampdu_mlme.tid_tx[tid]->addba_resp_timer.expires = |
341 | jiffies + ADDBA_RESP_INTERVAL; | 346 | jiffies + ADDBA_RESP_INTERVAL; |
@@ -418,8 +423,8 @@ static void ieee80211_agg_tx_operational(struct ieee80211_local *local, | |||
418 | ieee80211_agg_splice_finish(local, sta, tid); | 423 | ieee80211_agg_splice_finish(local, sta, tid); |
419 | spin_unlock(&local->ampdu_lock); | 424 | spin_unlock(&local->ampdu_lock); |
420 | 425 | ||
421 | local->ops->ampdu_action(&local->hw, IEEE80211_AMPDU_TX_OPERATIONAL, | 426 | drv_ampdu_action(local, IEEE80211_AMPDU_TX_OPERATIONAL, |
422 | &sta->sta, tid, NULL); | 427 | &sta->sta, tid, NULL); |
423 | } | 428 | } |
424 | 429 | ||
425 | void ieee80211_start_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u16 tid) | 430 | void ieee80211_start_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u16 tid) |
@@ -605,7 +610,6 @@ void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid) | |||
605 | 610 | ||
606 | *state = HT_AGG_STATE_IDLE; | 611 | *state = HT_AGG_STATE_IDLE; |
607 | /* from now on packets are no longer put onto sta->pending */ | 612 | /* from now on packets are no longer put onto sta->pending */ |
608 | sta->ampdu_mlme.addba_req_num[tid] = 0; | ||
609 | kfree(sta->ampdu_mlme.tid_tx[tid]); | 613 | kfree(sta->ampdu_mlme.tid_tx[tid]); |
610 | sta->ampdu_mlme.tid_tx[tid] = NULL; | 614 | sta->ampdu_mlme.tid_tx[tid] = NULL; |
611 | 615 | ||
@@ -688,7 +692,6 @@ void ieee80211_process_addba_resp(struct ieee80211_local *local, | |||
688 | 692 | ||
689 | sta->ampdu_mlme.addba_req_num[tid] = 0; | 693 | sta->ampdu_mlme.addba_req_num[tid] = 0; |
690 | } else { | 694 | } else { |
691 | sta->ampdu_mlme.addba_req_num[tid]++; | ||
692 | ___ieee80211_stop_tx_ba_session(sta, tid, WLAN_BACK_INITIATOR); | 695 | ___ieee80211_stop_tx_ba_session(sta, tid, WLAN_BACK_INITIATOR); |
693 | } | 696 | } |
694 | spin_unlock_bh(&sta->lock); | 697 | spin_unlock_bh(&sta->lock); |