* [PATCH] iw: print expected throughput when dumping station
@ 2014-05-17 18:17 Antonio Quartulli
2014-05-18 4:13 ` Antonio Quartulli
2014-06-03 19:47 ` Johannes Berg
0 siblings, 2 replies; 3+ messages in thread
From: Antonio Quartulli @ 2014-05-17 18:17 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Antonio Quartulli
From: Antonio Quartulli <antonio@open-mesh.com>
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
---
This patch is based on the "Export the expected throughput towards a peer"
patchset sent on linux-wireless
Cheers,
station.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/station.c b/station.c
index 07acdbc..ef8d405 100644
--- a/station.c
+++ b/station.c
@@ -226,6 +226,16 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
printf("\n\trx bitrate:\t%s", buf);
}
+ if (sinfo[NL80211_STA_INFO_EXPECTED_THROUGHPUT]) {
+ uint32_t thr;
+
+ thr = nla_get_u32(sinfo[NL80211_STA_INFO_EXPECTED_THROUGHPUT]);
+ /* convert in Mbps but scale by 1000 to save kbps units */
+ thr = thr * 1000 / 1024;
+
+ printf("\n\tthroughput:\t%u.%uMbps", thr / 1000, thr % 1000);
+ }
+
if (sinfo[NL80211_STA_INFO_LLID])
printf("\n\tmesh llid:\t%d",
nla_get_u16(sinfo[NL80211_STA_INFO_LLID]));
--
1.8.5.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-06-03 19:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-17 18:17 [PATCH] iw: print expected throughput when dumping station Antonio Quartulli
2014-05-18 4:13 ` Antonio Quartulli
2014-06-03 19:47 ` 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).