All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yogesh Ashok Powar <yogeshp@marvell.com>
To: linux-wireless@vger.kernel.org
Cc: Johannes Berg <johannes@sipsolutions.net>
Subject: [PATCH] iw: Add VHT info in link query
Date: Wed, 13 Feb 2013 10:08:33 +0530	[thread overview]
Message-ID: <20130213043833.GA842@markyou.marvell.com> (raw)

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 <yogeshp@marvell.com>
---
 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


             reply	other threads:[~2013-02-13  4:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-13  4:38 Yogesh Ashok Powar [this message]
2013-02-13  8:58 ` [PATCH] iw: Add VHT info in link query Johannes Berg
2013-02-13  9:02   ` Yogesh Ashok Powar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130213043833.GA842@markyou.marvell.com \
    --to=yogeshp@marvell.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.