Skip to contentSkip to conversation

iw: Add VHT info in link query

PATCH Applied Yogesh Ashok Powar 2 participants 3 messages Feb 13, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iw: Add VHT info in link query

Show VHT mcs, nss and bw, if present, in
iw dev link.

Eg.,
Connected to 10:6f:3f:4d:94:b4 (on mlan0)
SSID: 122920
freq: 5180
RX: 0 bytes (0 packets)
TX: 88 bytes (1 packets)
signal: -51 dBm
tx bitrate: 650.0 MBit/s VHT-MCS 7 80Mhz short GI VHT-NSS 2

bss flags:
dtim period: 1
beacon int: 100

---
 link.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
link.c +10 -0
index 3470c4d..ef8f4d3 100644
@@ -187,10 +187,20 @@ static int print_link_sta(struct nl_msg *msg, void *arg)
 
 			if (rinfo[NL80211_RATE_INFO_MCS])
 				printf(" MCS %d", nla_get_u8(rinfo[NL80211_RATE_INFO_MCS]));
+			if (rinfo[NL80211_RATE_INFO_VHT_MCS])
+				printf(" VHT-MCS %d", nla_get_u8(rinfo[NL80211_RATE_INFO_VHT_MCS]));
 			if (rinfo[NL80211_RATE_INFO_40_MHZ_WIDTH])
 				printf(" 40Mhz");
+			if (rinfo[NL80211_RATE_INFO_80_MHZ_WIDTH])
+				printf(" 80Mhz");
+			if (rinfo[NL80211_RATE_INFO_80P80_MHZ_WIDTH])
+				printf(" 80P80Mhz");
+			if (rinfo[NL80211_RATE_INFO_160_MHZ_WIDTH])
+				printf(" 160Mhz");
 			if (rinfo[NL80211_RATE_INFO_SHORT_GI])
 				printf(" short GI");
+			if (rinfo[NL80211_RATE_INFO_VHT_NSS])
+				printf(" VHT-NSS %d", nla_get_u8(rinfo[NL80211_RATE_INFO_VHT_NSS]));
 			printf("\n");
 		}
 	}
Signature · 1 line
1.8.0.3
#1 lore raw
Quoted 2 lines · Yogesh Ashok Powar

Show VHT mcs, nss and bw, if present, in
iw dev link.

Applied, thanks. I also fixed "Mhz" to "MHz" in the new & existing code.

johannes

#2 lore raw
Quoted 4 lines
Quoted 2 lines

Show VHT mcs, nss and bw, if present, in
iw dev link.

Applied, thanks. I also fixed "Mhz" to "MHz" in the new & existing code.

OK

Thanks
Yogesh