From 04507d3cf4a07f2334fa92bfe04b26188171521b Mon Sep 17 00:00:00 2001 From: Houston Hoffman Date: Tue, 17 Nov 2015 21:30:21 -0800 Subject: [PATCH] qcacld-3.0: Route logging through CDF_TRACE AR_print and cdf_print macros were not logging to the driver log. Change-Id: I11bc86f6c8ee91866c8e27903eaa15966111ce62 CRs-Fixed: 940770 --- core/cdf/inc/cdf_types.h | 9 +++++---- uapi/linux/osapi_linux.h | 29 +++++------------------------ 2 files changed, 10 insertions(+), 28 deletions(-) diff --git a/core/cdf/inc/cdf_types.h b/core/cdf/inc/cdf_types.h index 49099450ce..27151417bd 100644 --- a/core/cdf/inc/cdf_types.h +++ b/core/cdf/inc/cdf_types.h @@ -200,10 +200,6 @@ typedef bool (*cdf_irqlocked_func_t)(void *); /* Prototype of timer function */ typedef void (*cdf_softirq_timer_func_t)(void *); -#define cdf_print __cdf_print -#define cdf_vprint __cdf_vprint -#define cdf_snprint __cdf_snprint - #define cdf_offsetof(type, field) offsetof(type, field) /** @@ -264,6 +260,11 @@ typedef enum { CDF_MODULE_ID_MAX } CDF_MODULE_ID; +#define cdf_print(args...) \ + CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_ERROR, ## args) +#define cdf_vprint __cdf_vprint +#define cdf_snprint __cdf_snprint + /** * typedef enum tCDF_CON_MODE - Concurrency role. * diff --git a/uapi/linux/osapi_linux.h b/uapi/linux/osapi_linux.h index e0420bc12e..4fa05bbb57 100644 --- a/uapi/linux/osapi_linux.h +++ b/uapi/linux/osapi_linux.h @@ -71,31 +71,12 @@ #define A_MEMSET(addr, value, size) memset((addr), (value), (size)) #define A_MEMCMP(addr1, addr2, len) memcmp((addr1), (addr2), (len)) -#if defined(ANDROID_ENV) && defined(CONFIG_ANDROID_LOGGER) -extern unsigned int enablelogcat; -extern int android_logger_lv(void *module, int mask); -enum logidx { LOG_MAIN_IDX = 0 }; -extern int logger_write(const enum logidx idx, - const unsigned char prio, - const char __kernel *const tag, - const char __kernel *const fmt, ...); -#define A_ANDROID_PRINTF(mask, module, tags, args ...) do { \ - if (enablelogcat) \ - logger_write(LOG_MAIN_IDX, android_logger_lv(module, mask), tags, args); \ - else \ - printk(KERN_ALERT args); \ -} while (0) -#ifdef DEBUG -#define A_LOGGER_MODULE_NAME(x) # x #define A_LOGGER(mask, mod, args ...) \ - A_ANDROID_PRINTF(mask, &GET_ATH_MODULE_DEBUG_VAR_NAME(mod), "ar6k_" A_LOGGER_MODULE_NAME(mod), args); -#endif -#define A_PRINTF(args ...) A_ANDROID_PRINTF(ATH_DEBUG_INFO, NULL, "ar6k_driver", args) -#else -#define A_LOGGER(mask, mod, args ...) printk(args) -#define A_PRINTF(args ...) printk(args) -#endif /* ANDROID */ -#define A_PRINTF_LOG(args ...) printk(args) + CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_ERROR, ## args) +#define A_PRINTF(args ...) \ + CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_ERROR, ## args) +#define A_PRINTF_LOG(args ...) \ + CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_ERROR, ## args) #define A_SNPRINTF(buf, len, args ...) snprintf (buf, len, args) /*