Parcourir la source

qcacmn:: Change QTIMER API as per 4.4 kernel

Use arch_counter_get_cntvct API for QTIMER API on
Kernel 4.4.

CRs-Fixed: 999964
Change-Id: Ia28c6759cfecfdcc7bd938089b3198eac7dcd961
Hardik Kantilal Patel il y a 9 ans
Parent
commit
732caef504
1 fichiers modifiés avec 7 ajouts et 0 suppressions
  1. 7 0
      qdf/linux/src/i_qdf_time.h

+ 7 - 0
qdf/linux/src/i_qdf_time.h

@@ -204,10 +204,17 @@ 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))
+static inline uint64_t __qdf_get_log_timestamp(void)
+{
+	return arch_counter_get_cntvct();
+}
+#else
 static inline uint64_t __qdf_get_log_timestamp(void)
 {
 	return arch_counter_get_cntpct();
 }
+#endif /* LINUX_VERSION_CODE */
 #else
 
 /**