Эх сурвалжийг харах

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
Srinivas Girigowda 8 жил өмнө
parent
commit
fac99d1b58

+ 0 - 1
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;

+ 0 - 5
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

+ 0 - 12
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
 *

+ 1 - 19
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;

+ 1 - 6
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);
 

+ 1 - 7
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

+ 0 - 8
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: */

+ 1 - 44
core/mac/src/sys/legacy/src/utils/src/log_api.c

@@ -51,47 +51,6 @@
 #include <linux/kernel.h>
 #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() ***/

+ 1 - 4
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);