]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
iw: print station retry counters
authorBruno Randolf <br1@einfach.org>
Wed, 6 Oct 2010 09:35:50 +0000 (18:35 +0900)
committerJohannes Berg <johannes@sipsolutions.net>
Thu, 7 Oct 2010 08:55:44 +0000 (10:55 +0200)
Signed-off-by: Bruno Randolf <br1@einfach.org>
station.c

index 8cf038dfcf6ab9ccb79dfae28f29b9153444d12b..763955356fca31b98413a91106d100b5b65b9ef1 100644 (file)
--- a/station.c
+++ b/station.c
@@ -48,6 +48,8 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
                [NL80211_STA_INFO_LLID] = { .type = NLA_U16 },
                [NL80211_STA_INFO_PLID] = { .type = NLA_U16 },
                [NL80211_STA_INFO_PLINK_STATE] = { .type = NLA_U8 },
+               [NL80211_STA_INFO_TX_RETRIES] = { .type = NLA_U32 },
+               [NL80211_STA_INFO_TX_FAILED] = { .type = NLA_U32 },
        };
 
        static struct nla_policy rate_policy[NL80211_RATE_INFO_MAX + 1] = {
@@ -96,6 +98,12 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
        if (sinfo[NL80211_STA_INFO_TX_PACKETS])
                printf("\n\ttx packets:\t%u",
                        nla_get_u32(sinfo[NL80211_STA_INFO_TX_PACKETS]));
+       if (sinfo[NL80211_STA_INFO_TX_RETRIES])
+               printf("\n\ttx retries:\t%u",
+                       nla_get_u32(sinfo[NL80211_STA_INFO_TX_RETRIES]));
+       if (sinfo[NL80211_STA_INFO_TX_FAILED])
+               printf("\n\ttx failed:\t%u",
+                       nla_get_u32(sinfo[NL80211_STA_INFO_TX_FAILED]));
        if (sinfo[NL80211_STA_INFO_SIGNAL])
                printf("\n\tsignal:  \t%d dBm",
                        (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL]));