From a45eb4bdc778c5648b16e5a07c3690f888313b94 Mon Sep 17 00:00:00 2001 From: mtaylor Date: Sun, 28 Oct 2007 17:55:54 +0000 Subject: [PATCH] Add indication of radar, half and quarter rates to wlanconfig list chan git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2793 0192ed92-7a03-0410-a25b-9323aeb14dbd --- tools/wlanconfig.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tools/wlanconfig.c b/tools/wlanconfig.c index 3a08ee3..7cb60c4 100644 --- a/tools/wlanconfig.c +++ b/tools/wlanconfig.c @@ -696,8 +696,9 @@ print_chaninfo(const struct ieee80211_channel *c) { #define IEEE80211_IS_CHAN_PASSIVE(_c) \ (((_c)->ic_flags & IEEE80211_CHAN_PASSIVE)) +#define IEEE80211_IS_CHAN_RADAR(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_RADAR) != 0) char buf[14]; - buf[0] = '\0'; if (IEEE80211_IS_CHAN_FHSS(c)) strlcat(buf, " FHSS", sizeof(buf)); @@ -713,9 +714,15 @@ print_chaninfo(const struct ieee80211_channel *c) strlcat(buf, " Static", sizeof(buf)); if (IEEE80211_IS_CHAN_DTURBO(c)) strlcat(buf, " Dynamic", sizeof(buf)); - printf("Channel %3u : %u%c Mhz%-14.14s", + if (IEEE80211_IS_CHAN_HALF(c)) + strlcat(buf, " Half", sizeof(buf)); + if (IEEE80211_IS_CHAN_QUARTER(c)) + strlcat(buf, " Quarter", sizeof(buf)); + printf("Channel %3u : %u%c%c Mhz%-14.14s", c->ic_ieee, c->ic_freq, - IEEE80211_IS_CHAN_PASSIVE(c) ? '*' : ' ', buf); + IEEE80211_IS_CHAN_PASSIVE(c) ? '*' : ' ', + IEEE80211_IS_CHAN_RADAR(c) ? '!' : ' ', + buf); #undef IEEE80211_IS_CHAN_PASSIVE }