summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinay Krishna Eranna <c_veran@qti.qualcomm.com>2014-07-04 12:37:15 +0530
committerAkash Patel <c_akashp@qca.qualcomm.com>2014-07-14 17:43:37 -0700
commit3f16166ffbd1aec4df97128446b625fd47314942 (patch)
treeae418b689c7de57adcb050f0d5241a8e40e9e77d
parentb1f39598f1a1530d2b8a12e1218cece36df3b869 (diff)
cld:wlan: Logging Infrastructure 2/2.
Enhance driver to send the driver log messages to the userspace app. This helps in enabling more log levels in driver without any issue of device going into download mode due to excessive logging. Change-Id: Ie9378b5dfea28f241c97d873a22bf7cfbae66459 CRs-Fixed: 642081
-rw-r--r--CORE/HDD/inc/wlan_hdd_cfg.h26
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg.c23
-rwxr-xr-xCORE/HDD/src/wlan_hdd_main.c19
-rw-r--r--CORE/VOSS/inc/vos_types.h2
-rw-r--r--CORE/VOSS/src/vos_trace.c9
-rw-r--r--Kbuild5
6 files changed, 79 insertions, 5 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h
index 0aaea7aab02b..f0f9ae1128bb 100644
--- a/CORE/HDD/inc/wlan_hdd_cfg.h
+++ b/CORE/HDD/inc/wlan_hdd_cfg.h
@@ -2657,7 +2657,6 @@ This feature requires the dependent cfg.ini "gRoamPrefer5GHz" set to 1 */
#define CFG_ROAMING_OFFLOAD_MAX (1)
#define CFG_ROAMING_OFFLOAD_DEFAULT (0)
#endif
-
#ifdef IPA_UC_OFFLOAD
#define CFG_IPA_UC_OFFLOAD_ENABLED_NAME "IpaUcOffloadEnabled"
#define CFG_IPA_UC_OFFLOAD_ENABLED_MIN ( 0 )
@@ -2684,6 +2683,25 @@ This feature requires the dependent cfg.ini "gRoamPrefer5GHz" set to 1 */
#define CFG_IPA_UC_TX_PARTITION_BASE_MAX ( 9000 )
#define CFG_IPA_UC_TX_PARTITION_BASE_DEFAULT ( 3000 )
#endif /* IPA_UC_OFFLOAD */
+#ifdef WLAN_LOGGING_SOCK_SVC_ENABLE
+/* Enable WLAN Logging to app space */
+#define CFG_WLAN_LOGGING_SUPPORT_NAME "wlanLoggingEnable"
+#define CFG_WLAN_LOGGING_SUPPORT_ENABLE ( 1 )
+#define CFG_WLAN_LOGGING_SUPPORT_DISABLE ( 0 )
+#define CFG_WLAN_LOGGING_SUPPORT_DEFAULT ( 1 )
+
+/* Enable FATAL and ERROR logs for kmsg console */
+#define CFG_WLAN_LOGGING_FE_CONSOLE_SUPPORT_NAME "wlanLoggingFEToConsole"
+#define CFG_WLAN_LOGGING_FE_CONSOLE_SUPPORT_ENABLE ( 1 )
+#define CFG_WLAN_LOGGING_FE_CONSOLE_SUPPORT_DISABLE ( 0 )
+#define CFG_WLAN_LOGGING_FE_CONSOLE_SUPPORT_DEFAULT ( 0 )
+
+/* Number of buffers to be used for WLAN logging */
+#define CFG_WLAN_LOGGING_NUM_BUF_NAME "wlanLoggingNumBuf"
+#define CFG_WLAN_LOGGING_NUM_BUF_MIN ( 8 )
+#define CFG_WLAN_LOGGING_NUM_BUF_MAX ( 64 )
+#define CFG_WLAN_LOGGING_NUM_BUF_DEFAULT ( 32 )
+#endif /* WLAN_LOGGING_SOCK_SVC_ENABLE */
/*---------------------------------------------------------------------------
Type declarations
@@ -3267,6 +3285,12 @@ typedef struct
v_U32_t IpaUcRxIndRingCount;
v_U32_t IpaUcTxPartitionBase;
#endif /* IPA_UC_OFFLOAD */
+#ifdef WLAN_LOGGING_SOCK_SVC_ENABLE
+ /* WLAN Logging */
+ v_U32_t wlanLoggingEnable;
+ v_U32_t wlanLoggingFEToConsole;
+ v_U32_t wlanLoggingNumBuf;
+#endif /* WLAN_LOGGING_SOCK_SVC_ENABLE */
} hdd_config_t;
#ifdef WLAN_FEATURE_MBSSID
diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c
index 9bade3404a5a..e7fff767f9df 100644
--- a/CORE/HDD/src/wlan_hdd_cfg.c
+++ b/CORE/HDD/src/wlan_hdd_cfg.c
@@ -3660,7 +3660,6 @@ REG_TABLE_ENTRY g_registry_table[] =
CFG_REORDER_OFFLOAD_SUPPORT_MIN,
CFG_REORDER_OFFLOAD_SUPPORT_MAX ),
#endif
-
#ifdef IPA_UC_OFFLOAD
REG_VARIABLE( CFG_IPA_UC_OFFLOAD_ENABLED_NAME, WLAN_PARAM_Integer,
hdd_config_t, IpaUcOffloadEnabled,
@@ -3697,6 +3696,28 @@ REG_TABLE_ENTRY g_registry_table[] =
CFG_IPA_UC_TX_PARTITION_BASE_MIN,
CFG_IPA_UC_TX_PARTITION_BASE_MAX ),
#endif /* IPA_UC_OFFLOAD */
+#ifdef WLAN_LOGGING_SOCK_SVC_ENABLE
+ REG_VARIABLE(CFG_WLAN_LOGGING_SUPPORT_NAME, WLAN_PARAM_Integer,
+ hdd_config_t, wlanLoggingEnable,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_WLAN_LOGGING_SUPPORT_DEFAULT,
+ CFG_WLAN_LOGGING_SUPPORT_DISABLE,
+ CFG_WLAN_LOGGING_SUPPORT_ENABLE ),
+
+ REG_VARIABLE(CFG_WLAN_LOGGING_FE_CONSOLE_SUPPORT_NAME, WLAN_PARAM_Integer,
+ hdd_config_t, wlanLoggingFEToConsole,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_WLAN_LOGGING_FE_CONSOLE_SUPPORT_DEFAULT,
+ CFG_WLAN_LOGGING_FE_CONSOLE_SUPPORT_DISABLE,
+ CFG_WLAN_LOGGING_FE_CONSOLE_SUPPORT_ENABLE ),
+
+ REG_VARIABLE(CFG_WLAN_LOGGING_NUM_BUF_NAME, WLAN_PARAM_Integer,
+ hdd_config_t, wlanLoggingNumBuf,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_WLAN_LOGGING_NUM_BUF_DEFAULT,
+ CFG_WLAN_LOGGING_NUM_BUF_MIN,
+ CFG_WLAN_LOGGING_NUM_BUF_MAX ),
+#endif /* WLAN_LOGGING_SOCK_SVC_ENABLE */
};
#ifdef WLAN_FEATURE_MBSSID
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 66614a23387e..d7f8ac6423aa 100755
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -75,6 +75,7 @@
#include <wlan_hdd_cfg.h>
#include <wlan_ptt_sock_svc.h>
#include <dbglog_host.h>
+#include <wlan_logging_sock_svc.h>
#include <wlan_hdd_wowl.h>
#include <wlan_hdd_misc.h>
#include <wlan_hdd_wext.h>
@@ -10507,6 +10508,12 @@ void hdd_wlan_exit(hdd_context_t *pHddCtx)
#endif /* WLAN_KD_READY_NOTIFIER */
+#ifdef WLAN_LOGGING_SOCK_SVC_ENABLE
+ if (pHddCtx->cfg_ini->wlanLoggingEnable) {
+ wlan_logging_sock_deactivate_svc();
+ }
+#endif
+
hdd_close_all_adapters( pHddCtx );
#ifdef IPA_OFFLOAD
@@ -12008,6 +12015,18 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
goto err_nl_srv;
}
+#ifdef WLAN_LOGGING_SOCK_SVC_ENABLE
+ if (pHddCtx->cfg_ini->wlanLoggingEnable) {
+ if (wlan_logging_sock_activate_svc(
+ pHddCtx->cfg_ini->wlanLoggingFEToConsole,
+ pHddCtx->cfg_ini->wlanLoggingNumBuf)) {
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ "%s: wlan_logging_sock_activate_svc failed", __func__);
+ goto err_nl_srv;
+ }
+ }
+#endif
+
hdd_register_mcast_bcast_filter(pHddCtx);
if (VOS_STA_SAP_MODE != hdd_get_conparam())
{
diff --git a/CORE/VOSS/inc/vos_types.h b/CORE/VOSS/inc/vos_types.h
index 83f55af90358..18185531cd1d 100644
--- a/CORE/VOSS/inc/vos_types.h
+++ b/CORE/VOSS/inc/vos_types.h
@@ -105,6 +105,8 @@ typedef enum
VOS_MODULE_ID_TL = 1,
VOS_MODULE_ID_WDI = 2,
// 3 & 4 are unused for historical purposes
+ VOS_MODULE_ID_RSV3 = 3,
+ VOS_MODULE_ID_RSV4 = 4,
VOS_MODULE_ID_HDD = 5,
VOS_MODULE_ID_SME = 6,
VOS_MODULE_ID_PE = 7,
diff --git a/CORE/VOSS/src/vos_trace.c b/CORE/VOSS/src/vos_trace.c
index 3cfc97c72d2e..3a55eec18e9d 100644
--- a/CORE/VOSS/src/vos_trace.c
+++ b/CORE/VOSS/src/vos_trace.c
@@ -60,6 +60,8 @@
------------------------------------------------------------------------*/
#include <vos_trace.h>
#include <aniGlobal.h>
+#include <wlan_logging_sock_svc.h>
+
/*--------------------------------------------------------------------------
Preprocessor definitions and constants
------------------------------------------------------------------------*/
@@ -96,7 +98,7 @@ moduleTraceInfo gVosTraceInfo[ VOS_MODULE_ID_MAX ] =
{
[VOS_MODULE_ID_BAP] = { VOS_DEFAULT_TRACE_LEVEL, "BAP" },
[VOS_MODULE_ID_TL] = { VOS_DEFAULT_TRACE_LEVEL, "TL " },
- [VOS_MODULE_ID_WDI] = { VOS_DEFAULT_TRACE_LEVEL, "WDI"},
+ [VOS_MODULE_ID_WDI] = { VOS_DEFAULT_TRACE_LEVEL, "WDI" },
[VOS_MODULE_ID_HDD] = { VOS_DEFAULT_TRACE_LEVEL, "HDD" },
[VOS_MODULE_ID_SME] = { VOS_DEFAULT_TRACE_LEVEL, "SME" },
[VOS_MODULE_ID_PE] = { VOS_DEFAULT_TRACE_LEVEL, "PE " },
@@ -352,7 +354,12 @@ void vos_trace_msg( VOS_MODULE_ID module, VOS_TRACE_LEVEL level, char *strFormat
kmsgwconnBuffWrite(strBuffer);
spin_unlock_irqrestore (&gVosSpinLock, irq_flag);
#endif
+
+#ifdef WLAN_LOGGING_SOCK_SVC_ENABLE
+ wlan_log_to_user(level, (char *)strBuffer, strlen(strBuffer));
+#else
pr_err("%s\n", strBuffer);
+#endif
}
va_end(val);
}
diff --git a/Kbuild b/Kbuild
index 59138bf2313e..0238e1d5dca6 100644
--- a/Kbuild
+++ b/Kbuild
@@ -1010,8 +1010,9 @@ CDEFINES := -DANI_LITTLE_BYTE_ENDIAN \
-DQCA_SUPPORT_TX_THROTTLE \
-DWMI_INTERFACE_EVENT_LOGGING \
-DATH_SUPPORT_WAPI \
- -DFEATURE_WLAN_EXTSCAN \
- -DWLAN_FEATURE_LINK_LAYER_STATS
+ -DWLAN_FEATURE_LINK_LAYER_STATS \
+ -DWLAN_LOGGING_SOCK_SVC_ENABLE \
+ -DFEATURE_WLAN_EXTSCAN
ifeq ($(CONFIG_QCA_WIFI_SDIO), 1)
CDEFINES += -DCONFIG_HL_SUPPORT \