Search Linux Wireless

[PATCH 2/3] iw: Add printing of station tx duration and airtime weight

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

 



This adds printing of the station TX duration (along with the existing RX
duration), and the airtime weight, both of which were added as part of the
airtime fairness patches that were recently merged into mac80211.

Signed-off-by: Toke Høiland-Jørgensen <toke@xxxxxxx>
---
 station.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/station.c b/station.c
index 536120c..25cbbc3 100644
--- a/station.c
+++ b/station.c
@@ -309,6 +309,7 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
 		[NL80211_STA_INFO_TID_STATS] = { .type = NLA_NESTED },
 		[NL80211_STA_INFO_BSS_PARAM] = { .type = NLA_NESTED },
 		[NL80211_STA_INFO_RX_DURATION] = { .type = NLA_U64 },
+		[NL80211_STA_INFO_TX_DURATION] = { .type = NLA_U64 },
 		[NL80211_STA_INFO_ACK_SIGNAL] = {.type = NLA_U8 },
 		[NL80211_STA_INFO_ACK_SIGNAL_AVG] = { .type = NLA_U8 },
 	};
@@ -401,6 +402,10 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
 		printf("\n\ttx bitrate:\t%s", buf);
 	}
 
+	if (sinfo[NL80211_STA_INFO_TX_DURATION])
+		printf("\n\ttx duration:\t%lld us",
+		       (unsigned long long)nla_get_u64(sinfo[NL80211_STA_INFO_TX_DURATION]));
+
 	if (sinfo[NL80211_STA_INFO_RX_BITRATE]) {
 		char buf[100];
 
@@ -420,6 +425,10 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
 		printf("\n\tavg ack signal:\t%d dBm",
 			(int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_ACK_SIGNAL_AVG]));
 
+	if (sinfo[NL80211_STA_INFO_AIRTIME_WEIGHT]) {
+		printf("\n\tairtime weight: %d", nla_get_u16(sinfo[NL80211_STA_INFO_AIRTIME_WEIGHT]));
+	}
+
 	if (sinfo[NL80211_STA_INFO_EXPECTED_THROUGHPUT]) {
 		uint32_t thr;
 




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux