aboutsummaryrefslogtreecommitdiff
path: root/sbin/ifconfig/ifieee80211.c
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2011-07-19 15:22:35 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2011-07-19 15:22:35 +0000
commit2ad10b365ca430a5a9a45c0793de3aabf0ae41f9 (patch)
treeb80b44b6ea69a898e7421f0cd5d08406b97d29c7 /sbin/ifconfig/ifieee80211.c
parentedf26ab83e5d4f274cfee43495472aef14b39b93 (diff)
downloadsrc-2ad10b365ca430a5a9a45c0793de3aabf0ae41f9.tar.gz
src-2ad10b365ca430a5a9a45c0793de3aabf0ae41f9.zip
This patch enables listing DFS related flags when 'ifconfig -v wlanX
list channel' is run. The following new options are introduced: * D: channel requires DFS * R: channel has a radar event * I: channel has detected inteference * C: the CAC period has completed on a channel that requires it (ie, DFS + PASSIVE.) It's relevant for developing, debugging and using the DFS and interference options. Approved by: re (bz)
Notes
Notes: svn path=/head/; revision=224219
Diffstat (limited to 'sbin/ifconfig/ifieee80211.c')
-rw-r--r--sbin/ifconfig/ifieee80211.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c
index 2104e0d79b34..b33604ffcec8 100644
--- a/sbin/ifconfig/ifieee80211.c
+++ b/sbin/ifconfig/ifieee80211.c
@@ -3451,10 +3451,21 @@ print_chaninfo(const struct ieee80211_channel *c, int verb)
{
char buf[14];
+ if (verb)
+ 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)));
+ else
printf("Channel %3u : %u%c MHz%-14.14s",
- ieee80211_mhz2ieee(c->ic_freq, c->ic_flags), c->ic_freq,
- IEEE80211_IS_CHAN_PASSIVE(c) ? '*' : ' ',
- get_chaninfo(c, verb, buf, sizeof(buf)));
+ ieee80211_mhz2ieee(c->ic_freq, c->ic_flags), c->ic_freq,
+ IEEE80211_IS_CHAN_PASSIVE(c) ? '*' : ' ',
+ get_chaninfo(c, verb, buf, sizeof(buf)));
+
}
static int