From owner-svn-src-user@FreeBSD.ORG Mon Sep 12 14:21:07 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A02C106566C; Mon, 12 Sep 2011 14:21:07 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 51E878FC12; Mon, 12 Sep 2011 14:21:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p8CEL7ba029503; Mon, 12 Sep 2011 14:21:07 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p8CEL7Xv029501; Mon, 12 Sep 2011 14:21:07 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109121421.p8CEL7Xv029501@svn.freebsd.org> From: Adrian Chadd Date: Mon, 12 Sep 2011 14:21:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225508 - user/adrian/if_ath_tx/sys/dev/ath X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Sep 2011 14:21:07 -0000 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<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);