Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dafa4203 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Kalle Valo
Browse files

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: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent d786ebb2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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];
};
+1 −1
Original line number Diff line number Diff line
@@ -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;
}