4 * Copyright 2003, Jouni Malinen <jkmaline@cc.hut.fi>
5 * Copyright 2002-2005, Instant802 Networks, Inc.
6 * Copyright 2005-2006, Devicescape Software, Inc.
7 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
8 * Copyright 2007, Michael Wu <flamingice@sourmilk.net>
9 * Copyright 2007-2009, Intel Corporation
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
16 #include <linux/ieee80211.h>
17 #include <net/mac80211.h>
18 #include "ieee80211_i.h"
24 * Aggregation on the TX side requires setting the hardware flag
25 * %IEEE80211_HW_AMPDU_AGGREGATION as well as, if present, the @ampdu_queues
26 * hardware parameter to the number of hardware AMPDU queues. If there are no
27 * hardware queues then the driver will (currently) have to do all frame
30 * When TX aggregation is started by some subsystem (usually the rate control
31 * algorithm would be appropriate) by calling the
32 * ieee80211_start_tx_ba_session() function, the driver will be notified via
33 * its @ampdu_action function, with the %IEEE80211_AMPDU_TX_START action.
35 * In response to that, the driver is later required to call the
36 * ieee80211_start_tx_ba_cb() (or ieee80211_start_tx_ba_cb_irqsafe())
37 * function, which will start the aggregation session.
39 * Similarly, when the aggregation session is stopped by
40 * ieee80211_stop_tx_ba_session(), the driver's @ampdu_action function will
41 * be called with the action %IEEE80211_AMPDU_TX_STOP. In this case, the
42 * call must not fail, and the driver must later call ieee80211_stop_tx_ba_cb()
43 * (or ieee80211_stop_tx_ba_cb_irqsafe()).
46 static void ieee80211_send_addba_request(struct ieee80211_sub_if_data *sdata,
47 const u8 *da, u16 tid,
48 u8 dialog_token, u16 start_seq_num,
49 u16 agg_size, u16 timeout)
51 struct ieee80211_local *local = sdata->local;
52 struct ieee80211_if_sta *ifsta = &sdata->u.sta;
54 struct ieee80211_mgmt *mgmt;
57 skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom);
60 printk(KERN_ERR "%s: failed to allocate buffer "
61 "for addba request frame\n", sdata->dev->name);
64 skb_reserve(skb, local->hw.extra_tx_headroom);
65 mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24);
67 memcpy(mgmt->da, da, ETH_ALEN);
68 memcpy(mgmt->sa, sdata->dev->dev_addr, ETH_ALEN);
69 if (sdata->vif.type == NL80211_IFTYPE_AP ||
70 sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
71 memcpy(mgmt->bssid, sdata->dev->dev_addr, ETH_ALEN);
73 memcpy(mgmt->bssid, ifsta->bssid, ETH_ALEN);
75 mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
76 IEEE80211_STYPE_ACTION);
78 skb_put(skb, 1 + sizeof(mgmt->u.action.u.addba_req));
80 mgmt->u.action.category = WLAN_CATEGORY_BACK;
81 mgmt->u.action.u.addba_req.action_code = WLAN_ACTION_ADDBA_REQ;
83 mgmt->u.action.u.addba_req.dialog_token = dialog_token;
84 capab = (u16)(1 << 1); /* bit 1 aggregation policy */
85 capab |= (u16)(tid << 2); /* bit 5:2 TID number */
86 capab |= (u16)(agg_size << 6); /* bit 15:6 max size of aggergation */
88 mgmt->u.action.u.addba_req.capab = cpu_to_le16(capab);
90 mgmt->u.action.u.addba_req.timeout = cpu_to_le16(timeout);
91 mgmt->u.action.u.addba_req.start_seq_num =
92 cpu_to_le16(start_seq_num << 4);
94 ieee80211_tx_skb(sdata, skb, 1);
97 void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u16 ssn)
99 struct ieee80211_local *local = sdata->local;
101 struct ieee80211_bar *bar;
104 skb = dev_alloc_skb(sizeof(*bar) + local->hw.extra_tx_headroom);
106 printk(KERN_ERR "%s: failed to allocate buffer for "
107 "bar frame\n", sdata->dev->name);
110 skb_reserve(skb, local->hw.extra_tx_headroom);
111 bar = (struct ieee80211_bar *)skb_put(skb, sizeof(*bar));
112 memset(bar, 0, sizeof(*bar));
113 bar->frame_control = cpu_to_le16(IEEE80211_FTYPE_CTL |
114 IEEE80211_STYPE_BACK_REQ);
115 memcpy(bar->ra, ra, ETH_ALEN);
116 memcpy(bar->ta, sdata->dev->dev_addr, ETH_ALEN);
117 bar_control |= (u16)IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL;
118 bar_control |= (u16)IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA;
119 bar_control |= (u16)(tid << 12);
120 bar->control = cpu_to_le16(bar_control);
121 bar->start_seq_num = cpu_to_le16(ssn);
123 ieee80211_tx_skb(sdata, skb, 0);
126 static int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
127 enum ieee80211_back_parties initiator)
129 struct ieee80211_local *local = sta->local;
133 state = &sta->ampdu_mlme.tid_state_tx[tid];
135 if (local->hw.ampdu_queues) {
138 * Stop the AC queue to avoid issues where we send
139 * unaggregated frames already before the delba.
141 ieee80211_stop_queue_by_reason(&local->hw,
142 local->hw.queues + sta->tid_to_tx_q[tid],
143 IEEE80211_QUEUE_STOP_REASON_AGGREGATION);
147 * Pretend the driver woke the queue, just in case
148 * it disabled it before the session was stopped.
150 ieee80211_wake_queue(
151 &local->hw, local->hw.queues + sta->tid_to_tx_q[tid]);
153 *state = HT_AGG_STATE_REQ_STOP_BA_MSK |
154 (initiator << HT_AGG_STATE_INITIATOR_SHIFT);
156 ret = local->ops->ampdu_action(&local->hw, IEEE80211_AMPDU_TX_STOP,
157 &sta->sta, tid, NULL);
159 /* HW shall not deny going back to legacy */
161 *state = HT_AGG_STATE_OPERATIONAL;
168 * After sending add Block Ack request we activated a timer until
169 * add Block Ack response will arrive from the recipient.
170 * If this timer expires sta_addba_resp_timer_expired will be executed.
172 static void sta_addba_resp_timer_expired(unsigned long data)
174 /* not an elegant detour, but there is no choice as the timer passes
175 * only one argument, and both sta_info and TID are needed, so init
176 * flow in sta_info_create gives the TID as data, while the timer_to_id
177 * array gives the sta through container_of */
178 u16 tid = *(u8 *)data;
179 struct sta_info *sta = container_of((void *)data,
180 struct sta_info, timer_to_tid[tid]);
183 state = &sta->ampdu_mlme.tid_state_tx[tid];
185 /* check if the TID waits for addBA response */
186 spin_lock_bh(&sta->lock);
187 if (!(*state & HT_ADDBA_REQUESTED_MSK)) {
188 spin_unlock_bh(&sta->lock);
189 *state = HT_AGG_STATE_IDLE;
190 #ifdef CONFIG_MAC80211_HT_DEBUG
191 printk(KERN_DEBUG "timer expired on tid %d but we are not "
192 "expecting addBA response there", tid);
197 #ifdef CONFIG_MAC80211_HT_DEBUG
198 printk(KERN_DEBUG "addBA response timer expired on tid %d\n", tid);
201 ___ieee80211_stop_tx_ba_session(sta, tid, WLAN_BACK_INITIATOR);
202 spin_unlock_bh(&sta->lock);
205 static inline int ieee80211_ac_from_tid(int tid)
207 return ieee802_1d_to_ac[tid & 7];
210 int ieee80211_start_tx_ba_session(struct ieee80211_hw *hw, u8 *ra, u16 tid)
212 struct ieee80211_local *local = hw_to_local(hw);
213 struct sta_info *sta;
214 struct ieee80211_sub_if_data *sdata;
216 int i, qn = -1, ret = 0;
219 if (WARN_ON(!local->ops->ampdu_action))
222 if ((tid >= STA_TID_NUM) || !(hw->flags & IEEE80211_HW_AMPDU_AGGREGATION))
225 #ifdef CONFIG_MAC80211_HT_DEBUG
226 printk(KERN_DEBUG "Open BA session requested for %pM tid %u\n",
228 #endif /* CONFIG_MAC80211_HT_DEBUG */
230 if (hw->ampdu_queues && ieee80211_ac_from_tid(tid) == 0) {
231 #ifdef CONFIG_MAC80211_HT_DEBUG
232 printk(KERN_DEBUG "rejecting on voice AC\n");
239 sta = sta_info_get(local, ra);
241 #ifdef CONFIG_MAC80211_HT_DEBUG
242 printk(KERN_DEBUG "Could not find the station\n");
249 * The aggregation code is not prepared to handle
250 * anything but STA/AP due to the BSSID handling.
251 * IBSS could work in the code but isn't supported
252 * by drivers or the standard.
254 if (sta->sdata->vif.type != NL80211_IFTYPE_STATION &&
255 sta->sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
256 sta->sdata->vif.type != NL80211_IFTYPE_AP) {
261 spin_lock_bh(&sta->lock);
265 /* we have tried too many times, receiver does not want A-MPDU */
266 if (sta->ampdu_mlme.addba_req_num[tid] > HT_AGG_MAX_RETRIES) {
271 state = &sta->ampdu_mlme.tid_state_tx[tid];
272 /* check if the TID is not in aggregation flow already */
273 if (*state != HT_AGG_STATE_IDLE) {
274 #ifdef CONFIG_MAC80211_HT_DEBUG
275 printk(KERN_DEBUG "BA request denied - session is not "
276 "idle on tid %u\n", tid);
277 #endif /* CONFIG_MAC80211_HT_DEBUG */
282 if (hw->ampdu_queues) {
283 spin_lock(&local->queue_stop_reason_lock);
284 /* reserve a new queue for this session */
285 for (i = 0; i < local->hw.ampdu_queues; i++) {
286 if (local->ampdu_ac_queue[i] < 0) {
288 local->ampdu_ac_queue[qn] =
289 ieee80211_ac_from_tid(tid);
293 spin_unlock(&local->queue_stop_reason_lock);
296 #ifdef CONFIG_MAC80211_HT_DEBUG
297 printk(KERN_DEBUG "BA request denied - "
298 "queue unavailable for tid %d\n", tid);
299 #endif /* CONFIG_MAC80211_HT_DEBUG */
305 * If we successfully allocate the session, we can't have
306 * anything going on on the queue this TID maps into, so
307 * stop it for now. This is a "virtual" stop using the same
308 * mechanism that drivers will use.
310 * XXX: queue up frames for this session in the sta_info
311 * struct instead to avoid hitting all other STAs.
313 ieee80211_stop_queue_by_reason(
314 &local->hw, hw->queues + qn,
315 IEEE80211_QUEUE_STOP_REASON_AGGREGATION);
318 /* prepare A-MPDU MLME for Tx aggregation */
319 sta->ampdu_mlme.tid_tx[tid] =
320 kmalloc(sizeof(struct tid_ampdu_tx), GFP_ATOMIC);
321 if (!sta->ampdu_mlme.tid_tx[tid]) {
322 #ifdef CONFIG_MAC80211_HT_DEBUG
324 printk(KERN_ERR "allocate tx mlme to tid %d failed\n",
328 goto err_return_queue;
332 sta->ampdu_mlme.tid_tx[tid]->addba_resp_timer.function =
333 sta_addba_resp_timer_expired;
334 sta->ampdu_mlme.tid_tx[tid]->addba_resp_timer.data =
335 (unsigned long)&sta->timer_to_tid[tid];
336 init_timer(&sta->ampdu_mlme.tid_tx[tid]->addba_resp_timer);
338 /* Ok, the Addba frame hasn't been sent yet, but if the driver calls the
339 * call back right away, it must see that the flow has begun */
340 *state |= HT_ADDBA_REQUESTED_MSK;
342 start_seq_num = sta->tid_seq[tid];
344 ret = local->ops->ampdu_action(hw, IEEE80211_AMPDU_TX_START,
345 &sta->sta, tid, &start_seq_num);
348 #ifdef CONFIG_MAC80211_HT_DEBUG
349 printk(KERN_DEBUG "BA request denied - HW unavailable for"
351 #endif /* CONFIG_MAC80211_HT_DEBUG */
352 *state = HT_AGG_STATE_IDLE;
355 sta->tid_to_tx_q[tid] = qn;
357 spin_unlock_bh(&sta->lock);
359 /* send an addBA request */
360 sta->ampdu_mlme.dialog_token_allocator++;
361 sta->ampdu_mlme.tid_tx[tid]->dialog_token =
362 sta->ampdu_mlme.dialog_token_allocator;
363 sta->ampdu_mlme.tid_tx[tid]->ssn = start_seq_num;
365 ieee80211_send_addba_request(sta->sdata, ra, tid,
366 sta->ampdu_mlme.tid_tx[tid]->dialog_token,
367 sta->ampdu_mlme.tid_tx[tid]->ssn,
369 /* activate the timer for the recipient's addBA response */
370 sta->ampdu_mlme.tid_tx[tid]->addba_resp_timer.expires =
371 jiffies + ADDBA_RESP_INTERVAL;
372 add_timer(&sta->ampdu_mlme.tid_tx[tid]->addba_resp_timer);
373 #ifdef CONFIG_MAC80211_HT_DEBUG
374 printk(KERN_DEBUG "activated addBA response timer on tid %d\n", tid);
379 kfree(sta->ampdu_mlme.tid_tx[tid]);
380 sta->ampdu_mlme.tid_tx[tid] = NULL;
383 /* We failed, so start queue again right away. */
384 ieee80211_wake_queue_by_reason(hw, hw->queues + qn,
385 IEEE80211_QUEUE_STOP_REASON_AGGREGATION);
386 /* give queue back to pool */
387 spin_lock(&local->queue_stop_reason_lock);
388 local->ampdu_ac_queue[qn] = -1;
389 spin_unlock(&local->queue_stop_reason_lock);
392 spin_unlock_bh(&sta->lock);
397 EXPORT_SYMBOL(ieee80211_start_tx_ba_session);
399 void ieee80211_start_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u16 tid)
401 struct ieee80211_local *local = hw_to_local(hw);
402 struct sta_info *sta;
405 if (tid >= STA_TID_NUM) {
406 #ifdef CONFIG_MAC80211_HT_DEBUG
407 printk(KERN_DEBUG "Bad TID value: tid = %d (>= %d)\n",
414 sta = sta_info_get(local, ra);
417 #ifdef CONFIG_MAC80211_HT_DEBUG
418 printk(KERN_DEBUG "Could not find station: %pM\n", ra);
423 state = &sta->ampdu_mlme.tid_state_tx[tid];
424 spin_lock_bh(&sta->lock);
426 if (WARN_ON(!(*state & HT_ADDBA_REQUESTED_MSK))) {
427 #ifdef CONFIG_MAC80211_HT_DEBUG
428 printk(KERN_DEBUG "addBA was not requested yet, state is %d\n",
431 spin_unlock_bh(&sta->lock);
436 if (WARN_ON(*state & HT_ADDBA_DRV_READY_MSK))
439 *state |= HT_ADDBA_DRV_READY_MSK;
441 if (*state == HT_AGG_STATE_OPERATIONAL) {
442 #ifdef CONFIG_MAC80211_HT_DEBUG
443 printk(KERN_DEBUG "Aggregation is on for tid %d \n", tid);
445 if (hw->ampdu_queues) {
447 * Wake up this queue, we stopped it earlier,
448 * this will in turn wake the entire AC.
450 ieee80211_wake_queue_by_reason(hw,
451 hw->queues + sta->tid_to_tx_q[tid],
452 IEEE80211_QUEUE_STOP_REASON_AGGREGATION);
457 spin_unlock_bh(&sta->lock);
460 EXPORT_SYMBOL(ieee80211_start_tx_ba_cb);
462 void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_hw *hw,
463 const u8 *ra, u16 tid)
465 struct ieee80211_local *local = hw_to_local(hw);
466 struct ieee80211_ra_tid *ra_tid;
467 struct sk_buff *skb = dev_alloc_skb(0);
469 if (unlikely(!skb)) {
470 #ifdef CONFIG_MAC80211_HT_DEBUG
472 printk(KERN_WARNING "%s: Not enough memory, "
473 "dropping start BA session", skb->dev->name);
477 ra_tid = (struct ieee80211_ra_tid *) &skb->cb;
478 memcpy(&ra_tid->ra, ra, ETH_ALEN);
481 skb->pkt_type = IEEE80211_ADDBA_MSG;
482 skb_queue_tail(&local->skb_queue, skb);
483 tasklet_schedule(&local->tasklet);
485 EXPORT_SYMBOL(ieee80211_start_tx_ba_cb_irqsafe);
487 int __ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
488 enum ieee80211_back_parties initiator)
493 /* check if the TID is in aggregation */
494 state = &sta->ampdu_mlme.tid_state_tx[tid];
495 spin_lock_bh(&sta->lock);
497 if (*state != HT_AGG_STATE_OPERATIONAL) {
502 #ifdef CONFIG_MAC80211_HT_DEBUG
503 printk(KERN_DEBUG "Tx BA session stop requested for %pM tid %u\n",
505 #endif /* CONFIG_MAC80211_HT_DEBUG */
507 ret = ___ieee80211_stop_tx_ba_session(sta, tid, initiator);
510 spin_unlock_bh(&sta->lock);
514 int ieee80211_stop_tx_ba_session(struct ieee80211_hw *hw,
516 enum ieee80211_back_parties initiator)
518 struct ieee80211_local *local = hw_to_local(hw);
519 struct sta_info *sta;
522 if (WARN_ON(!local->ops->ampdu_action))
525 if (tid >= STA_TID_NUM)
529 sta = sta_info_get(local, ra);
535 ret = __ieee80211_stop_tx_ba_session(sta, tid, initiator);
539 EXPORT_SYMBOL(ieee80211_stop_tx_ba_session);
541 void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid)
543 struct ieee80211_local *local = hw_to_local(hw);
544 struct sta_info *sta;
547 if (tid >= STA_TID_NUM) {
548 #ifdef CONFIG_MAC80211_HT_DEBUG
549 printk(KERN_DEBUG "Bad TID value: tid = %d (>= %d)\n",
555 #ifdef CONFIG_MAC80211_HT_DEBUG
556 printk(KERN_DEBUG "Stopping Tx BA session for %pM tid %d\n",
558 #endif /* CONFIG_MAC80211_HT_DEBUG */
561 sta = sta_info_get(local, ra);
563 #ifdef CONFIG_MAC80211_HT_DEBUG
564 printk(KERN_DEBUG "Could not find station: %pM\n", ra);
569 state = &sta->ampdu_mlme.tid_state_tx[tid];
571 /* NOTE: no need to use sta->lock in this state check, as
572 * ieee80211_stop_tx_ba_session will let only one stop call to
573 * pass through per sta/tid
575 if ((*state & HT_AGG_STATE_REQ_STOP_BA_MSK) == 0) {
576 #ifdef CONFIG_MAC80211_HT_DEBUG
577 printk(KERN_DEBUG "unexpected callback to A-MPDU stop\n");
583 if (*state & HT_AGG_STATE_INITIATOR_MSK)
584 ieee80211_send_delba(sta->sdata, ra, tid,
585 WLAN_BACK_INITIATOR, WLAN_REASON_QSTA_NOT_USE);
587 spin_lock_bh(&sta->lock);
589 if (*state & HT_AGG_STATE_INITIATOR_MSK &&
592 * Wake up this queue, we stopped it earlier,
593 * this will in turn wake the entire AC.
595 ieee80211_wake_queue_by_reason(hw,
596 hw->queues + sta->tid_to_tx_q[tid],
597 IEEE80211_QUEUE_STOP_REASON_AGGREGATION);
600 *state = HT_AGG_STATE_IDLE;
601 sta->ampdu_mlme.addba_req_num[tid] = 0;
602 kfree(sta->ampdu_mlme.tid_tx[tid]);
603 sta->ampdu_mlme.tid_tx[tid] = NULL;
604 spin_unlock_bh(&sta->lock);
608 EXPORT_SYMBOL(ieee80211_stop_tx_ba_cb);
610 void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_hw *hw,
611 const u8 *ra, u16 tid)
613 struct ieee80211_local *local = hw_to_local(hw);
614 struct ieee80211_ra_tid *ra_tid;
615 struct sk_buff *skb = dev_alloc_skb(0);
617 if (unlikely(!skb)) {
618 #ifdef CONFIG_MAC80211_HT_DEBUG
620 printk(KERN_WARNING "%s: Not enough memory, "
621 "dropping stop BA session", skb->dev->name);
625 ra_tid = (struct ieee80211_ra_tid *) &skb->cb;
626 memcpy(&ra_tid->ra, ra, ETH_ALEN);
629 skb->pkt_type = IEEE80211_DELBA_MSG;
630 skb_queue_tail(&local->skb_queue, skb);
631 tasklet_schedule(&local->tasklet);
633 EXPORT_SYMBOL(ieee80211_stop_tx_ba_cb_irqsafe);
636 void ieee80211_process_addba_resp(struct ieee80211_local *local,
637 struct sta_info *sta,
638 struct ieee80211_mgmt *mgmt,
641 struct ieee80211_hw *hw = &local->hw;
643 u16 tid, start_seq_num;
646 capab = le16_to_cpu(mgmt->u.action.u.addba_resp.capab);
647 tid = (capab & IEEE80211_ADDBA_PARAM_TID_MASK) >> 2;
649 state = &sta->ampdu_mlme.tid_state_tx[tid];
651 spin_lock_bh(&sta->lock);
653 if (!(*state & HT_ADDBA_REQUESTED_MSK)) {
654 spin_unlock_bh(&sta->lock);
658 if (mgmt->u.action.u.addba_resp.dialog_token !=
659 sta->ampdu_mlme.tid_tx[tid]->dialog_token) {
660 spin_unlock_bh(&sta->lock);
661 #ifdef CONFIG_MAC80211_HT_DEBUG
662 printk(KERN_DEBUG "wrong addBA response token, tid %d\n", tid);
663 #endif /* CONFIG_MAC80211_HT_DEBUG */
667 del_timer_sync(&sta->ampdu_mlme.tid_tx[tid]->addba_resp_timer);
668 #ifdef CONFIG_MAC80211_HT_DEBUG
669 printk(KERN_DEBUG "switched off addBA timer for tid %d \n", tid);
670 #endif /* CONFIG_MAC80211_HT_DEBUG */
671 if (le16_to_cpu(mgmt->u.action.u.addba_resp.status)
672 == WLAN_STATUS_SUCCESS) {
673 u8 curstate = *state;
675 *state |= HT_ADDBA_RECEIVED_MSK;
677 if (hw->ampdu_queues && *state != curstate &&
678 *state == HT_AGG_STATE_OPERATIONAL) {
680 * Wake up this queue, we stopped it earlier,
681 * this will in turn wake the entire AC.
683 ieee80211_wake_queue_by_reason(hw,
684 hw->queues + sta->tid_to_tx_q[tid],
685 IEEE80211_QUEUE_STOP_REASON_AGGREGATION);
687 sta->ampdu_mlme.addba_req_num[tid] = 0;
689 if (local->ops->ampdu_action) {
690 (void)local->ops->ampdu_action(hw,
691 IEEE80211_AMPDU_TX_RESUME,
692 &sta->sta, tid, &start_seq_num);
694 #ifdef CONFIG_MAC80211_HT_DEBUG
695 printk(KERN_DEBUG "Resuming TX aggregation for tid %d\n", tid);
696 #endif /* CONFIG_MAC80211_HT_DEBUG */
698 sta->ampdu_mlme.addba_req_num[tid]++;
699 ___ieee80211_stop_tx_ba_session(sta, tid, WLAN_BACK_INITIATOR);
701 spin_unlock_bh(&sta->lock);