ath10k: use 64-bit crash dump timestamps
authorArnd Bergmann <arnd@arndb.de>
Mon, 27 Nov 2017 11:49:51 +0000 (12:49 +0100)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 7 Dec 2017 14:23:16 +0000 (16:23 +0200)
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>
drivers/net/wireless/ath/ath10k/core.h
drivers/net/wireless/ath/ath10k/debug.c

index 643041ef3271cc75b7a1c964007566a606ff0bd9..dd3c6c63aae17230fe67e07e836f895af92f15e5 100644 (file)
@@ -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];
 };
index df514507d3f12d259161a047ef9b85a3a7a0e31f..66498e3c0f915e9408f740c0d2a949179a2689fd 100644 (file)
@@ -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;
 }