]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
print BSS boottime if received
authorJohannes Berg <johannes.berg@intel.com>
Thu, 14 Jan 2016 10:46:56 +0000 (11:46 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 14 Jan 2016 10:46:56 +0000 (11:46 +0100)
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
scan.c

diff --git a/scan.c b/scan.c
index 06c4255cc25d2b1f30893042e48ce9675a36fe4a..bc1f936d9f0a6c5e48d03eb4e68b647a549cfc11 100644 (file)
--- a/scan.c
+++ b/scan.c
@@ -1919,6 +1919,12 @@ static int print_bss_handler(struct nl_msg *msg, void *arg)
        }
        printf("\n");
 
+       if (bss[NL80211_BSS_LAST_SEEN_BOOTTIME]) {
+               unsigned long long bt;
+               bt = (unsigned long long)nla_get_u64(bss[NL80211_BSS_LAST_SEEN_BOOTTIME]);
+               printf("\tlast seen: %llu.%.3llus [boottime]\n", bt/1000000000, (bt%1000000000)/1000000);
+       }
+
        if (bss[NL80211_BSS_TSF]) {
                unsigned long long tsf;
                tsf = (unsigned long long)nla_get_u64(bss[NL80211_BSS_TSF]);