2013-02-13 04:49:46

by Yogesh Ashok Powar

[permalink] [raw]
Subject: [PATCH] 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

Signed-off-by: Yogesh Ashok Powar <[email protected]>
---
link.c | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/link.c b/link.c
index 3470c4d..ef8f4d3 100644
--- a/link.c
+++ b/link.c
@@ -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");
}
}
--
1.8.0.3



2013-02-13 09:11:58

by Yogesh Ashok Powar

[permalink] [raw]
Subject: Re: [PATCH] iw: Add VHT info in link query

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

2013-02-13 08:58:56

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] iw: Add VHT info in link query

On Wed, 2013-02-13 at 10:08 +0530, Yogesh Ashok Powar wrote:
> 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