From e22977fdc08a4879f2903d4d591dd7b0cef80b73 Mon Sep 17 00:00:00 2001 From: Houston Hoffman Date: Tue, 17 Nov 2015 23:12:57 -0800 Subject: [PATCH] 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 --- core/cdf/inc/cdf_time.h | 18 ++++++++++++++++++ core/cdf/src/cdf_trace.c | 2 ++ 2 files changed, 20 insertions(+) diff --git a/core/cdf/inc/cdf_time.h b/core/cdf/inc/cdf_time.h index 6f5d1f5214df..58314c18106a 100644 --- a/core/cdf/inc/cdf_time.h +++ b/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 diff --git a/core/cdf/src/cdf_trace.c b/core/cdf/src/cdf_trace.c index dfacdd45cb20..7982d6518d58 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)))