svn commit: r221782 - head/sys/net80211

Adrian Chadd adrian at FreeBSD.org
Wed May 11 17:20:35 UTC 2011


Author: adrian
Date: Wed May 11 17:20:35 2011
New Revision: 221782
URL: http://svn.freebsd.org/changeset/base/221782

Log:
  Fix up the net80211 alq logging - this commit makes it usable.
  
  * revert a local path change that shouldn't have made it to the commit
  * fix some indenting/wrapping
  
  * Fix the ale data copy - i should be copying into the ale data pointer,
    not over the ale entry itself.

Modified:
  head/sys/net80211/ieee80211_alq.c

Modified: head/sys/net80211/ieee80211_alq.c
==============================================================================
--- head/sys/net80211/ieee80211_alq.c	Wed May 11 16:44:19 2011	(r221781)
+++ head/sys/net80211/ieee80211_alq.c	Wed May 11 17:20:35 2011	(r221782)
@@ -65,7 +65,7 @@ __FBSDID("$FreeBSD$");
 static struct alq *ieee80211_alq;
 static int ieee80211_alq_lost;
 static int ieee80211_alq_logged;
-static char ieee80211_alq_logfile[MAXPATHLEN] = "/mnt/tmp/net80211.log";
+static char ieee80211_alq_logfile[MAXPATHLEN] = "/tmp/net80211.log";
 static unsigned int ieee80211_alq_qsize = 64*1024;
 
 static int
@@ -84,7 +84,9 @@ ieee80211_alq_setlogging(int enable)
 		    sizeof (struct ieee80211_alq_rec),
 		    ieee80211_alq_qsize);
 		ieee80211_alq_lost = 0;
-		printf("net80211: logging to %s enabled\n", ieee80211_alq_logfile);
+		ieee80211_alq_logged = 0;
+		printf("net80211: logging to %s enabled; struct size %d bytes\n",
+		    ieee80211_alq_logfile, sizeof(struct ieee80211_alq_rec));
 	} else {
 		if (ieee80211_alq)
 			alq_close(ieee80211_alq);
@@ -143,7 +145,7 @@ ieee80211_alq_log(struct ieee80211vap *v
 	if (! ale)
 		return;
 
-	r = (struct ieee80211_alq_rec *) ale;
+	r = (struct ieee80211_alq_rec *) ale->ae_data;
 	r->r_timestamp = htonl(ticks);
 	r->r_version = 1;
 	r->r_wlan = htons(vap->iv_ifp->if_dunit);


More information about the svn-src-head mailing list