svn commit: r188186 - in projects/vap7/tools/tools: ath ath/athdebug ath/athrd net80211 net80211/wlanstats

Sam Leffler sam at FreeBSD.org
Thu Feb 5 12:37:08 PST 2009


Author: sam
Date: Thu Feb  5 20:37:07 2009
New Revision: 188186
URL: http://svn.freebsd.org/changeset/base/188186

Log:
  revert unintended parts of r188185

Modified:
  projects/vap7/tools/tools/ath/   (props changed)
  projects/vap7/tools/tools/ath/athdebug/athdebug.c
  projects/vap7/tools/tools/ath/athrd/athrd.c
  projects/vap7/tools/tools/net80211/   (props changed)
  projects/vap7/tools/tools/net80211/wlanstats/wlanstats.c

Modified: projects/vap7/tools/tools/ath/athdebug/athdebug.c
==============================================================================
--- projects/vap7/tools/tools/ath/athdebug/athdebug.c	Thu Feb  5 20:34:19 2009	(r188185)
+++ projects/vap7/tools/tools/ath/athdebug/athdebug.c	Thu Feb  5 20:37:07 2009	(r188186)
@@ -43,12 +43,38 @@
 #include <getopt.h>
 #include <stdlib.h>
 
-#include "ah_debug.h"
-
 #define	N(a)	(sizeof(a)/sizeof(a[0]))
 
 const char *progname;
 
+enum {
+	ATH_DEBUG_XMIT		= 0x00000001,	/* basic xmit operation */
+	ATH_DEBUG_XMIT_DESC	= 0x00000002,	/* xmit descriptors */
+	ATH_DEBUG_RECV		= 0x00000004,	/* basic recv operation */
+	ATH_DEBUG_RECV_DESC	= 0x00000008,	/* recv descriptors */
+	ATH_DEBUG_RATE		= 0x00000010,	/* rate control */
+	ATH_DEBUG_RESET		= 0x00000020,	/* reset processing */
+	ATH_DEBUG_MODE		= 0x00000040,	/* mode init/setup */
+	ATH_DEBUG_BEACON 	= 0x00000080,	/* beacon handling */
+	ATH_DEBUG_WATCHDOG 	= 0x00000100,	/* watchdog timeout */
+	ATH_DEBUG_INTR		= 0x00001000,	/* ISR */
+	ATH_DEBUG_TX_PROC	= 0x00002000,	/* tx ISR proc */
+	ATH_DEBUG_RX_PROC	= 0x00004000,	/* rx ISR proc */
+	ATH_DEBUG_BEACON_PROC	= 0x00008000,	/* beacon ISR proc */
+	ATH_DEBUG_CALIBRATE	= 0x00010000,	/* periodic calibration */
+	ATH_DEBUG_KEYCACHE	= 0x00020000,	/* key cache management */
+	ATH_DEBUG_STATE		= 0x00040000,	/* 802.11 state transitions */
+	ATH_DEBUG_NODE		= 0x00080000,	/* node management */
+	ATH_DEBUG_LED		= 0x00100000,	/* led management */
+	ATH_DEBUG_FF		= 0x00200000,	/* fast frames */
+	ATH_DEBUG_DFS		= 0x00400000,	/* DFS processing */
+	ATH_DEBUG_TDMA		= 0x00800000,	/* TDMA processing */
+	ATH_DEBUG_TDMA_TIMER	= 0x01000000,	/* TDMA timer processing */
+	ATH_DEBUG_REGDOMAIN	= 0x02000000,	/* regulatory processing */
+	ATH_DEBUG_FATAL		= 0x80000000,	/* fatal errors */
+	ATH_DEBUG_ANY		= 0xffffffff
+};
+
 static struct {
 	const char	*name;
 	u_int		bit;
@@ -61,6 +87,7 @@ static struct {
 	{ "reset",	ATH_DEBUG_RESET },
 	{ "mode",	ATH_DEBUG_MODE },
 	{ "beacon",	ATH_DEBUG_BEACON },
+	{ "watchdog",	ATH_DEBUG_WATCHDOG },
 	{ "intr",	ATH_DEBUG_INTR },
 	{ "xmit_proc",	ATH_DEBUG_TX_PROC },
 	{ "recv_proc",	ATH_DEBUG_RX_PROC },
@@ -69,19 +96,13 @@ static struct {
 	{ "keycache",	ATH_DEBUG_KEYCACHE },
 	{ "state",	ATH_DEBUG_STATE },
 	{ "node",	ATH_DEBUG_NODE },
+	{ "led",	ATH_DEBUG_LED },
 	{ "ff",		ATH_DEBUG_FF },
+	{ "dfs",	ATH_DEBUG_DFS },
 	{ "tdma",	ATH_DEBUG_TDMA },
 	{ "tdma_timer",	ATH_DEBUG_TDMA_TIMER },
 	{ "regdomain",	ATH_DEBUG_REGDOMAIN },
 	{ "fatal",	ATH_DEBUG_FATAL },
-	{ "ani",	HAL_DEBUG_ANI },
-	{ "txqueue",	HAL_DEBUG_TXQUEUE },
-	{ "nfcal",	HAL_DEBUG_NFCAL },
-	{ "phyio",	HAL_DEBUG_PHYIO },
-	{ "power",	HAL_DEBUG_POWER },
-	{ "rfparam",	HAL_DEBUG_RFPARAM },
-	{ "regio",	HAL_DEBUG_REGIO },
-	{ "attach",	HAL_DEBUG_ATTACH },
 };
 
 static u_int

Modified: projects/vap7/tools/tools/ath/athrd/athrd.c
==============================================================================
--- projects/vap7/tools/tools/ath/athrd/athrd.c	Thu Feb  5 20:34:19 2009	(r188185)
+++ projects/vap7/tools/tools/ath/athrd/athrd.c	Thu Feb  5 20:37:07 2009	(r188186)
@@ -1058,7 +1058,7 @@ main(int argc, char *argv[])
 			showchannels = AH_TRUE;
 			break;
 		case 'd':
-			ath_hal_debug = ATH_DEBUG_ANY;
+			ath_hal_debug = HAL_DEBUG_ANY;
 			break;
 		case 'e':
 			extendedChanMode = AH_FALSE;
@@ -1591,7 +1591,7 @@ setRateTable(struct ath_hal *ah, const s
 		ahp->ah_ofdmTxPower = rpow[0];
 #endif
 
-		HALDEBUG(ah, ATH_DEBUG_ANY,
+		HALDEBUG(ah, HAL_DEBUG_ANY,
 		    "%s: MaxRD: %d TurboMax: %d MaxCTL: %d "
 		    "TPC_Reduction %d\n", __func__,
 		    twiceMaxRDPower, turbo2WMaxPower5,

Modified: projects/vap7/tools/tools/net80211/wlanstats/wlanstats.c
==============================================================================
--- projects/vap7/tools/tools/net80211/wlanstats/wlanstats.c	Thu Feb  5 20:34:19 2009	(r188185)
+++ projects/vap7/tools/tools/net80211/wlanstats/wlanstats.c	Thu Feb  5 20:37:07 2009	(r188186)
@@ -390,12 +390,9 @@ wlan_getopmode(struct wlanstatfoo *wf0)
 		strlcpy(ifmr.ifm_name, wf->ifr.ifr_name, sizeof(ifmr.ifm_name));
 		if (ioctl(wf->s, SIOCGIFMEDIA, &ifmr) < 0)
 			err(1, "%s (SIOCGIFMEDIA)", wf->ifr.ifr_name);
-		if (ifmr.ifm_current & IFM_IEEE80211_ADHOC) {
-			if (ifmr.ifm_current & IFM_FLAG0)
-				wf->opmode = IEEE80211_M_AHDEMO;
-			else
-				wf->opmode = IEEE80211_M_IBSS;
-		} else if (ifmr.ifm_current & IFM_IEEE80211_HOSTAP)
+		if (ifmr.ifm_current & IFM_IEEE80211_ADHOC)
+			wf->opmode = IEEE80211_M_IBSS;	/* XXX ahdemo */
+		else if (ifmr.ifm_current & IFM_IEEE80211_HOSTAP)
 			wf->opmode = IEEE80211_M_HOSTAP;
 		else if (ifmr.ifm_current & IFM_IEEE80211_MONITOR)
 			wf->opmode = IEEE80211_M_MONITOR;
@@ -425,15 +422,6 @@ getlladdr(struct wlanstatfoo_p *wf)
 	freeifaddrs(ifp);
 }
 
-static int
-getbssid(struct wlanstatfoo_p *wf)
-{
-	wf->ireq.i_type = IEEE80211_IOC_BSSID;
-	wf->ireq.i_data = wf->mac;
-	wf->ireq.i_len = IEEE80211_ADDR_LEN;
-	return ioctl(wf->s, SIOCG80211, &wf->ireq);
-}
-
 static void
 wlan_setstamac(struct wlanstatfoo *wf0, const uint8_t *mac)
 {
@@ -448,9 +436,11 @@ wlan_setstamac(struct wlanstatfoo *wf0, 
 			getlladdr(wf);
 			break;
 		case IEEE80211_M_STA:
-			if (getbssid(wf) < 0)
-				err(1, "%s (IEEE80211_IOC_BSSID)",
-				    wf->ireq.i_name);
+			wf->ireq.i_type = IEEE80211_IOC_BSSID;
+			wf->ireq.i_data = wf->mac;
+			wf->ireq.i_len = IEEE80211_ADDR_LEN;
+			if (ioctl(wf->s, SIOCG80211, &wf->ireq) <0)
+				err(1, "%s (IEEE80211_IOC_BSSID)", wf->ireq.i_name);
 			break;
 		}
 	} else
@@ -467,18 +457,15 @@ wlan_collect(struct wlanstatfoo_p *wf,
 	wf->ireq.i_type = IEEE80211_IOC_STA_INFO;
 	wf->ireq.i_data = (caddr_t) &wf->u_info;
 	wf->ireq.i_len = sizeof(wf->u_info);
-	if (ioctl(wf->s, SIOCG80211, &wf->ireq) < 0) {
-		warn("%s:%s (IEEE80211_IOC_STA_INFO)", wf->ireq.i_name,
-		    ether_ntoa((const struct ether_addr*) wf->mac));
-	}
+	if (ioctl(wf->s, SIOCG80211, &wf->ireq) < 0)
+		warn("%s (IEEE80211_IOC_STA_INFO)", wf->ireq.i_name);
 
 	IEEE80211_ADDR_COPY(nstats->is_u.macaddr, wf->mac);
 	wf->ireq.i_type = IEEE80211_IOC_STA_STATS;
 	wf->ireq.i_data = (caddr_t) nstats;
 	wf->ireq.i_len = sizeof(*nstats);
 	if (ioctl(wf->s, SIOCG80211, &wf->ireq) < 0)
-		warn("%s:%s (IEEE80211_IOC_STA_STATS)", wf->ireq.i_name,
-		    ether_ntoa((const struct ether_addr*) wf->mac));
+		warn("%s (IEEE80211_IOC_STA_STATS)", wf->ireq.i_name);
 
 	wf->ifr.ifr_data = (caddr_t) stats;
 	if (ioctl(wf->s, SIOCG80211STATS, &wf->ifr) < 0)


More information about the svn-src-projects mailing list