]> asedeno.scripts.mit.edu Git - linux.git/commit
wlcore: use boottime for fw time sync
authorArnd Bergmann <arnd@arndb.de>
Mon, 27 Nov 2017 11:48:19 +0000 (12:48 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 7 Dec 2017 13:20:01 +0000 (15:20 +0200)
commit99f6996d4cba794f0d65d2e58a1b5b7341bdebda
treeac8df3860e290eb1d0884e4e59b558fd6ca32018
parent4628257bf3006c18e0037459922624f02a138aed
wlcore: use boottime for fw time sync

Using getnstimeofday()/timespec_to_ns() causes an overflow on 32-bit
architectures in 2038, and may suffer from time jumps due to
settimeofday() or leap seconds.

I don't see a reason why this needs to be UTC, so either monotonic
or boot time would be better here. Assuming that the fw time keeps
running during suspend, boottime is better than monotonic, and
ktime_get_boot_ns() will also save the additional conversion to
nanoseconds.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ti/wlcore/main.c
drivers/net/wireless/ti/wlcore/tx.c