From 76036f10e7b84927553ebda8d57ef3337b5cc927 Mon Sep 17 00:00:00 2001 From: Alan Chen Date: Mon, 11 Nov 2019 13:22:34 -0800 Subject: [PATCH] qcacmn: Add conditional macro for arch_counter_get_cntvct() Kernel 5.2 onwards calls __arch_counter_get_cntvct() instead of arch_counter_get_cntvct(). Add conditional preprocessor directive to use the appropriate function call for the correct kernel version. Change-Id: I86041fdfd36f0c4522397f632910cdaa26780035 CRs-Fixed: 2558917 --- qdf/linux/src/i_qdf_time.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qdf/linux/src/i_qdf_time.h b/qdf/linux/src/i_qdf_time.h index 80d3b4663d42..7bde392a1450 100644 --- a/qdf/linux/src/i_qdf_time.h +++ b/qdf/linux/src/i_qdf_time.h @@ -265,7 +265,12 @@ static inline uint64_t __qdf_get_monotonic_boottime(void) * * Return: QTIMER(19.2 MHz) clock ticks */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 2, 0)) +static inline uint64_t __qdf_get_log_timestamp(void) +{ + return __arch_counter_get_cntvct(); +} +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)) static inline uint64_t __qdf_get_log_timestamp(void) { return arch_counter_get_cntvct();