Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Sep 2011 08:15:48 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r225325 - user/adrian/if_ath_tx/sys/dev/ath
Message-ID:  <201109020815.p828Fmxm088657@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



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