From 1539af1ef5b902e8c105c6ed08a3b3c39258ede8 Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Wed, 15 Feb 2006 18:12:24 +0000 Subject: [PATCH] close race between ath_tx_start and ath_tx_processq Reviewed by: apatti MFC after: 1 week --- sys/dev/ath/if_ath.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index f0704279d8ef..c0cb1500b606 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -3766,7 +3766,6 @@ ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq) txq->axq_intrcnt = 0; /* reset periodic desc intr count */ bf = STAILQ_FIRST(&txq->axq_q); if (bf == NULL) { - txq->axq_link = NULL; ATH_TXQ_UNLOCK(txq); break; } @@ -3782,6 +3781,8 @@ ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq) break; } ATH_TXQ_REMOVE_HEAD(txq, bf_list); + if (txq->axq_depth == 0) + txq->axq_link = NULL; ATH_TXQ_UNLOCK(txq); ni = bf->bf_node;