Search Linux Wireless

[PATCH v2] iw: display allowable channel bandwidth information

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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)
	  (10MHZ, 20MHZ, HT40+, VHT80, VHT160)
	* 5200 MHz [40] (17.0 dBm)
	  (10MHZ, 20MHZ, HT40-, HT40+, VHT80, VHT160)

Signed-off-by: Ashok Raj Nagarajan <arnagara@xxxxxxxxxxxxxxxx>
---
v2:
	Display channel bw information in separate line (Johannes)
	Updated commit log to reflect above change.
 info.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/info.c b/info.c
index 1df503f..728cb87 100644
--- a/info.c
+++ b/info.c
@@ -189,6 +189,31 @@ next:
 						printf(")");
 					printf("\n");
 
+					if (!tb_freq[NL80211_FREQUENCY_ATTR_DISABLED]) {
+						open = 0;
+						printf("\t\t\t ");
+						if (!tb_freq[NL80211_FREQUENCY_ATTR_NO_10MHZ])
+							print_flag("10MHz", &open);
+
+						if (!tb_freq[NL80211_FREQUENCY_ATTR_NO_20MHZ])
+							print_flag("20MHz", &open);
+
+						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 (open)
+							printf(")");
+						printf("\n");
+					}
+
 					if (!tb_freq[NL80211_FREQUENCY_ATTR_DISABLED] && tb_freq[NL80211_FREQUENCY_ATTR_DFS_STATE]) {
 						enum nl80211_dfs_state state = nla_get_u32(tb_freq[NL80211_FREQUENCY_ATTR_DFS_STATE]);
 						unsigned long time;
-- 
1.9.1

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




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux