Date: Mon, 12 Sep 2011 14:21:07 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r225508 - user/adrian/if_ath_tx/sys/dev/ath Message-ID: <201109121421.p8CEL7Xv029501@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Mon Sep 12 14:21:06 2011 New Revision: 225508 URL: http://svn.freebsd.org/changeset/base/225508 Log: It's wasteful to only check the active txqs from that bitmask; we may as well check all of them at onc. Obtained from: Linux ath9k 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 Mon Sep 12 11:18:54 2011 (r225507) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath.c Mon Sep 12 14:21:06 2011 (r225508) @@ -4511,6 +4511,7 @@ ath_tx_processq(struct ath_softc *sc, st return nacked; } +#if 0 static __inline int txqactive(struct ath_hal *ah, int qnum) { @@ -4519,7 +4520,6 @@ txqactive(struct ath_hal *ah, int qnum) return (txqs & (1<<qnum)); } -#if 0 /* * Deferred processing of transmit interrupt; special-cased * for a single hardware transmit queue (e.g. 5210 and 5211). @@ -4591,13 +4591,19 @@ ath_tx_proc(void *arg, int npending) struct ath_softc *sc = arg; struct ifnet *ifp = sc->sc_ifp; int i, nacked; + u_int32_t txqs = (1 << HAL_NUM_TX_QUEUES) - 1; + + /* + * Just grab the status of all TX queues. + */ + ath_hal_gettxintrtxqs(sc->sc_ah, &txqs); /* * Process each active queue. */ nacked = 0; for (i = 0; i < HAL_NUM_TX_QUEUES; i++) - if (ATH_TXQ_SETUP(sc, i) && txqactive(sc->sc_ah, i)) + if (ATH_TXQ_SETUP(sc, i) && (txqs & (1 << i))) nacked += ath_tx_processq(sc, &sc->sc_txq[i]); if (nacked) sc->sc_lastrx = ath_hal_gettsf64(sc->sc_ah);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201109121421.p8CEL7Xv029501>