Skip to content

Commit

Permalink
ath9k: improve ath_tx_aggr_stop to avoid TID stuck in cleanup state
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Nikolay Martynov authored and John W. Linville committed Nov 28, 2011
1 parent f724828 commit 4eb287a
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions drivers/net/wireless/ath/ath9k/xmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 4eb287a

Please sign in to comment.