/*
* Stops the txqs and moves data between XR and Normal queues.
* Also adjusts the rate info in the descriptors.
+ * XXX: Check for TXQ races
*/
static u_int8_t
ATH_TXQ_LOCK_IRQ(txq);
bf = STAILQ_FIRST(&txq->axq_q);
if (bf == NULL) {
- txq->axq_link = NULL;
ATH_TXQ_UNLOCK_IRQ_EARLY(txq);
goto bf_fail;
}
ATH_TXQ_REMOVE_HEAD(txq, bf_list);
+ if (txq->axq_depth <= 0)
+ txq->axq_link = NULL;
+
ATH_TXQ_UNLOCK_IRQ(txq);
cleanup_ath_buf(sc, bf, BUS_DMA_TODEVICE);
ATH_TXQ_LOCK_IRQ(txq);
bf = STAILQ_FIRST(&txq->axq_q);
if (bf == NULL) {
- txq->axq_link = NULL;
ATH_TXQ_UNLOCK_IRQ_EARLY(txq);
return;
}
ATH_TXQ_REMOVE_HEAD(txq, bf_list);
+ if (txq->axq_depth <= 0)
+ txq->axq_link = NULL;
+
ATH_TXQ_UNLOCK_IRQ(txq);
#ifdef AR_DEBUG
if (sc->sc_debug & ATH_DEBUG_RESET)