Browse Source

qcacld-3.0: Replace lim_log() with pe_* log levels in lim_session.c

Replace lim_log() with pe_* appropriate log levels in lim_session.c

Change-Id: Ie035ded5406801cbe5526b4059187a3496c50b06
CRs-Fixed: 1093093
Nishank Aggarwal 8 years ago
parent
commit
c7c659229c
1 changed files with 22 additions and 38 deletions
  1. 22 38
      core/mac/src/pe/lim/lim_session.c

+ 22 - 38
core/mac/src/pe/lim/lim_session.c

@@ -112,9 +112,7 @@ static void pe_reset_protection_callback(void *ptr)
 	bool bcn_prms_changed = false;
 
 	if (pe_session_entry->valid == false) {
-		QDF_TRACE(QDF_MODULE_ID_PE,
-			  QDF_TRACE_LEVEL_ERROR,
-			  FL("session already deleted. exiting timer callback"));
+		pe_err("session already deleted. exiting timer callback");
 		return;
 	}
 
@@ -126,9 +124,7 @@ static void pe_reset_protection_callback(void *ptr)
 	 * is not yet up.
 	 */
 	if (!wma_is_vdev_up(pe_session_entry->smeSessionId)) {
-		QDF_TRACE(QDF_MODULE_ID_PE,
-			  QDF_TRACE_LEVEL_ERROR,
-			  FL("session is not up yet. exiting timer callback"));
+		pe_err("session is not up yet. exiting timer callback");
 		return;
 	}
 
@@ -139,9 +135,7 @@ static void pe_reset_protection_callback(void *ptr)
 	       pe_session_entry->gLimOverlapNonGfParams.protectionEnabled << 3 |
 	       pe_session_entry->gLimOlbcParams.protectionEnabled         << 4;
 
-	QDF_TRACE(QDF_MODULE_ID_PE,
-		  QDF_TRACE_LEVEL_INFO,
-		  FL("old protection state: 0x%04X, new protection state: 0x%04X"),
+	pe_debug("old protection state: 0x%04X, new protection state: 0x%04X",
 		  pe_session_entry->old_protection_state,
 		  current_protection_state);
 
@@ -200,9 +194,7 @@ static void pe_reset_protection_callback(void *ptr)
 	if ((current_protection_state !=
 		pe_session_entry->old_protection_state) &&
 		(false == mac_ctx->sap.SapDfsInfo.is_dfs_cac_timer_running)) {
-		QDF_TRACE(QDF_MODULE_ID_PE,
-			  QDF_TRACE_LEVEL_DEBUG,
-			  FL("protection changed, update beacon template"));
+		pe_debug("protection changed, update beacon template");
 		/* update beacon fix params and send update to FW */
 		qdf_mem_zero(&beacon_params, sizeof(tUpdateBeaconParams));
 		beacon_params.bssIdx = pe_session_entry->bssIdx;
@@ -241,9 +233,7 @@ static void pe_reset_protection_callback(void *ptr)
 				protection_fields_reset_timer,
 				SCH_PROTECTION_RESET_TIME)
 		!= QDF_STATUS_SUCCESS) {
-		QDF_TRACE(QDF_MODULE_ID_PE,
-			QDF_TRACE_LEVEL_ERROR,
-			FL("cannot create or start protectionFieldsResetTimer"));
+		pe_err("cannot create or start protectionFieldsResetTimer");
 	}
 }
 
@@ -267,7 +257,7 @@ tpPESession session, uint8_t session_id)
 			QDF_TIMER_TYPE_SW, lim_pmf_comeback_timer_callback,
 			(void *)&session->pmfComebackTimerInfo);
 	if (!QDF_IS_STATUS_SUCCESS(status))
-		lim_log(mac_ctx, LOGE, FL("cannot init pmf comeback timer."));
+		pe_err("cannot init pmf comeback timer");
 }
 #else
 static inline void
@@ -306,8 +296,7 @@ pe_create_session(tpAniSirGlobal pMac, uint8_t *bssid, uint8_t *sessionId,
 	}
 
 	if (i == pMac->lim.maxBssId) {
-		lim_log(pMac, LOGE,
-			FL("Session can't be created. Reached max sessions"));
+		pe_err("Session can't be created. Reached max sessions");
 		return NULL;
 	}
 
@@ -317,14 +306,14 @@ pe_create_session(tpAniSirGlobal pMac, uint8_t *bssid, uint8_t *sessionId,
 	session_ptr->dph.dphHashTable.pHashTable =
 		qdf_mem_malloc(sizeof(tpDphHashNode) * (numSta + 1));
 	if (NULL == session_ptr->dph.dphHashTable.pHashTable) {
-		lim_log(pMac, LOGE, FL("memory allocate failed!"));
+		pe_err("memory allocate failed!");
 		return NULL;
 	}
 
 	session_ptr->dph.dphHashTable.pDphNodeArray =
 		qdf_mem_malloc(sizeof(tDphHashNode) * (numSta + 1));
 	if (NULL == session_ptr->dph.dphHashTable.pDphNodeArray) {
-		lim_log(pMac, LOGE, FL("memory allocate failed!"));
+		pe_err("memory allocate failed!");
 		qdf_mem_free(session_ptr->dph.dphHashTable.pHashTable);
 		session_ptr->dph.dphHashTable.
 		pHashTable = NULL;
@@ -336,7 +325,7 @@ pe_create_session(tpAniSirGlobal pMac, uint8_t *bssid, uint8_t *sessionId,
 	session_ptr->gpLimPeerIdxpool = qdf_mem_malloc(
 		sizeof(*(session_ptr->gpLimPeerIdxpool)) * (numSta + 1));
 	if (NULL == session_ptr->gpLimPeerIdxpool) {
-		lim_log(pMac, LOGE, FL("memory allocate failed!"));
+		pe_err("memory allocate failed!");
 		qdf_mem_free(session_ptr->dph.dphHashTable.pHashTable);
 		qdf_mem_free(session_ptr->dph.dphHashTable.pDphNodeArray);
 		session_ptr->dph.dphHashTable.pHashTable = NULL;
@@ -377,8 +366,7 @@ pe_create_session(tpAniSirGlobal pMac, uint8_t *bssid, uint8_t *sessionId,
 	session_ptr->fWaitForProbeRsp = 0;
 	session_ptr->fIgnoreCapsChange = 0;
 
-	QDF_TRACE(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_DEBUG,
-		FL("Create a new PE session(%d), BSSID: "MAC_ADDRESS_STR" Max No. of STA %d"),
+	pe_debug("Create a new PE session: %d BSSID: "MAC_ADDRESS_STR" Max No of STA: %d",
 		*sessionId, MAC_ADDR_ARRAY(bssid), numSta);
 
 	if (eSIR_INFRA_AP_MODE == bssType || eSIR_IBSS_MODE == bssType) {
@@ -391,7 +379,7 @@ pe_create_session(tpAniSirGlobal pMac, uint8_t *bssid, uint8_t *sessionId,
 		if ((NULL == session_ptr->pSchProbeRspTemplate)
 		    || (NULL == session_ptr->pSchBeaconFrameBegin)
 		    || (NULL == session_ptr->pSchBeaconFrameEnd)) {
-			lim_log(pMac, LOGE, FL("memory allocate failed!"));
+			pe_err("memory allocate failed!");
 			qdf_mem_free(session_ptr->dph.dphHashTable.pHashTable);
 			qdf_mem_free(session_ptr->dph.dphHashTable.pDphNodeArray);
 			qdf_mem_free(session_ptr->gpLimPeerIdxpool);
@@ -427,8 +415,7 @@ pe_create_session(tpAniSirGlobal pMac, uint8_t *bssid, uint8_t *sessionId,
 				SCH_PROTECTION_RESET_TIME);
 		}
 		if (status != QDF_STATUS_SUCCESS)
-			QDF_TRACE(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_ERROR,
-				FL("cannot create or start protectionFieldsResetTimer"));
+			pe_err("cannot create or start protectionFieldsResetTimer");
 	}
 	pe_init_pmf_comeback_timer(pMac, session_ptr, *sessionId);
 
@@ -464,8 +451,8 @@ tpPESession pe_find_session_by_bssid(tpAniSirGlobal pMac, uint8_t *bssid,
 		}
 	}
 
-	lim_log(pMac, LOG4, FL("Session lookup fails for BSSID:"));
-	lim_print_mac_addr(pMac, bssid, LOG4);
+	pe_debug("Session lookup fails for BSSID:");
+	lim_print_mac_addr(pMac, bssid, LOGD);
 	return NULL;
 
 }
@@ -490,7 +477,7 @@ tpPESession pe_find_session_by_bss_idx(tpAniSirGlobal pMac, uint8_t bssIdx)
 			return &pMac->lim.gpSession[i];
 		}
 	}
-	lim_log(pMac, LOG4, FL("Session lookup fails for bssIdx: %d"), bssIdx);
+	pe_debug("Session lookup fails for bssIdx: %d", bssIdx);
 	return NULL;
 }
 
@@ -510,7 +497,7 @@ tpPESession pe_find_session_by_bss_idx(tpAniSirGlobal pMac, uint8_t bssIdx)
 tpPESession pe_find_session_by_session_id(tpAniSirGlobal pMac, uint8_t sessionId)
 {
 	if (sessionId >= pMac->lim.maxBssId) {
-		lim_log(pMac, LOGE, FL("Invalid sessionId: %d \n "), sessionId);
+		pe_err("Invalid sessionId: %d", sessionId);
 		return NULL;
 	}
 	if ((pMac->lim.gpSession[sessionId].valid == true)) {
@@ -555,8 +542,7 @@ pe_find_session_by_sta_id(tpAniSirGlobal mac_ctx,
 		}
 	}
 
-	lim_log(mac_ctx, LOG4,
-		FL("Session lookup fails for StaId: %d"), staid);
+	pe_debug("Session lookup fails for StaId: %d", staid);
 	return NULL;
 }
 
@@ -576,13 +562,11 @@ void pe_delete_session(tpAniSirGlobal mac_ctx, tpPESession session)
 	TX_TIMER *timer_ptr;
 
 	if (!session || (session && !session->valid)) {
-		QDF_TRACE(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_DEBUG,
-			  FL("session is not valid"));
+		pe_err("session is not valid");
 		return;
 	}
 
-	QDF_TRACE(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_DEBUG,
-		FL("Trying to delete PE session %d Opmode %d BssIdx %d BSSID: "MAC_ADDRESS_STR),
+	pe_debug("Trying to delete PE session: %d Opmode: %d BssIdx: %d BSSID: "MAC_ADDRESS_STR,
 		session->peSessionId, session->operMode,
 		session->bssIdx,
 		MAC_ADDR_ARRAY(session->bssId));
@@ -771,8 +755,8 @@ tpPESession pe_find_session_by_peer_sta(tpAniSirGlobal pMac, uint8_t *sa,
 		}
 	}
 
-	lim_log(pMac, LOG1, FL("Session lookup fails for Peer StaId:"));
-	lim_print_mac_addr(pMac, sa, LOG1);
+	pe_debug("Session lookup fails for Peer StaId:");
+	lim_print_mac_addr(pMac, sa, LOGD);
 	return NULL;
 }