aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-08-10 17:23:35 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-08-12 13:45:04 -0400
commit9af73cf7f356801e6e5837eb338d197de5c8f37c (patch)
tree1f77aeb3ed6ca2057c3444fb1d25c7e65752f7e7 /drivers/net/wireless/ath
parent9946ecfb510462e59afddb2a992da804d58b6bcd (diff)
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: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index e815e825e9cb..e1d1e903229b 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -551,7 +551,8 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
551 if (clear_filter) 551 if (clear_filter)
552 tid->ac->clear_ps_filter = true; 552 tid->ac->clear_ps_filter = true;
553 list_splice(&bf_pending, &tid->buf_q); 553 list_splice(&bf_pending, &tid->buf_q);
554 ath_tx_queue_tid(txq, tid); 554 if (!an->sleeping)
555 ath_tx_queue_tid(txq, tid);
555 spin_unlock_bh(&txq->axq_lock); 556 spin_unlock_bh(&txq->axq_lock);
556 } 557 }
557 558
@@ -1413,7 +1414,8 @@ static void ath_tx_send_ampdu(struct ath_softc *sc, struct ath_atx_tid *tid,
1413 */ 1414 */
1414 TX_STAT_INC(txctl->txq->axq_qnum, a_queued_sw); 1415 TX_STAT_INC(txctl->txq->axq_qnum, a_queued_sw);
1415 list_add_tail(&bf->list, &tid->buf_q); 1416 list_add_tail(&bf->list, &tid->buf_q);
1416 ath_tx_queue_tid(txctl->txq, tid); 1417 if (!txctl->an || !txctl->an->sleeping)
1418 ath_tx_queue_tid(txctl->txq, tid);
1417 return; 1419 return;
1418 } 1420 }
1419 1421