svn commit: r222985 - user/adrian/if_ath_tx/sys/dev/ath
Adrian Chadd
adrian at FreeBSD.org
Sat Jun 11 12:47:05 UTC 2011
Author: adrian
Date: Sat Jun 11 12:47:04 2011
New Revision: 222985
URL: http://svn.freebsd.org/changeset/base/222985
Log:
Make the qdepth add/sub atomic, but the qdepth check isn't yet atomic.
I'll leave it like that for now until I better understand what, if any,
locking is done with ath_node / ieee80211_node.
Flip on the software TX queue dispatch.
Modified:
user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c
Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Sat Jun 11 12:41:03 2011 (r222984)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Sat Jun 11 12:47:04 2011 (r222985)
@@ -937,7 +937,7 @@ ath_tx_start(struct ath_softc *sc, struc
/* Fill in the details in the descriptor list */
ath_tx_chaindesclist(sc, txq, bf);
-#if 0
+#if 1
/* add to software queue */
ath_tx_swq(sc, ni, bf, m0);
#else
@@ -1294,8 +1294,7 @@ ath_tx_swq(struct ath_softc *sc, struct
ATH_TXQ_UNLOCK(atid);
/* Bump queued packet counter */
- /* XXX does this have to be atomic? */
- an->an_qdepth++;
+ atomic_add_int(&an->an_qdepth, 1);
/* Mark the given node/tid as having packets to dequeue */
ATH_LOCK(sc);
@@ -1434,8 +1433,8 @@ ath_tx_tid_hw_queue(struct ath_softc *sc
ATH_TXQ_REMOVE_HEAD(atid, bf_list);
ATH_TXQ_UNLOCK(atid);
- /* XXX does this have to be atomic? */
- an->an_qdepth--;
+ /* Remove from queue */
+ atomic_subtract_int(&an->an_qdepth, 1);
txq = bf->bf_state.bfs_txq;
/* Sanity check! */
@@ -1470,6 +1469,9 @@ ath_tx_hw_queue(struct ath_softc *sc, st
}
}
+/*
+ * XXX this needs to be atomic or ath_node locked
+ */
static int
ath_txq_node_qlen(struct ath_softc *sc, struct ath_node *an)
{
More information about the svn-src-user
mailing list