Commit 9af73cf7 authored by Felix Fietkau's avatar Felix Fietkau Committed by John W. Linville

ath9k: avoid sending a-mpdu packets to sleeping stations

If the driver gets a tx status report for an A-MPDU sent to a station that
just went to sleep, that leaves a race condition where this tx status can
trigger another A-MPDU transmission.
To fix this, check if the station is sleeping before queueing the tid.
Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 9946ecfb
...@@ -551,6 +551,7 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq, ...@@ -551,6 +551,7 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
if (clear_filter) if (clear_filter)
tid->ac->clear_ps_filter = true; tid->ac->clear_ps_filter = true;
list_splice(&bf_pending, &tid->buf_q); list_splice(&bf_pending, &tid->buf_q);
if (!an->sleeping)
ath_tx_queue_tid(txq, tid); ath_tx_queue_tid(txq, tid);
spin_unlock_bh(&txq->axq_lock); spin_unlock_bh(&txq->axq_lock);
} }
...@@ -1413,6 +1414,7 @@ static void ath_tx_send_ampdu(struct ath_softc *sc, struct ath_atx_tid *tid, ...@@ -1413,6 +1414,7 @@ static void ath_tx_send_ampdu(struct ath_softc *sc, struct ath_atx_tid *tid,
*/ */
TX_STAT_INC(txctl->txq->axq_qnum, a_queued_sw); TX_STAT_INC(txctl->txq->axq_qnum, a_queued_sw);
list_add_tail(&bf->list, &tid->buf_q); list_add_tail(&bf->list, &tid->buf_q);
if (!txctl->an || !txctl->an->sleeping)
ath_tx_queue_tid(txctl->txq, tid); ath_tx_queue_tid(txctl->txq, tid);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment