2015-02-09 07:37:20

by Ashok Raj Nagarajan

[permalink] [raw]
Subject: [PATCH] iw: display allowable channel bandwidth information

We already have allowable channel bandwidth information at userspace.
Display this information with 'iw list'. Excerpt of iw list command

Frequencies:
* 5180 MHz [36] (17.0 dBm) (HT40+, VHT80, VHT160)
* 5200 MHz [40] (17.0 * dBm) (HT40-, HT40+, VHT80, VHT160)

Signed-off-by: Ashok Raj Nagarajan <[email protected]>
---
info.c | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/info.c b/info.c
index 6e21e45..84db716 100644
--- a/info.c
+++ b/info.c
@@ -173,6 +173,18 @@ static int print_phy_handler(struct nl_msg *msg, void *arg)
goto next;
}

+ if (!tb_freq[NL80211_FREQUENCY_ATTR_NO_HT40_MINUS])
+ print_flag("HT40-", &open);
+
+ if (!tb_freq[NL80211_FREQUENCY_ATTR_NO_HT40_PLUS])
+ print_flag("HT40+", &open);
+
+ if (!tb_freq[NL80211_FREQUENCY_ATTR_NO_80MHZ])
+ print_flag("VHT80", &open);
+
+ if (!tb_freq[NL80211_FREQUENCY_ATTR_NO_160MHZ])
+ print_flag("VHT160", &open);
+
/* If both flags are set assume an new kernel */
if (tb_freq[NL80211_FREQUENCY_ATTR_NO_IR] && tb_freq[__NL80211_FREQUENCY_ATTR_NO_IBSS]) {
print_flag("no IR", &open);
--
1.9.1



2015-03-03 08:43:17

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] iw: display allowable channel bandwidth information

On Mon, 2015-02-09 at 13:06 +0530, Ashok Raj Nagarajan wrote:
> We already have allowable channel bandwidth information at userspace.
> Display this information with 'iw list'. Excerpt of iw list command
>
> Frequencies:
> * 5180 MHz [36] (17.0 dBm) (HT40+, VHT80, VHT160)

I think I would prefer this to be printed on a separate line, like the
radar information. There's also no-20 and no-10, which perhaps you
should handle?

johannes