From fac99d1b58d4c1e51e05364583a475a14ebe16bd Mon Sep 17 00:00:00 2001 From: Srinivas Girigowda Date: Wed, 15 Mar 2017 23:21:04 -0700 Subject: [PATCH] qcacld-3.0: UMAC: Remove support for WNI_CFG_LOG_LEVEL UMAC components uses its own logging level configuration, but now all the log level checks are handled in QDF. Hence remove the support for WNI_CFG_LOG_LEVEL. Change-Id: Ib1f47efe6a8f0113543d855ed2a05b86170b7675 CRs-Fixed: 2020798 --- core/mac/inc/ani_global.h | 1 - core/mac/inc/wni_cfg.h | 5 --- core/mac/src/cfg/cfgUtil/cfg.txt | 12 ----- core/mac/src/cfg/cfg_proc_msg.c | 20 +-------- core/mac/src/include/utils_api.h | 7 +-- core/mac/src/include/utils_global.h | 8 +--- .../sys/legacy/src/system/src/mac_init_api.c | 8 ---- .../src/sys/legacy/src/utils/src/log_api.c | 45 +------------------ .../src/sys/legacy/src/utils/src/utils_api.c | 5 +-- 9 files changed, 5 insertions(+), 106 deletions(-) diff --git a/core/mac/inc/ani_global.h b/core/mac/inc/ani_global.h index cedca6709a57..96f663a90235 100644 --- a/core/mac/inc/ani_global.h +++ b/core/mac/inc/ani_global.h @@ -908,7 +908,6 @@ typedef struct sAniSirGlobal { tAniSirLim lim; tAniSirSch sch; tAniSirSys sys; - tAniSirUtils utils; /* PAL/HDD handle */ tHddHandle hHdd; diff --git a/core/mac/inc/wni_cfg.h b/core/mac/inc/wni_cfg.h index ed599a35e3c6..d9106f084beb 100644 --- a/core/mac/inc/wni_cfg.h +++ b/core/mac/inc/wni_cfg.h @@ -102,7 +102,6 @@ enum { WNI_CFG_COUNTRY_CODE, WNI_CFG_11H_ENABLED, WNI_CFG_WT_CNF_TIMEOUT, - WNI_CFG_LOG_LEVEL, WNI_CFG_OLBC_DETECT_TIMEOUT, WNI_CFG_PROTECTION_ENABLED, WNI_CFG_11G_PROTECTION_ALWAYS, @@ -670,10 +669,6 @@ enum { #define WNI_CFG_WT_CNF_TIMEOUT_STAMAX 3000 #define WNI_CFG_WT_CNF_TIMEOUT_STADEF 1000 -#define WNI_CFG_LOG_LEVEL_STAMIN 0 -#define WNI_CFG_LOG_LEVEL_STAMAX 7 -#define WNI_CFG_LOG_LEVEL_STADEF 4 - #define WNI_CFG_OLBC_DETECT_TIMEOUT_STAMIN 1000 #define WNI_CFG_OLBC_DETECT_TIMEOUT_STAMAX 30000 #define WNI_CFG_OLBC_DETECT_TIMEOUT_STADEF 10000 diff --git a/core/mac/src/cfg/cfgUtil/cfg.txt b/core/mac/src/cfg/cfgUtil/cfg.txt index 85071b968781..a85de0bed0ed 100644 --- a/core/mac/src/cfg/cfgUtil/cfg.txt +++ b/core/mac/src/cfg/cfgUtil/cfg.txt @@ -1399,18 +1399,6 @@ HAL #ENUM OFF 0 #ENUM ON 1 -* -* Default LOG level -* - -WNI_CFG_LOG_LEVEL I 4 12 -V RW NP -NONE -0 7 4 -V RW NP -NONE -0 7 4 - * * OLBC detection timeout * diff --git a/core/mac/src/cfg/cfg_proc_msg.c b/core/mac/src/cfg/cfg_proc_msg.c index 5b74e20b8f27..799680754b58 100644 --- a/core/mac/src/cfg/cfg_proc_msg.c +++ b/core/mac/src/cfg/cfg_proc_msg.c @@ -371,11 +371,6 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = { WNI_CFG_WT_CNF_TIMEOUT_STAMIN, WNI_CFG_WT_CNF_TIMEOUT_STAMAX, WNI_CFG_WT_CNF_TIMEOUT_STADEF}, - {WNI_CFG_LOG_LEVEL, - CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT, - WNI_CFG_LOG_LEVEL_STAMIN, - WNI_CFG_LOG_LEVEL_STAMAX, - WNI_CFG_LOG_LEVEL_STADEF}, {WNI_CFG_OLBC_DETECT_TIMEOUT, CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT, WNI_CFG_OLBC_DETECT_TIMEOUT_STAMIN, @@ -1738,7 +1733,6 @@ static void proc_dnld_rsp(tpAniSirGlobal pMac, uint16_t length, uint32_t *pParam uint32_t strSize, j; uint8_t pStr[CFG_MAX_STR_LEN]; tpCfgBinHdr pHdr; - uint32_t logLevel; struct scheduler_msg mmhMsg; /* First Dword must contain the AP or STA magic dword */ @@ -1921,12 +1915,6 @@ static void proc_dnld_rsp(tpAniSirGlobal pMac, uint16_t length, uint32_t *pParam } } - /* Set the default log level based on config */ - wlan_cfg_get_int(pMac, WNI_CFG_LOG_LEVEL, &logLevel); - for (i = 0; i < LOG_ENTRY_NUM; i++) - pMac->utils.gLogEvtLevel[i] = pMac->utils.gLogDbgLevel[i] = - logLevel; - /* Set status to READY */ pMac->cfg.gCfgStatus = CFG_SUCCESS; retVal = WNI_CFG_SUCCESS; @@ -2367,7 +2355,7 @@ process_cfg_download_req(tpAniSirGlobal pMac) uint8_t len; cfgstatic_string * pStrCfg; uint32_t bufStart, bufEnd; - uint32_t logLevel, retVal; + uint32_t retVal; uint32_t iCount = 0; uint32_t sCount = 0; @@ -2445,12 +2433,6 @@ process_cfg_download_req(tpAniSirGlobal pMac) } } - /* Set the default log level based on config */ - wlan_cfg_get_int(pMac, WNI_CFG_LOG_LEVEL, &logLevel); - for (i = 0; i < LOG_ENTRY_NUM; i++) - pMac->utils.gLogEvtLevel[i] = pMac->utils.gLogDbgLevel[i] = - logLevel; - /* Set status to READY */ pMac->cfg.gCfgStatus = CFG_SUCCESS; retVal = WNI_CFG_SUCCESS; diff --git a/core/mac/src/include/utils_api.h b/core/mac/src/include/utils_api.h index 445b545c2eee..b98e724352a6 100644 --- a/core/mac/src/include/utils_api.h +++ b/core/mac/src/include/utils_api.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -61,11 +61,6 @@ extern uint32_t gPktAllocCnt, gPktFreeCnt; extern QDF_TRACE_LEVEL get_vos_debug_level(uint32_t debugLevel); -/* / Log initialization */ -extern tSirRetStatus log_init(tpAniSirGlobal); - -extern void log_deinit(tpAniSirGlobal); - extern tSirRetStatus cfg_init(tpAniSirGlobal); extern void cfg_de_init(tpAniSirGlobal); diff --git a/core/mac/src/include/utils_global.h b/core/mac/src/include/utils_global.h index db2f8547dcac..14e6c6a9df24 100644 --- a/core/mac/src/include/utils_global.h +++ b/core/mac/src/include/utils_global.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2012, 2014 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2012, 2014, 2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -47,10 +47,4 @@ #define LOG_LAST_MODULE_ID SIR_LAST_MODULE_ID #define LOG_ENTRY_NUM (LOG_LAST_MODULE_ID - LOG_FIRST_MODULE_ID + 1) -typedef struct sAniSirUtils { - uint32_t gLogEvtLevel[LOG_ENTRY_NUM]; - uint32_t gLogDbgLevel[LOG_ENTRY_NUM]; - -} tAniSirUtils, *tpAniSirUtils; - #endif diff --git a/core/mac/src/sys/legacy/src/system/src/mac_init_api.c b/core/mac/src/sys/legacy/src/system/src/mac_init_api.c index 8694d5a3ae66..c7500dcbe1d3 100644 --- a/core/mac/src/sys/legacy/src/system/src/mac_init_api.c +++ b/core/mac/src/sys/legacy/src/system/src/mac_init_api.c @@ -142,12 +142,6 @@ tSirRetStatus mac_open(struct wlan_objmgr_psoc *psoc, tHalHandle *pHalHandle, *pHalHandle = (tHalHandle) p_mac; { - /* Call various PE (and other layer init here) */ - if (eSIR_SUCCESS != log_init(p_mac)) { - qdf_mem_free(p_mac); - return eSIR_FAILURE; - } - /* Call routine to initialize CFG data structures */ if (eSIR_SUCCESS != cfg_init(p_mac)) { qdf_mem_free(p_mac); @@ -191,8 +185,6 @@ tSirRetStatus mac_close(tHalHandle hHal) /* Call routine to free-up all CFG data structures */ cfg_de_init(pMac); - log_deinit(pMac); - wlan_objmgr_psoc_release_ref(pMac->psoc, WLAN_LEGACY_MAC_ID); pMac->psoc = NULL; /* Finally, de-allocate the global MAC datastructure: */ diff --git a/core/mac/src/sys/legacy/src/utils/src/log_api.c b/core/mac/src/sys/legacy/src/utils/src/log_api.c index cd16d38631ae..22e8eac23f3f 100644 --- a/core/mac/src/sys/legacy/src/utils/src/log_api.c +++ b/core/mac/src/sys/legacy/src/utils/src/log_api.c @@ -51,47 +51,6 @@ #include #endif -/* --------------------------------------------------------------------- */ -/** - * log_init() - * - * FUNCTION: - * This function is called to prepare the logging utility. - * - * LOGIC: - * - * ASSUMPTIONS: - * None. - * - * NOTE: - * - * @param tpAniSirGlobal Sirius software parameter strucutre pointer - * @return None - */ -tSirRetStatus log_init(tpAniSirGlobal pMac) -{ - uint32_t i; - - /* Add code to initialize debug level from CFG module */ - /* For now, enable all logging */ - for (i = 0; i < LOG_ENTRY_NUM; i++) { -#ifdef SIR_DEBUG - pMac->utils.gLogEvtLevel[i] = pMac->utils.gLogDbgLevel[i] = - LOG1; -#else - pMac->utils.gLogEvtLevel[i] = pMac->utils.gLogDbgLevel[i] = - LOGW; -#endif - } - return eSIR_SUCCESS; - -} /*** log_init() ***/ - -void log_deinit(tpAniSirGlobal pMac) -{ - return; -} - /** * log_dbg() * @@ -189,7 +148,5 @@ void log_debug(tpAniSirGlobal pMac, uint8_t modId, uint32_t debugLevel, QDF_TRACE(qdf_module_id, qdf_debug_level, "%s", logBuffer); /* The caller must check loglevel */ - QDF_ASSERT((debugLevel <= - pMac->utils.gLogDbgLevel[LOG_INDEX_FOR_MODULE(modId)]) - && (LOGP != debugLevel)); + QDF_ASSERT((LOGP != debugLevel)); } /*** end log_debug() ***/ diff --git a/core/mac/src/sys/legacy/src/utils/src/utils_api.c b/core/mac/src/sys/legacy/src/utils/src/utils_api.c index 524bbd217fd6..ed351bd69c82 100644 --- a/core/mac/src/sys/legacy/src/utils/src/utils_api.c +++ b/core/mac/src/sys/legacy/src/utils/src/utils_api.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2014, 2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -64,9 +64,6 @@ sir_dump_buf(tpAniSirGlobal pMac, uint8_t modId, uint32_t level, uint8_t *buf, { uint32_t i; - if (level > pMac->utils.gLogDbgLevel[LOG_INDEX_FOR_MODULE(modId)]) - return; - log_dbg(pMac, modId, level, FL("Dumping %d bytes in host order\n"), size);