diff options
author | adrian <adrian@FreeBSD.org> | 2011-07-19 15:22:35 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2011-07-19 15:22:35 +0000 |
commit | 7f35845d9016986aa6c60d6220aa845574736dd8 (patch) | |
tree | b80b44b6ea69a898e7421f0cd5d08406b97d29c7 /sbin | |
parent | 5dc25961e94eddb80b29ed36768ebfc81383d984 (diff) | |
download | FreeBSD-src-7f35845d9016986aa6c60d6220aa845574736dd8.zip FreeBSD-src-7f35845d9016986aa6c60d6220aa845574736dd8.tar.gz |
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)
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ifconfig/ifieee80211.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c index 2104e0d..b33604f 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 |