From owner-svn-src-user@FreeBSD.ORG Fri Sep 2 08:15:48 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 ED78B106564A; Fri, 2 Sep 2011 08:15:48 +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 C36A98FC0A; Fri, 2 Sep 2011 08:15:48 +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 p828FmGD088661; Fri, 2 Sep 2011 08:15:48 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p828Fmxm088657; Fri, 2 Sep 2011 08:15:48 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109020815.p828Fmxm088657@svn.freebsd.org> From: Adrian Chadd Date: Fri, 2 Sep 2011 08:15:48 +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: r225325 - 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: Fri, 02 Sep 2011 08:15:49 -0000 Author: adrian Date: Fri Sep 2 08:15:48 2011 New Revision: 225325 URL: http://svn.freebsd.org/changeset/base/225325 Log: Add TX/RX interrupt counts. Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath.c user/adrian/if_ath_tx/sys/dev/ath/if_ath_sysctl.c user/adrian/if_ath_tx/sys/dev/ath/if_athioctl.h Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/if_ath.c Fri Sep 2 08:13:07 2011 (r225324) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath.c Fri Sep 2 08:15:48 2011 (r225325) @@ -1459,10 +1459,14 @@ ath_intr(void *arg) /* bump tx trigger level */ ath_hal_updatetxtriglevel(ah, AH_TRUE); } - if (status & HAL_INT_RX) + if (status & HAL_INT_RX) { + sc->sc_stats.ast_rx_intr++; taskqueue_enqueue(sc->sc_tq, &sc->sc_rxtask); - if (status & HAL_INT_TX) + } + if (status & HAL_INT_TX) { + sc->sc_stats.ast_tx_intr++; taskqueue_enqueue(sc->sc_tq, &sc->sc_txtask); + } if (status & HAL_INT_BMISS) { sc->sc_stats.ast_bmiss++; taskqueue_enqueue(sc->sc_tq, &sc->sc_bmisstask); Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_sysctl.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/if_ath_sysctl.c Fri Sep 2 08:13:07 2011 (r225324) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_sysctl.c Fri Sep 2 08:15:48 2011 (r225325) @@ -817,6 +817,11 @@ ath_sysctl_stats_attach(struct ath_softc &sc->sc_stats.ast_tx_aggrfail, 0, "Number of aggregate TX failures (whole frame)"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_intr", CTLFLAG_RD, + &sc->sc_stats.ast_rx_intr, 0, "RX interrupts"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_intr", CTLFLAG_RD, + &sc->sc_stats.ast_tx_intr, 0, "TX interrupts"); + /* Attach the RX phy error array */ ath_sysctl_stats_attach_rxphyerr(sc, child); } Modified: user/adrian/if_ath_tx/sys/dev/ath/if_athioctl.h ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/if_athioctl.h Fri Sep 2 08:13:07 2011 (r225324) +++ user/adrian/if_ath_tx/sys/dev/ath/if_athioctl.h Fri Sep 2 08:15:48 2011 (r225325) @@ -150,7 +150,9 @@ struct ath_stats { u_int32_t ast_tx_delim_underrun; u_int32_t ast_tx_aggrfail; /* aggregate TX failed in its entirety */ struct ath_tx_aggr_stats tx_aggr; - u_int32_t ast_pad[9]; + u_int32_t ast_tx_intr; + u_int32_t ast_rx_intr; + u_int32_t ast_pad[7]; }; #define SIOCGATHSTATS _IOWR('i', 137, struct ifreq)