]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
iw: Show Toffset on station dump
authorAshok Nagarajan <ashok@cozybit.com>
Wed, 18 Apr 2012 18:00:45 +0000 (11:00 -0700)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 20 Apr 2012 18:08:31 +0000 (20:08 +0200)
Signed-off-by: Ashok Nagarajan <ashok@cozybit.com>
station.c

index ef69ea58a038e43bb29d5ec67a11208041821987..ac73e48d448dd08ef928768195084e15c17b5560 100644 (file)
--- a/station.c
+++ b/station.c
@@ -45,6 +45,7 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
                [NL80211_STA_INFO_RX_PACKETS] = { .type = NLA_U32 },
                [NL80211_STA_INFO_TX_PACKETS] = { .type = NLA_U32 },
                [NL80211_STA_INFO_SIGNAL] = { .type = NLA_U8 },
+               [NL80211_STA_INFO_T_OFFSET] = { .type = NLA_U64 },
                [NL80211_STA_INFO_TX_BITRATE] = { .type = NLA_NESTED },
                [NL80211_STA_INFO_LLID] = { .type = NLA_U16 },
                [NL80211_STA_INFO_PLID] = { .type = NLA_U16 },
@@ -113,6 +114,9 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
        if (sinfo[NL80211_STA_INFO_SIGNAL_AVG])
                printf("\n\tsignal avg:\t%d dBm",
                        (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL_AVG]));
+       if (sinfo[NL80211_STA_INFO_T_OFFSET])
+               printf("\n\tToffset:\t%lld us",
+                       (unsigned long long)nla_get_u64(sinfo[NL80211_STA_INFO_T_OFFSET]));
 
        if (sinfo[NL80211_STA_INFO_TX_BITRATE]) {
                if (nla_parse_nested(rinfo, NL80211_RATE_INFO_MAX,