Search Linux Wireless

[PATCH] iw: print expected throughput when dumping station

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

 



From: Antonio Quartulli <antonio@xxxxxxxxxxxxx>

Signed-off-by: Antonio Quartulli <antonio@xxxxxxxxxxxxx>
---

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

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