svn commit: r188564 - in projects/vap7/sys: . contrib/pf dev
dev/ath dev/ath/ath_hal dev/ath/ath_hal/ar5210
dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212
dev/ath/ath_hal/ar5312 dev/ath/ath_hal/ar54...
Sam Leffler
sam at FreeBSD.org
Thu Feb 12 21:50:19 PST 2009
Author: sam
Date: Fri Feb 13 05:50:18 2009
New Revision: 188564
URL: http://svn.freebsd.org/changeset/base/188564
Log:
merge r188557: add SIOCZATHSTATS ioctl to zero driver statistics
Modified:
projects/vap7/sys/ (props changed)
projects/vap7/sys/contrib/pf/ (props changed)
projects/vap7/sys/dev/ (props changed)
projects/vap7/sys/dev/ath/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5210/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5211/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5212/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5312/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5416/ (props changed)
projects/vap7/sys/dev/ath/if_ath.c
projects/vap7/sys/dev/ath/if_athioctl.h
projects/vap7/sys/dev/cxgb/ (props changed)
projects/vap7/sys/dev/usb2/ (props changed)
projects/vap7/sys/i386/conf/USB2 (props changed)
projects/vap7/sys/modules/usb2/ (props changed)
projects/vap7/sys/net80211/ (props changed)
Modified: projects/vap7/sys/dev/ath/if_ath.c
==============================================================================
--- projects/vap7/sys/dev/ath/if_ath.c Fri Feb 13 05:49:42 2009 (r188563)
+++ projects/vap7/sys/dev/ath/if_ath.c Fri Feb 13 05:50:18 2009 (r188564)
@@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$");
#include <sys/endian.h>
#include <sys/kthread.h>
#include <sys/taskqueue.h>
+#include <sys/priv.h>
#include <machine/bus.h>
@@ -6583,6 +6584,11 @@ ath_ioctl(struct ifnet *ifp, u_long cmd,
rt->info[sc->sc_txrix].dot11Rate &~ IEEE80211_RATE_BASIC;
return copyout(&sc->sc_stats,
ifr->ifr_data, sizeof (sc->sc_stats));
+ case SIOCZATHSTATS:
+ error = priv_check(curthread, PRIV_DRIVER);
+ if (error == 0)
+ memset(&sc->sc_stats, 0, sizeof(sc->sc_stats));
+ break;
#ifdef ATH_DIAGAPI
case SIOCGATHDIAG:
error = ath_ioctl_diag(sc, (struct ath_diag *) ifr);
Modified: projects/vap7/sys/dev/ath/if_athioctl.h
==============================================================================
--- projects/vap7/sys/dev/ath/if_athioctl.h Fri Feb 13 05:49:42 2009 (r188563)
+++ projects/vap7/sys/dev/ath/if_athioctl.h Fri Feb 13 05:50:18 2009 (r188564)
@@ -122,6 +122,7 @@ struct ath_stats {
};
#define SIOCGATHSTATS _IOWR('i', 137, struct ifreq)
+#define SIOCZATHSTATS _IOWR('i', 139, struct ifreq)
struct ath_diag {
char ad_name[IFNAMSIZ]; /* if name, e.g. "ath0" */
More information about the svn-src-projects
mailing list