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.
This commit is contained in:
parent
3e01906b9d
commit
0755b8e882
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user