Browse Source

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
Houston Hoffman 9 years ago
parent
commit
ab1ce349fd
2 changed files with 20 additions and 0 deletions
  1. 18 0
      core/cdf/inc/cdf_time.h
  2. 2 0
      core/cdf/src/cdf_trace.c

+ 18 - 0
core/cdf/inc/cdf_time.h

@@ -125,6 +125,24 @@ static inline void cdf_mdelay(int msecs)
 /* 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

+ 2 - 0
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)))