diff mbox

iw: display allowable channel bandwidth information

Message ID 1423467418-3912-1-git-send-email-arnagara@qti.qualcomm.com (mailing list archive)
State Changes Requested
Delegated to: Johannes Berg
Headers show

Commit Message

Ashok Raj Nagarajan Feb. 9, 2015, 7:36 a.m. UTC
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 <arnagara@qti.qualcomm.com>
---
 info.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Johannes Berg March 3, 2015, 8:43 a.m. UTC | #1
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

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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);