[patch] ifconfig: display DFS related information
Adrian Chadd
adrian at freebsd.org
Tue Jul 12 15:22:34 UTC 2011
Hi,
I'd like to extend the channel list output in ifconfig to include the DFS flags.
These include:
* D: channel is DFS enabeld
* R: radar event has been detected on this channel
* I: interference has been detected on this channel
* C: CAC has completed on this channel (and thus can be used)
This is primarily to aid IBSS/hostap developers who are tinkering with
DFS/radar detection, but will be useful moving forward when users are
configuring ibss/hostap in DFS enabled areas (when DFS is fully
supported, that is.)
Thanks,
Adrian
Index: ifieee80211.c
===================================================================
--- ifieee80211.c (revision 223861)
+++ ifieee80211.c (working copy)
@@ -3451,9 +3451,13 @@
{
char buf[14];
- printf("Channel %3u : %u%c MHz%-14.14s",
+ printf("Channel %3u : %u%c%c%c%c%c MHz%-14.14s",
ieee80211_mhz2ieee(c->ic_freq, c->ic_flags), c->ic_freq,
IEEE80211_IS_CHAN_PASSIVE(c) ? '*' : ' ',
+ IEEE80211_IS_CHAN_DFS(c) ? 'D' : ' ',
+ IEEE80211_IS_CHAN_RADAR(c) ? 'R' : ' ',
+ IEEE80211_IS_CHAN_CWINT(c) ? 'I' : ' ',
+ IEEE80211_IS_CHAN_CACDONE(c) ? 'C' : ' ',
get_chaninfo(c, verb, buf, sizeof(buf)));
}
More information about the freebsd-wireless
mailing list