qcacld-3.0: Record log timestamp type

Log timestamp can come from Qtimer or the system timer.
Record the source in a global variable that will be dumped
with the logs.

Change-Id: Ib168cfdc874426e48b12aac89f00d81ffe9e7fa6
CRs-Fixed: 940773
diff --git a/core/cdf/inc/cdf_time.h b/core/cdf/inc/cdf_time.h
index 6f5d1f5..58314c1 100644
--- a/core/cdf/inc/cdf_time.h
+++ b/core/cdf/inc/cdf_time.h
@@ -125,6 +125,24 @@
 /* Check if _a atleast as recent as _b, if not later */
 #define cdf_system_time_after_eq(_a, _b)    __cdf_system_time_after_eq(_a, _b)
 
+/**
+ * enum cdf_timestamp_unit - what unit the cdf timestamp is in
+ * @KERNEL_LOG: boottime time in uS (micro seconds)
+ * @KERNEL_LOG: QTIME in (1/19200)S
+ *
+ * This enum is used to distinguish which timer source is used.
+ */
+enum cdf_timestamp_unit {
+	KERNEL_LOG,
+	QTIMER,
+};
+
+#ifdef QCA_WIFI_3_0_ADRASTEA
+#define CDF_LOG_TIMESTAMP_UNIT QTIMER
+#else
+#define CDF_LOG_TIMESTAMP_UNIT KERNEL_LOG
+#endif
+
 #ifdef QCA_WIFI_3_0_ADRASTEA
 /**
  * cdf_get_log_timestamp() - get time stamp for logging
diff --git a/core/cdf/src/cdf_trace.c b/core/cdf/src/cdf_trace.c
index dfacdd4..7982d65 100644
--- a/core/cdf/src/cdf_trace.c
+++ b/core/cdf/src/cdf_trace.c
@@ -43,6 +43,8 @@
 
 #define CDF_TRACE_BUFFER_SIZE (512)
 
+enum cdf_timestamp_unit cdf_log_timestamp_type = CDF_LOG_TIMESTAMP_UNIT;
+
 /* macro to map cdf trace levels into the bitmask */
 #define CDF_TRACE_LEVEL_TO_MODULE_BITMASK(_level) ((1 << (_level)))