1 --- a/drivers/net/wireless/ath/ath9k/xmit.c
2 +++ b/drivers/net/wireless/ath/ath9k/xmit.c
3 @@ -838,7 +838,7 @@ static void ath_tx_sched_aggr(struct ath
4 ath_tx_txqaddbuf(sc, txq, &bf_q);
5 TX_STAT_INC(txq->axq_qnum, a_aggr);
7 - } while (txq->axq_depth < ATH_AGGR_MIN_QDEPTH &&
8 + } while (txq->axq_ampdu_depth < ATH_AGGR_MIN_QDEPTH &&
9 status != ATH_AGGR_BAW_CLOSED);
12 @@ -999,6 +999,7 @@ struct ath_txq *ath_txq_setup(struct ath
13 INIT_LIST_HEAD(&txq->axq_acq);
14 spin_lock_init(&txq->axq_lock);
16 + txq->axq_ampdu_depth = 0;
17 txq->axq_tx_inprogress = false;
18 sc->tx.txqsetup |= 1<<qnum;
20 @@ -1068,6 +1069,12 @@ int ath_cabq_update(struct ath_softc *sc
24 +static bool bf_is_ampdu_not_probing(struct ath_buf *bf)
26 + struct ieee80211_tx_info *info = IEEE80211_SKB_CB(bf->bf_mpdu);
27 + return bf_isampdu(bf) && !(info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE);
31 * Drain a given TX queue (could be Beacon or Data)
33 @@ -1126,7 +1133,8 @@ void ath_draintxq(struct ath_softc *sc,
38 + if (bf_is_ampdu_not_probing(bf))
39 + txq->axq_ampdu_depth--;
40 spin_unlock_bh(&txq->axq_lock);
43 @@ -1316,6 +1324,8 @@ static void ath_tx_txqaddbuf(struct ath_
44 ath9k_hw_txstart(ah, txq->axq_qnum);
47 + if (bf_is_ampdu_not_probing(bf))
48 + txq->axq_ampdu_depth++;
51 static void ath_tx_send_ampdu(struct ath_softc *sc, struct ath_atx_tid *tid,
52 @@ -1336,7 +1346,7 @@ static void ath_tx_send_ampdu(struct ath
54 if (!list_empty(&tid->buf_q) || tid->paused ||
55 !BAW_WITHIN(tid->seq_start, tid->baw_size, fi->seqno) ||
56 - txctl->txq->axq_depth >= ATH_AGGR_MIN_QDEPTH) {
57 + txctl->txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH) {
59 * Add this frame to software queue for scheduling later
61 @@ -2040,6 +2050,9 @@ static void ath_tx_processq(struct ath_s
62 txq->axq_tx_inprogress = false;
64 list_del(&bf_held->list);
66 + if (bf_is_ampdu_not_probing(bf))
67 + txq->axq_ampdu_depth--;
68 spin_unlock_bh(&txq->axq_lock);
71 @@ -2168,6 +2181,8 @@ void ath_tx_edma_tasklet(struct ath_soft
72 INCR(txq->txq_tailidx, ATH_TXFIFO_DEPTH);
74 txq->axq_tx_inprogress = false;
75 + if (bf_is_ampdu_not_probing(bf))
76 + txq->axq_ampdu_depth--;
77 spin_unlock_bh(&txq->axq_lock);
79 txok = !(txs.ts_status & ATH9K_TXERR_MASK);
80 --- a/drivers/net/wireless/ath/ath9k/ath9k.h
81 +++ b/drivers/net/wireless/ath/ath9k/ath9k.h
82 @@ -187,6 +187,7 @@ struct ath_txq {
83 struct list_head axq_q;
86 + u32 axq_ampdu_depth;
88 bool axq_tx_inprogress;
89 struct list_head axq_acq;