commit 38ded68a3828ebb6c001d2fe57ee7da9c6a7ff6e
parent 1822062d55dde16084f73b15177e38802d4eb497
Author: Alvin Šipraga <ALSI@bang-olufsen.dk>
Date: Sat, 22 May 2021 12:06:25 +0000
scan: parse NL80211_BSS_LAST_SEEN_BOOTTIME in units of nanoseconds
NL80211_BSS_LAST_SEEN_BOOTTIME is expressed in nanoseconds, while BSS
timestamps are expressed in microseconds internally. Convert the
attribute to microseconds when using it to timestamp a BSS. This makes
iwd expire absent BSSes within 30 seconds as intended.
Fixes: 454cee12d473 ("scan: Use kernel-reported time-stamp if provided")
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/scan.c b/src/scan.c
@@ -1231,7 +1231,7 @@ static struct scan_bss *scan_parse_attr_bss(struct l_genl_attr *attr,
if (L_WARN_ON(len != sizeof(uint64_t)))
break;
- bss->time_stamp = l_get_u64(data);
+ bss->time_stamp = l_get_u64(data) / L_NSEC_PER_USEC;
break;
}
}