ipw2x00: track time using boottime
authorArnd Bergmann <arnd@arndb.de>
Mon, 18 Jun 2018 15:11:16 +0000 (17:11 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 27 Jun 2018 16:10:25 +0000 (19:10 +0300)
commit3cade2f3d98a7fcfd36fcb0d743f5ed5cdffb119
tree74e6333f84e32d38ed38fb8567d9869b5d2f3b55
parent71e140b57151425829f87a0aaaa87636860dd7d2
ipw2x00: track time using boottime

The ipw2x00 driver family uses get_seconds() to read the current time
for various purposes. This function is deprecated because of the 32-bit
time_t overflow, and it can cause unexpected behavior when the time
changes due to settimeofday() calls or leap second updates.

In many cases, we want to use monotonic time instead, however ipw2x00
explicitly tracks the time spent in suspend, so this changes the
driver over to use ktime_get_boottime_seconds(), which is slightly
slower, but not used in a fastpath here.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Stanislav Yakovlev <stas.yakovlev@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/intel/ipw2x00/ipw2100.c
drivers/net/wireless/intel/ipw2x00/ipw2100.h
drivers/net/wireless/intel/ipw2x00/ipw2200.c
drivers/net/wireless/intel/ipw2x00/ipw2200.h