svn commit: r226492 - user/adrian/if_ath_tx/sys/dev/ath

Adrian Chadd adrian at FreeBSD.org
Tue Oct 18 03:57:44 UTC 2011


Author: adrian
Date: Tue Oct 18 03:57:44 2011
New Revision: 226492
URL: http://svn.freebsd.org/changeset/base/226492

Log:
  Teach ath_tx_processq() to not reschedule more frames.
  
  This isn't used just yet - but when TX is being non-delete flushed
  (ie, when packets are completed but in-progress frames are not deleted),
  sched should not occur.

Modified:
  user/adrian/if_ath_tx/sys/dev/ath/if_ath.c

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath.c	Tue Oct 18 03:32:18 2011	(r226491)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath.c	Tue Oct 18 03:57:44 2011	(r226492)
@@ -4505,7 +4505,7 @@ ath_tx_update_ratectrl(struct ath_softc 
  * particular task.
  */
 static int
-ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq)
+ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq, int dosched)
 {
 	struct ath_hal *ah = sc->sc_ah;
 	struct ath_buf *bf, *last;
@@ -4632,9 +4632,11 @@ ath_tx_processq(struct ath_softc *sc, st
 #endif
 
 	/* Kick the TXQ scheduler */
-	ATH_TXQ_LOCK(txq);
-	ath_txq_sched(sc, txq);
-	ATH_TXQ_UNLOCK(txq);
+	if (dosched) {
+		ATH_TXQ_LOCK(txq);
+		ath_txq_sched(sc, txq);
+		ATH_TXQ_UNLOCK(txq);
+	}
 
 	return nacked;
 }
@@ -4657,11 +4659,11 @@ ath_tx_proc_q0(void *arg, int npending)
 	sc->sc_txq_active &= ~txqs;
 	ATH_UNLOCK(sc);
 
-	if (TXQACTIVE(txqs, 0) && ath_tx_processq(sc, &sc->sc_txq[0]))
+	if (TXQACTIVE(txqs, 0) && ath_tx_processq(sc, &sc->sc_txq[0], 1))
 		/* XXX why is lastrx updated in tx code? */
 		sc->sc_lastrx = ath_hal_gettsf64(sc->sc_ah);
 	if (TXQACTIVE(txqs, sc->sc_cabq->axq_qnum))
-		ath_tx_processq(sc, sc->sc_cabq);
+		ath_tx_processq(sc, sc->sc_cabq, 1);
 	ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
 	sc->sc_wd_timer = 0;
 
@@ -4693,15 +4695,15 @@ ath_tx_proc_q0123(void *arg, int npendin
 	 */
 	nacked = 0;
 	if (TXQACTIVE(txqs, 0))
-		nacked += ath_tx_processq(sc, &sc->sc_txq[0]);
+		nacked += ath_tx_processq(sc, &sc->sc_txq[0], 1);
 	if (TXQACTIVE(txqs, 1))
-		nacked += ath_tx_processq(sc, &sc->sc_txq[1]);
+		nacked += ath_tx_processq(sc, &sc->sc_txq[1], 1);
 	if (TXQACTIVE(txqs, 2))
-		nacked += ath_tx_processq(sc, &sc->sc_txq[2]);
+		nacked += ath_tx_processq(sc, &sc->sc_txq[2], 1);
 	if (TXQACTIVE(txqs, 3))
-		nacked += ath_tx_processq(sc, &sc->sc_txq[3]);
+		nacked += ath_tx_processq(sc, &sc->sc_txq[3], 1);
 	if (TXQACTIVE(txqs, sc->sc_cabq->axq_qnum))
-		ath_tx_processq(sc, sc->sc_cabq);
+		ath_tx_processq(sc, sc->sc_cabq, 1);
 	if (nacked)
 		sc->sc_lastrx = ath_hal_gettsf64(sc->sc_ah);
 
@@ -4736,7 +4738,7 @@ ath_tx_proc(void *arg, int npending)
 	nacked = 0;
 	for (i = 0; i < HAL_NUM_TX_QUEUES; i++)
 		if (ATH_TXQ_SETUP(sc, i) && TXQACTIVE(txqs, i))
-			nacked += ath_tx_processq(sc, &sc->sc_txq[i]);
+			nacked += ath_tx_processq(sc, &sc->sc_txq[i], 1);
 	if (nacked)
 		sc->sc_lastrx = ath_hal_gettsf64(sc->sc_ah);
 


More information about the svn-src-user mailing list