]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
iw: ack signal support for tx ack packets
authorBalaji Pothunoori <bpothuno@codeaurora.org>
Thu, 19 Jul 2018 14:29:50 +0000 (19:59 +0530)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 29 Aug 2018 08:56:29 +0000 (10:56 +0200)
This patch is to display the average ack signal,
last ack signal of tx ack packets.

Signed-off-by: Balaji Pothunoori <bpothuno@codeaurora.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
station.c

index 38c5f91cc0eb4cf2a9177c585b79940bbdbfca76..fd38043b1b86bb167970fafa2a899e96c99d684a 100644 (file)
--- a/station.c
+++ b/station.c
@@ -308,6 +308,8 @@ 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_ACK_SIGNAL] = {.type = NLA_U8 },
+               [NL80211_STA_INFO_ACK_SIGNAL_AVG] = { .type = NLA_U8 },
        };
        char *chain;
 
@@ -409,6 +411,14 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
                printf("\n\trx duration:\t%lld us",
                       (unsigned long long)nla_get_u64(sinfo[NL80211_STA_INFO_RX_DURATION]));
 
+       if (sinfo[NL80211_STA_INFO_ACK_SIGNAL])
+               printf("\n\tlast ack signal:%d dBm",
+                       (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_ACK_SIGNAL]));
+
+       if (sinfo[NL80211_STA_INFO_ACK_SIGNAL_AVG])
+               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_EXPECTED_THROUGHPUT]) {
                uint32_t thr;