linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iw: display allowable channel bandwidth information
@ 2015-02-09  7:36 Ashok Raj Nagarajan
  2015-03-03  8:43 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Ashok Raj Nagarajan @ 2015-02-09  7:36 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, rmanohar, vthiagar, Ashok Raj Nagarajan

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(+)

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] iw: display allowable channel bandwidth information
  2015-02-09  7:36 [PATCH] iw: display allowable channel bandwidth information Ashok Raj Nagarajan
@ 2015-03-03  8:43 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2015-03-03  8:43 UTC (permalink / raw)
  To: Ashok Raj Nagarajan; +Cc: linux-wireless, rmanohar, vthiagar

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-03  8:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-09  7:36 [PATCH] iw: display allowable channel bandwidth information Ashok Raj Nagarajan
2015-03-03  8:43 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).