* [PATCH v2] ath9k: Improve ath_tx_aggr_stop to avoid TID stuck in cleanup state.
@ 2011-11-20 5:30 Nikolay Martynov
2011-11-21 19:34 ` John W. Linville
0 siblings, 1 reply; 2+ messages in thread
From: Nikolay Martynov @ 2011-11-20 5:30 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, ath9k-devel, rodrigue, kolya
From: kolya <mar.kolya@gmail.com>
When tx agg is being stopped TID is flushed using ath_tx_flush_tid. It is possible that ath_tx_flush_tid completelly flushes TID (if all packets in this TID have already been retried). If this happened ath_tx_aggr_stop would leave TID in cleanup state permanently. Fix this by making ath_tx_flush_tid remove AGGR_ADDBA_COMPLETE and AGGR_CLEANUP flags from TID status if TID is empty.
---
drivers/net/wireless/ath/ath9k/xmit.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 55d077e..80639e3 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -179,6 +179,11 @@ static void ath_tx_flush_tid(struct ath_softc *sc, struct ath_atx_tid *tid)
spin_lock_bh(&txq->axq_lock);
}
+ if (tid->baw_head == tid->baw_tail) {
+ tid->state &= ~AGGR_ADDBA_COMPLETE;
+ tid->state &= ~AGGR_CLEANUP;
+ }
+
spin_unlock_bh(&txq->axq_lock);
}
@@ -556,15 +561,9 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
spin_unlock_bh(&txq->axq_lock);
}
- if (tid->state & AGGR_CLEANUP) {
+ if (tid->state & AGGR_CLEANUP)
ath_tx_flush_tid(sc, tid);
- if (tid->baw_head == tid->baw_tail) {
- tid->state &= ~AGGR_ADDBA_COMPLETE;
- tid->state &= ~AGGR_CLEANUP;
- }
- }
-
rcu_read_unlock();
if (needreset) {
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] ath9k: Improve ath_tx_aggr_stop to avoid TID stuck in cleanup state.
2011-11-20 5:30 [PATCH v2] ath9k: Improve ath_tx_aggr_stop to avoid TID stuck in cleanup state Nikolay Martynov
@ 2011-11-21 19:34 ` John W. Linville
0 siblings, 0 replies; 2+ messages in thread
From: John W. Linville @ 2011-11-21 19:34 UTC (permalink / raw)
To: Nikolay Martynov; +Cc: linux-wireless, ath9k-devel, rodrigue
On Sun, Nov 20, 2011 at 12:30:35AM -0500, Nikolay Martynov wrote:
> From: kolya <mar.kolya@gmail.com>
>
> When tx agg is being stopped TID is flushed using ath_tx_flush_tid. It is possible that ath_tx_flush_tid completelly flushes TID (if all packets in this TID have already been retried). If this happened ath_tx_aggr_stop would leave TID in cleanup state permanently. Fix this by making ath_tx_flush_tid remove AGGR_ADDBA_COMPLETE and AGGR_CLEANUP flags from TID status if TID is empty.
Please follow the suggestions Kalle made about your patch. Please also
include a Signed-off-by line.
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-21 19:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-20 5:30 [PATCH v2] ath9k: Improve ath_tx_aggr_stop to avoid TID stuck in cleanup state Nikolay Martynov
2011-11-21 19:34 ` John W. Linville
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).