Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Jun 2012 06:42:18 +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: r236833 - head/sys/dev/ath
Message-ID:  <201206100642.q5A6gI45078187@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Sun Jun 10 06:42:18 2012
New Revision: 236833
URL: http://svn.freebsd.org/changeset/base/236833

Log:
  Add a new ioctl for ath(4) which returns the aggregate statistics.

Modified:
  head/sys/dev/ath/if_ath.c
  head/sys/dev/ath/if_athioctl.h

Modified: head/sys/dev/ath/if_ath.c
==============================================================================
--- head/sys/dev/ath/if_ath.c	Sun Jun 10 06:31:54 2012	(r236832)
+++ head/sys/dev/ath/if_ath.c	Sun Jun 10 06:42:18 2012	(r236833)
@@ -4848,6 +4848,9 @@ ath_ioctl(struct ifnet *ifp, u_long cmd,
 			sc->sc_stats.ast_tx_rate |= IEEE80211_RATE_MCS;
 		return copyout(&sc->sc_stats,
 		    ifr->ifr_data, sizeof (sc->sc_stats));
+	case SIOCGATHAGSTATS:
+		return copyout(&sc->sc_aggr_stats,
+		    ifr->ifr_data, sizeof (sc->sc_aggr_stats));
 	case SIOCZATHSTATS:
 		error = priv_check(curthread, PRIV_DRIVER);
 		if (error == 0) {

Modified: head/sys/dev/ath/if_athioctl.h
==============================================================================
--- head/sys/dev/ath/if_athioctl.h	Sun Jun 10 06:31:54 2012	(r236832)
+++ head/sys/dev/ath/if_athioctl.h	Sun Jun 10 06:42:18 2012	(r236833)
@@ -166,6 +166,7 @@ struct ath_stats {
 
 #define	SIOCGATHSTATS	_IOWR('i', 137, struct ifreq)
 #define	SIOCZATHSTATS	_IOWR('i', 139, struct ifreq)
+#define	SIOCGATHAGSTATS	_IOWR('i', 141, struct ifreq)
 
 struct ath_diag {
 	char	ad_name[IFNAMSIZ];	/* if name, e.g. "ath0" */



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