3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-26 10:39:23 +01:00

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: 454cee12d4 ("scan: Use kernel-reported time-stamp if provided")
This commit is contained in:
Alvin Šipraga 2021-05-22 12:06:25 +00:00 committed by Denis Kenzior
parent 1822062d55
commit 38ded68a38

View File

@ -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;
}
}