浏览代码

qcacld-3.0: Reduce the log spam in lim

Move the logs to appropriate log levels to reduce
the log spam in lim_roam_timer_utils.c and
lim_send_sme_rsp_messages.c

Change-Id: Iaf0a163e2031482388b6356bb236b3fbdd18997e
CRs-Fixed: 1093093
Nishank Aggarwal 8 年之前
父节点
当前提交
d5941bb9c6
共有 2 个文件被更改,包括 48 次插入50 次删除
  1. 14 15
      core/mac/src/pe/lim/lim_roam_timer_utils.c
  2. 34 35
      core/mac/src/pe/lim/lim_send_sme_rsp_messages.c

+ 14 - 15
core/mac/src/pe/lim/lim_roam_timer_utils.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -42,7 +42,7 @@ uint32_t lim_create_timers_host_roam(tpAniSirGlobal mac_ctx)
 	uint32_t cfg_value;
 	if (wlan_cfg_get_int(mac_ctx, WNI_CFG_REASSOCIATION_FAILURE_TIMEOUT,
 			     &cfg_value) != eSIR_SUCCESS)
-		lim_log(mac_ctx, LOGP,
+		lim_log(mac_ctx, LOGW,
 			FL("could not retrieve ReassocFailureTimeout value"));
 
 	cfg_value = SYS_MS_TO_TICKS(cfg_value);
@@ -51,7 +51,7 @@ uint32_t lim_create_timers_host_roam(tpAniSirGlobal mac_ctx)
 			&mac_ctx->lim.limTimers.gLimReassocFailureTimer,
 		    "REASSOC FAILURE TIMEOUT", lim_assoc_failure_timer_handler,
 		    LIM_REASSOC, cfg_value, 0, TX_NO_ACTIVATE) != TX_SUCCESS) {
-		lim_log(mac_ctx, LOGP, FL("failed to create Reassoc timer"));
+		lim_log(mac_ctx, LOGE, FL("failed to create Reassoc timer"));
 		return TX_TIMER_ERROR;
 	}
 	cfg_value = 1000;
@@ -61,7 +61,7 @@ uint32_t lim_create_timers_host_roam(tpAniSirGlobal mac_ctx)
 			"FT PREAUTH RSP TIMEOUT",
 			lim_timer_handler, SIR_LIM_FT_PREAUTH_RSP_TIMEOUT,
 			cfg_value, 0, TX_NO_ACTIVATE) != TX_SUCCESS) {
-		lim_log(mac_ctx, LOGP, FL("failed to create Join fail timer"));
+		lim_log(mac_ctx, LOGE, FL("failed to create Join fail timer"));
 		goto err_roam_timer;
 	}
 	return TX_SUCCESS;
@@ -111,30 +111,29 @@ void lim_deactivate_and_change_timer_host_roam(tpAniSirGlobal mac_ctx,
 	case eLIM_REASSOC_FAIL_TIMER:
 		if (tx_timer_deactivate
 			(&mac_ctx->lim.limTimers.gLimReassocFailureTimer) !=
-				TX_SUCCESS) {
-			lim_log(mac_ctx, LOGP,
+				TX_SUCCESS)
+			lim_log(mac_ctx, LOGW,
 				FL("unable to deactivate Reassoc fail timer"));
-		}
+
 		if (wlan_cfg_get_int(mac_ctx,
 				WNI_CFG_REASSOCIATION_FAILURE_TIMEOUT,
-				&val) != eSIR_SUCCESS) {
-			lim_log(mac_ctx, LOGP,
+				&val) != eSIR_SUCCESS)
+			lim_log(mac_ctx, LOGW,
 				FL("could not get ReassocFailureTimeout val"));
-		}
+
 		val = SYS_MS_TO_TICKS(val);
 		if (tx_timer_change
 			(&mac_ctx->lim.limTimers.gLimReassocFailureTimer, val,
-			 0) != TX_SUCCESS) {
-			lim_log(mac_ctx, LOGP,
+			 0) != TX_SUCCESS)
+			lim_log(mac_ctx, LOGW,
 				FL("unable to change Reassoc fail timer"));
-		}
 		break;
 
 	case eLIM_FT_PREAUTH_RSP_TIMER:
 		if (tx_timer_deactivate
 			(&mac_ctx->lim.limTimers.gLimFTPreAuthRspTimer) !=
 			TX_SUCCESS) {
-			lim_log(mac_ctx, LOGP,
+			lim_log(mac_ctx, LOGE,
 				FL("Unable to deactivate Preauth Fail timer"));
 			return;
 		}
@@ -143,7 +142,7 @@ void lim_deactivate_and_change_timer_host_roam(tpAniSirGlobal mac_ctx,
 		if (tx_timer_change(
 				&mac_ctx->lim.limTimers.gLimFTPreAuthRspTimer,
 				val, 0) != TX_SUCCESS) {
-			lim_log(mac_ctx, LOGP,
+			lim_log(mac_ctx, LOGE,
 				FL("Unable to change Join Failure timer"));
 			return;
 		}

+ 34 - 35
core/mac/src/pe/lim/lim_send_sme_rsp_messages.c

@@ -93,7 +93,7 @@ lim_send_sme_rsp(tpAniSirGlobal mac_ctx, uint16_t msg_type,
 	sme_rsp = qdf_mem_malloc(sizeof(tSirSmeRsp));
 	if (NULL == sme_rsp) {
 		/* Buffer not available. Log error */
-		QDF_TRACE(QDF_MODULE_ID_PE, LOGP,
+		QDF_TRACE(QDF_MODULE_ID_PE, LOGE,
 			FL("call to AllocateMemory failed for eWNI_SME_*_RSP"));
 		return;
 	}
@@ -152,7 +152,7 @@ lim_send_sme_roc_rsp(tpAniSirGlobal mac_ctx, uint16_t msg_type,
 
 	sme_rsp = qdf_mem_malloc(sizeof(struct sir_roc_rsp));
 	if (NULL == sme_rsp) {
-		QDF_TRACE(QDF_MODULE_ID_PE, LOGP,
+		QDF_TRACE(QDF_MODULE_ID_PE, LOGE,
 			FL("call to AllocateMemory failed for eWNI_SME_*_RSP"));
 		return;
 	}
@@ -457,7 +457,7 @@ lim_send_sme_join_reassoc_rsp(tpAniSirGlobal mac_ctx, uint16_t msg_type,
 		rsp_len = sizeof(tSirSmeJoinRsp);
 		sme_join_rsp = qdf_mem_malloc(rsp_len);
 		if (NULL == sme_join_rsp) {
-			lim_log(mac_ctx, LOGP,
+			lim_log(mac_ctx, LOGE,
 				FL("Mem Alloc fail - JOIN/REASSOC_RSP"));
 			return;
 		}
@@ -475,7 +475,7 @@ lim_send_sme_join_reassoc_rsp(tpAniSirGlobal mac_ctx, uint16_t msg_type,
 			sizeof(tSirSmeJoinRsp) - sizeof(uint8_t);
 		sme_join_rsp = qdf_mem_malloc(rsp_len);
 		if (NULL == sme_join_rsp) {
-			lim_log(mac_ctx, LOGP,
+			lim_log(mac_ctx, LOGE,
 				FL("MemAlloc fail - JOIN/REASSOC_RSP"));
 			return;
 		}
@@ -585,7 +585,7 @@ lim_send_sme_start_bss_rsp(tpAniSirGlobal pMac,
 		pSirSmeRsp = qdf_mem_malloc(size);
 		if (NULL == pSirSmeRsp) {
 			/* / Buffer not available. Log error */
-			lim_log(pMac, LOGP,
+			lim_log(pMac, LOGE,
 				FL
 					("call to AllocateMemory failed for eWNI_SME_START_BSS_RSP"));
 			return;
@@ -601,7 +601,7 @@ lim_send_sme_start_bss_rsp(tpAniSirGlobal pMac,
 		pSirSmeRsp = qdf_mem_malloc(size);
 		if (NULL == pSirSmeRsp) {
 			/* / Buffer not available. Log error */
-			lim_log(pMac, LOGP,
+			lim_log(pMac, LOGE,
 				FL
 					("call to AllocateMemory failed for eWNI_SME_START_BSS_RSP"));
 
@@ -623,7 +623,7 @@ lim_send_sme_start_bss_rsp(tpAniSirGlobal pMac,
 				    (pMac, &pSirSmeRsp->bssDescription.capabilityInfo,
 				    psessionEntry)
 			    != eSIR_SUCCESS)
-				lim_log(pMac, LOGP,
+				lim_log(pMac, LOGE,
 					FL
 						("could not retrieve Capabilities value"));
 
@@ -760,7 +760,7 @@ lim_post_sme_scan_rsp_message(tpAniSirGlobal pMac,
 
 	pSirSmeScanRsp = qdf_mem_malloc(sizeof(tSirSmeScanRsp));
 	if (NULL == pSirSmeScanRsp) {
-		lim_log(pMac, LOGP,
+		lim_log(pMac, LOGE,
 			FL("AllocateMemory failed for eWNI_SME_SCAN_RSP"));
 		return;
 	}
@@ -899,7 +899,7 @@ lim_send_sme_disassoc_ntf(tpAniSirGlobal pMac,
 		pSirSmeDisassocRsp = qdf_mem_malloc(sizeof(tSirSmeDisassocRsp));
 		if (NULL == pSirSmeDisassocRsp) {
 			/* Log error */
-			lim_log(pMac, LOGP, FL("Memory allocation failed"));
+			lim_log(pMac, LOGE, FL("Memory allocation failed"));
 			failure = true;
 			goto error;
 		}
@@ -981,7 +981,7 @@ lim_send_sme_disassoc_ntf(tpAniSirGlobal pMac,
 		pSirSmeDisassocInd = qdf_mem_malloc(sizeof(tSirSmeDisassocInd));
 		if (NULL == pSirSmeDisassocInd) {
 			/* Log error */
-			lim_log(pMac, LOGP, FL("Memory allocation failed"));
+			lim_log(pMac, LOGE, FL("Memory allocation failed"));
 			failure = true;
 			goto error;
 		}
@@ -1045,7 +1045,7 @@ lim_send_sme_disassoc_ind(tpAniSirGlobal pMac, tpDphHashNode pStaDs,
 
 	pSirSmeDisassocInd = qdf_mem_malloc(sizeof(tSirSmeDisassocInd));
 	if (NULL == pSirSmeDisassocInd) {
-		lim_log(pMac, LOGP,
+		lim_log(pMac, LOGE,
 			FL("AllocateMemory failed for eWNI_SME_DISASSOC_IND"));
 		return;
 	}
@@ -1102,7 +1102,7 @@ lim_send_sme_deauth_ind(tpAniSirGlobal pMac, tpDphHashNode pStaDs,
 
 	pSirSmeDeauthInd = qdf_mem_malloc(sizeof(tSirSmeDeauthInd));
 	if (NULL == pSirSmeDeauthInd) {
-		lim_log(pMac, LOGP,
+		lim_log(pMac, LOGE,
 			FL("AllocateMemory failed for eWNI_SME_DEAUTH_IND "));
 		return;
 	}
@@ -1176,7 +1176,7 @@ lim_send_sme_tdls_del_sta_ind(tpAniSirGlobal pMac, tpDphHashNode pStaDs,
 
 	pSirTdlsDelStaInd = qdf_mem_malloc(sizeof(tSirTdlsDelStaInd));
 	if (NULL == pSirTdlsDelStaInd) {
-		lim_log(pMac, LOGP,
+		lim_log(pMac, LOGE,
 			FL
 				("AllocateMemory failed for eWNI_SME_TDLS_DEL_STA_IND "));
 		return;
@@ -1236,7 +1236,7 @@ lim_send_sme_tdls_delete_all_peer_ind(tpAniSirGlobal pMac, tpPESession psessionE
 
 	pSirTdlsDelAllPeerInd = qdf_mem_malloc(sizeof(tSirTdlsDelAllPeerInd));
 	if (NULL == pSirTdlsDelAllPeerInd) {
-		lim_log(pMac, LOGP,
+		lim_log(pMac, LOGE,
 			FL
 				("AllocateMemory failed for eWNI_SME_TDLS_DEL_ALL_PEER_IND"));
 		return;
@@ -1286,7 +1286,7 @@ lim_send_sme_mgmt_tx_completion(tpAniSirGlobal pMac,
 	pSirMgmtTxCompletionInd =
 		qdf_mem_malloc(sizeof(tSirMgmtTxCompletionInd));
 	if (NULL == pSirMgmtTxCompletionInd) {
-		lim_log(pMac, LOGP,
+		lim_log(pMac, LOGE,
 			FL
 				("AllocateMemory failed for eWNI_SME_MGMT_FRM_TX_COMPLETION_IND"));
 		return;
@@ -1387,7 +1387,7 @@ lim_send_sme_deauth_ntf(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
 		pSirSmeDeauthRsp = qdf_mem_malloc(sizeof(tSirSmeDeauthRsp));
 		if (NULL == pSirSmeDeauthRsp) {
 			/* Log error */
-			lim_log(pMac, LOGP,
+			lim_log(pMac, LOGE,
 				FL
 					("call to AllocateMemory failed for eWNI_SME_DEAUTH_RSP"));
 
@@ -1458,7 +1458,7 @@ lim_send_sme_deauth_ntf(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
 		pSirSmeDeauthInd = qdf_mem_malloc(sizeof(tSirSmeDeauthInd));
 		if (NULL == pSirSmeDeauthInd) {
 			/* Log error */
-			lim_log(pMac, LOGP,
+			lim_log(pMac, LOGE,
 				FL
 					("call to AllocateMemory failed for eWNI_SME_DEAUTH_Ind"));
 
@@ -1580,7 +1580,7 @@ lim_send_sme_wm_status_change_ntf(tpAniSirGlobal mac_ctx,
 	MTRACE(mac_trace(mac_ctx, TRACE_CODE_TX_SME_MSG, session_id, msg.type));
 	if (eSIR_SUCCESS != lim_sys_process_mmh_msg_api(mac_ctx, &msg, ePROT)) {
 		qdf_mem_free(wm_status_change_ntf);
-		lim_log(mac_ctx, LOGP,
+		lim_log(mac_ctx, LOGE,
 			FL("lim_sys_process_mmh_msg_api failed"));
 	}
 
@@ -1625,7 +1625,7 @@ lim_send_sme_set_context_rsp(tpAniSirGlobal pMac,
 	pSirSmeSetContextRsp = qdf_mem_malloc(sizeof(tSirSmeSetContextRsp));
 	if (NULL == pSirSmeSetContextRsp) {
 		/* Log error */
-		lim_log(pMac, LOGP,
+		lim_log(pMac, LOGE,
 			FL
 				("call to AllocateMemory failed for SmeSetContextRsp"));
 
@@ -1702,7 +1702,7 @@ lim_send_sme_neighbor_bss_ind(tpAniSirGlobal pMac, tLimScanResultNode *pBssDescr
 
 	if (wlan_cfg_get_int(pMac, WNI_CFG_NEW_BSS_FOUND_IND, &val) !=
 	    eSIR_SUCCESS) {
-		lim_log(pMac, LOGP,
+		lim_log(pMac, LOGE,
 			FL("could not get NEIGHBOR_BSS_IND from CFG"));
 
 		return;
@@ -1723,7 +1723,7 @@ lim_send_sme_neighbor_bss_ind(tpAniSirGlobal pMac, tLimScanResultNode *pBssDescr
 	pNewBssInd = qdf_mem_malloc(val);
 	if (NULL == pNewBssInd) {
 		/* Log error */
-		lim_log(pMac, LOGP,
+		lim_log(pMac, LOGE,
 			FL
 				("call to AllocateMemory failed for eWNI_SME_NEIGHBOR_BSS_IND"));
 
@@ -1768,7 +1768,7 @@ lim_send_sme_addts_rsp(tpAniSirGlobal pMac, uint8_t rspReqd, uint32_t status,
 
 	rsp = qdf_mem_malloc(sizeof(tSirAddtsRsp));
 	if (NULL == rsp) {
-		lim_log(pMac, LOGP, FL("AllocateMemory failed for ADDTS_RSP"));
+		lim_log(pMac, LOGE, FL("AllocateMemory failed for ADDTS_RSP"));
 		return;
 	}
 
@@ -1807,7 +1807,7 @@ lim_send_sme_delts_rsp(tpAniSirGlobal pMac, tpSirDeltsReq delts, uint32_t status
 	tpSirDeltsRsp rsp;
 	struct scheduler_msg mmhMsg = {0};
 
-	lim_log(pMac, LOGW, "SendSmeDeltsRsp (aid %d, tsid %d, up %d) status %d",
+	lim_log(pMac, LOGD, "SendSmeDeltsRsp (aid %d, tsid %d, up %d) status %d",
 		delts->aid,
 		delts->req.tsinfo.traffic.tsid,
 		delts->req.tsinfo.traffic.userPrio, status);
@@ -1817,7 +1817,7 @@ lim_send_sme_delts_rsp(tpAniSirGlobal pMac, tpSirDeltsReq delts, uint32_t status
 	rsp = qdf_mem_malloc(sizeof(tSirDeltsRsp));
 	if (NULL == rsp) {
 		/* Log error */
-		lim_log(pMac, LOGP, FL("AllocateMemory failed for DELTS_RSP"));
+		lim_log(pMac, LOGE, FL("AllocateMemory failed for DELTS_RSP"));
 		return;
 	}
 
@@ -1861,13 +1861,13 @@ lim_send_sme_delts_ind(tpAniSirGlobal pMac, tpSirDeltsReqInfo delts, uint16_t ai
 	tpSirDeltsRsp rsp;
 	struct scheduler_msg mmhMsg = {0};
 
-	lim_log(pMac, LOGW, "SendSmeDeltsInd (aid %d, tsid %d, up %d)",
+	lim_log(pMac, LOGD, "SendSmeDeltsInd (aid %d, tsid %d, up %d)",
 		aid, delts->tsinfo.traffic.tsid, delts->tsinfo.traffic.userPrio);
 
 	rsp = qdf_mem_malloc(sizeof(tSirDeltsRsp));
 	if (NULL == rsp) {
 		/* Log error */
-		lim_log(pMac, LOGP, FL("AllocateMemory failed for DELTS_IND"));
+		lim_log(pMac, LOGE, FL("AllocateMemory failed for DELTS_IND"));
 		return;
 	}
 
@@ -1980,9 +1980,8 @@ void lim_send_sme_pe_ese_tsm_rsp(tpAniSirGlobal pMac,
 		/* Fill the Session Id */
 		pPeStats->sessionId = pPeSessionEntry->smeSessionId;
 	} else {
-		PELOGE(lim_log
-		       (pMac, LOGE, FL("Session not found for the Sta id(%d)"),
-		       pPeStats->staId);)
+		lim_log(pMac, LOGE, FL("Session not found for the Sta id(%d)"),
+		       pPeStats->staId);
 		qdf_mem_free(pPeStats->tsmStatsReq);
 		qdf_mem_free(pPeStats);
 		return;
@@ -2019,7 +2018,7 @@ lim_send_sme_ibss_peer_ind(tpAniSirGlobal pMac,
 
 	pNewPeerInd = qdf_mem_malloc(sizeof(tSmeIbssPeerInd) + beaconLen);
 	if (NULL == pNewPeerInd) {
-		PELOGE(lim_log(pMac, LOGE, FL("Failed to allocate memory"));)
+		lim_log(pMac, LOGE, FL("Failed to allocate memory"));
 		return;
 	}
 
@@ -2420,7 +2419,7 @@ void lim_send_sme_max_assoc_exceeded_ntf(tpAniSirGlobal pMac, tSirMacAddr peerMa
 
 	pSmeMaxAssocInd = qdf_mem_malloc(sizeof(tSmeMaxAssocInd));
 	if (NULL == pSmeMaxAssocInd) {
-		PELOGE(lim_log(pMac, LOGE, FL("Failed to allocate memory"));)
+		lim_log(pMac, LOGE, FL("Failed to allocate memory"));
 		return;
 	}
 	qdf_mem_copy((uint8_t *) pSmeMaxAssocInd->peer_mac.bytes,
@@ -2480,7 +2479,7 @@ lim_send_dfs_chan_sw_ie_update(tpAniSirGlobal pMac, tpPESession psessionEntry)
 
 	/* Update the beacon template and send to FW */
 	if (sch_set_fixed_beacon_fields(pMac, psessionEntry) != eSIR_SUCCESS) {
-		PELOGE(lim_log(pMac, LOGE, FL("Unable to set CSA IE in beacon"));)
+		lim_log(pMac, LOGE, FL("Unable to set CSA IE in beacon"));
 		return;
 	}
 
@@ -2520,7 +2519,7 @@ lim_send_sme_ap_channel_switch_resp(tpAniSirGlobal pMac,
 	pSmeSwithChnlParams = (tSwitchChannelParams *)
 			      qdf_mem_malloc(sizeof(tSwitchChannelParams));
 	if (NULL == pSmeSwithChnlParams) {
-		lim_log(pMac, LOGP,
+		lim_log(pMac, LOGE,
 			FL("AllocateMemory failed for pSmeSwithChnlParams\n"));
 		return;
 	}
@@ -2639,7 +2638,7 @@ lim_process_beacon_tx_success_ind(tpAniSirGlobal pMac, uint16_t msgType, void *e
 					    qdf_mem_malloc(length);
 
 			if (NULL == pChanSwTxResponse) {
-				lim_log(pMac, LOGP,
+				lim_log(pMac, LOGE,
 					FL
 						("AllocateMemory failed for tSirSmeCSAIeTxCompleteRsp"));
 				return;
@@ -2664,7 +2663,7 @@ lim_process_beacon_tx_success_ind(tpAniSirGlobal pMac, uint16_t msgType, void *e
 		beacon_tx_comp_rsp_ptr = (struct sir_beacon_tx_complete_rsp *)
 				qdf_mem_malloc(sizeof(*beacon_tx_comp_rsp_ptr));
 		if (NULL == beacon_tx_comp_rsp_ptr) {
-			lim_log(pMac, LOGP,
+			lim_log(pMac, LOGE,
 				FL
 				("AllocateMemory failed for beacon_tx_comp_rsp_ptr"));
 			return;