Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Feb 2013 02:15:25 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r246450 - head/sys/dev/ath
Message-ID:  <201302070215.r172FPcw059169@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Thu Feb  7 02:15:25 2013
New Revision: 246450
URL: http://svnweb.freebsd.org/changeset/base/246450

Log:
  Methodize the process of adding the software TX queue to the taskqueue.
  
  Move it (for now) to the TX taskqueue.

Modified:
  head/sys/dev/ath/if_ath.c
  head/sys/dev/ath/if_ath_misc.h
  head/sys/dev/ath/if_ath_tx.c
  head/sys/dev/ath/if_ath_tx_edma.c

Modified: head/sys/dev/ath/if_ath.c
==============================================================================
--- head/sys/dev/ath/if_ath.c	Thu Feb  7 00:48:42 2013	(r246449)
+++ head/sys/dev/ath/if_ath.c	Thu Feb  7 02:15:25 2013	(r246450)
@@ -4230,9 +4230,9 @@ ath_tx_processq(struct ath_softc *sc, st
 		ieee80211_ff_flush(ic, txq->axq_ac);
 #endif
 
-	/* Kick the TXQ scheduler */
+	/* Kick the software TXQ scheduler */
 	if (dosched) {
-		taskqueue_enqueue(sc->sc_tx_tq, &sc->sc_txqtask);
+		ath_tx_swq_kick(sc);
 	}
 
 	ATH_KTR(sc, ATH_KTR_TXCOMP, 1,

Modified: head/sys/dev/ath/if_ath_misc.h
==============================================================================
--- head/sys/dev/ath/if_ath_misc.h	Thu Feb  7 00:48:42 2013	(r246449)
+++ head/sys/dev/ath/if_ath_misc.h	Thu Feb  7 02:15:25 2013	(r246450)
@@ -120,12 +120,24 @@ extern	void ath_tx_update_tim(struct ath
 extern void ath_start(struct ifnet *ifp);
 extern	void ath_start_task(void *arg, int npending);
 
+/*
+ * Kick the frame TX task.
+ */
 static inline void
 ath_tx_kick(struct ath_softc *sc)
 {
 
-	/* XXX eventually try sc_tx_tq? */
 	taskqueue_enqueue(sc->sc_tx_tq, &sc->sc_txpkttask);
 }
 
+/*
+ * Kick the software TX queue task.
+ */
+static inline void
+ath_tx_swq_kick(struct ath_softc *sc)
+{
+
+	taskqueue_enqueue(sc->sc_tx_tq, &sc->sc_txqtask);
+}
+
 #endif

Modified: head/sys/dev/ath/if_ath_tx.c
==============================================================================
--- head/sys/dev/ath/if_ath_tx.c	Thu Feb  7 00:48:42 2013	(r246449)
+++ head/sys/dev/ath/if_ath_tx.c	Thu Feb  7 02:15:25 2013	(r246450)
@@ -2999,9 +2999,11 @@ ath_tx_tid_resume(struct ath_softc *sc, 
 	}
 
 	ath_tx_tid_sched(sc, tid);
-	/* Punt some frames to the hardware if needed */
-	//ath_txq_sched(sc, sc->sc_ac2q[tid->ac]);
-	taskqueue_enqueue(sc->sc_tx_tq, &sc->sc_txqtask);
+
+	/*
+	 * Queue the software TX scheduler.
+	 */
+	ath_tx_swq_kick(sc);
 }
 
 /*

Modified: head/sys/dev/ath/if_ath_tx_edma.c
==============================================================================
--- head/sys/dev/ath/if_ath_tx_edma.c	Thu Feb  7 00:48:42 2013	(r246449)
+++ head/sys/dev/ath/if_ath_tx_edma.c	Thu Feb  7 02:15:25 2013	(r246450)
@@ -655,7 +655,7 @@ ath_edma_tx_processq(struct ath_softc *s
 	 * the txq task for _one_ TXQ.  This should be fixed.
 	 */
 	if (dosched)
-		taskqueue_enqueue(sc->sc_tx_tq, &sc->sc_txqtask);
+		ath_tx_swq_kick(sc);
 }
 
 static void



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302070215.r172FPcw059169>