diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-06-18 18:11:16 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-06-27 19:10:25 +0300 |
commit | 3cade2f3d98a7fcfd36fcb0d743f5ed5cdffb119 (patch) | |
tree | 74e6333f84e32d38ed38fb8567d9869b5d2f3b55 /drivers/net/wireless/intel/ipw2x00/ipw2100.h | |
parent | 71e140b57151425829f87a0aaaa87636860dd7d2 (diff) | |
download | linux-3cade2f3d98a7fcfd36fcb0d743f5ed5cdffb119.tar.xz |
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>
Diffstat (limited to 'drivers/net/wireless/intel/ipw2x00/ipw2100.h')
-rw-r--r-- | drivers/net/wireless/intel/ipw2x00/ipw2100.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2100.h b/drivers/net/wireless/intel/ipw2x00/ipw2100.h index ce3e35f6b60f..8c11c7fa2eef 100644 --- a/drivers/net/wireless/intel/ipw2x00/ipw2100.h +++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.h @@ -491,7 +491,7 @@ struct ipw2100_priv { /* Statistics */ int resets; - int reset_backoff; + time64_t reset_backoff; /* Context */ u8 essid[IW_ESSID_MAX_SIZE]; @@ -500,8 +500,8 @@ struct ipw2100_priv { u8 channel; int last_mode; - unsigned long connect_start; - unsigned long last_reset; + time64_t connect_start; + time64_t last_reset; u32 channel_mask; u32 fatal_error; @@ -581,9 +581,9 @@ struct ipw2100_priv { int user_requested_scan; - /* Track time in suspend */ - unsigned long suspend_at; - unsigned long suspend_time; + /* Track time in suspend, using CLOCK_BOOTTIME */ + time64_t suspend_at; + time64_t suspend_time; u32 interrupts; int tx_interrupts; |