diff options
author | adrian <adrian@FreeBSD.org> | 2011-05-11 17:20:35 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2011-05-11 17:20:35 +0000 |
commit | 0755b8e882c7ded3b64f35f85ee13a9ac5cb99e8 (patch) | |
tree | 7040634b04814e46049be2c7fdc7c50226838059 | |
parent | 3e01906b9da5248c8c0d1eb896b8c376fa712cb5 (diff) | |
download | FreeBSD-src-0755b8e882c7ded3b64f35f85ee13a9ac5cb99e8.zip FreeBSD-src-0755b8e882c7ded3b64f35f85ee13a9ac5cb99e8.tar.gz |
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.
-rw-r--r-- | sys/net80211/ieee80211_alq.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/net80211/ieee80211_alq.c b/sys/net80211/ieee80211_alq.c index a01fb0f..0d06d4b 100644 --- a/sys/net80211/ieee80211_alq.c +++ b/sys/net80211/ieee80211_alq.c @@ -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 *vap, uint8_t op, u_char *p, int l) 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); |