summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann2017-11-27 12:49:51 +0100
committerKalle Valo2017-12-07 15:23:16 +0100
commitdafa420360129781744ef48736a6dbed8f622077 (patch)
tree45d6f4730d21cc9febf0ec2185feb959e75a4c53
parentath6kl: remove redundant variable ies_len (diff)
downloadkernel-qcow2-linux-dafa420360129781744ef48736a6dbed8f622077.tar.gz
kernel-qcow2-linux-dafa420360129781744ef48736a6dbed8f622077.tar.xz
kernel-qcow2-linux-dafa420360129781744ef48736a6dbed8f622077.zip
ath10k: use 64-bit crash dump timestamps
The dump format uses 64-bit timestamps already, but calling getnstimeofday() only returns a 32-bit number on 32-bit architectures, so that will overflow in y2038. This changes it to use ktime_get_real_ts64() instead. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r--drivers/net/wireless/ath/ath10k/core.h2
-rw-r--r--drivers/net/wireless/ath/ath10k/debug.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 643041ef3271..dd3c6c63aae1 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -463,7 +463,7 @@ struct ath10k_fw_crash_data {
bool crashed_since_read;
guid_t guid;
- struct timespec timestamp;
+ struct timespec64 timestamp;
__le32 registers[REG_DUMP_COUNT_QCA988X];
struct ath10k_ce_crash_data ce_crash_data[CE_COUNT_MAX];
};
diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c
index df514507d3f1..66498e3c0f91 100644
--- a/drivers/net/wireless/ath/ath10k/debug.c
+++ b/drivers/net/wireless/ath/ath10k/debug.c
@@ -720,7 +720,7 @@ ath10k_debug_get_new_fw_crash_data(struct ath10k *ar)
crash_data->crashed_since_read = true;
guid_gen(&crash_data->guid);
- getnstimeofday(&crash_data->timestamp);
+ ktime_get_real_ts64(&crash_data->timestamp);
return crash_data;
}