Bläddra i källkod

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

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

Change-Id: I84c7847e6d28458a5ec2f2fa1a6c35cd57a80573
CRs-Fixed: 1093093
Srinivas Girigowda 8 år sedan
förälder
incheckning
08d546691c
1 ändrade filer med 25 tillägg och 42 borttagningar
  1. 25 42
      core/mac/src/pe/lim/lim_link_monitoring_algo.c

+ 25 - 42
core/mac/src/pe/lim/lim_link_monitoring_algo.c

@@ -71,8 +71,7 @@ static void lim_delete_sta_util(tpAniSirGlobal mac_ctx, tpDeleteStaContext msg,
 {
 	tpDphHashNode stads;
 
-	lim_log(mac_ctx, LOGE,
-		FL("Deleting station: staId = %d, reasonCode = %d"),
+	pe_debug("Deleting station: staId: %d, reasonCode: %d",
 		msg->staId, msg->reasonCode);
 
 	if (LIM_IS_IBSS_ROLE(session_entry)) {
@@ -83,8 +82,7 @@ static void lim_delete_sta_util(tpAniSirGlobal mac_ctx, tpDeleteStaContext msg,
 				    &session_entry->dph.dphHashTable);
 
 	if (!stads) {
-		lim_log(mac_ctx, LOGE,
-			FL("Invalid STA limSystemRole=%d"),
+		pe_err("Invalid STA limSystemRole: %d",
 			GET_LIM_SYSTEM_ROLE(session_entry));
 		return;
 	}
@@ -94,14 +92,12 @@ static void lim_delete_sta_util(tpAniSirGlobal mac_ctx, tpDeleteStaContext msg,
 	 * where we're trying to delete a staId we just added.
 	 */
 	if (stads->staIndex != msg->staId) {
-		lim_log(mac_ctx, LOGE, FL("staid mismatch: %d vs %d "),
-			stads->staIndex, msg->staId);
+		pe_err("staid mismatch: %d vs %d", stads->staIndex, msg->staId);
 		return;
 	}
 
 	if (LIM_IS_AP_ROLE(session_entry)) {
-		lim_log(mac_ctx, LOG1,
-			FL("Delete Station staId: %d, assocId: %d"),
+		pe_debug("Delete Station staId: %d, assocId: %d",
 			msg->staId, msg->assocId);
 		/*
 		 * Check if Deauth/Disassoc is triggered from Host.
@@ -116,8 +112,7 @@ static void lim_delete_sta_util(tpAniSirGlobal mac_ctx, tpDeleteStaContext msg,
 			eLIM_MLM_WT_ASSOC_CNF_STATE) &&
 		      (stads->mlmStaContext.mlmState !=
 			eLIM_MLM_ASSOCIATED_STATE)))) {
-			lim_log(mac_ctx, LOGE,
-				FL("Inv Del STA staId:%d, assocId:%d"),
+			pe_err("Inv Del STA staId: %d, assocId: %d",
 				msg->staId, msg->assocId);
 			return;
 		} else {
@@ -142,8 +137,7 @@ static void lim_delete_sta_util(tpAniSirGlobal mac_ctx, tpDeleteStaContext msg,
 #endif
 		/* TearDownLink with AP */
 		tLimMlmDeauthInd mlm_deauth_ind;
-		lim_log(mac_ctx, LOGW,
-			FL("Delete Station (staId: %d, assocId: %d) "),
+		pe_debug("Delete Station (staId: %d, assocId: %d)",
 			msg->staId, msg->assocId);
 
 		if ((stads &&
@@ -159,11 +153,10 @@ static void lim_delete_sta_util(tpAniSirGlobal mac_ctx, tpDeleteStaContext msg,
 			 * does not have context or in some transit state.
 			 * Log error
 			 */
-			lim_log(mac_ctx, LOGE,
-				FL("Received SIR_LIM_DELETE_STA_CONTEXT_IND for "
+			pe_debug("Received SIR_LIM_DELETE_STA_CONTEXT_IND for "
 					"STA that either has no context or "
 					"in some transit state, Addr = "
-					MAC_ADDRESS_STR),
+					MAC_ADDRESS_STR,
 					MAC_ADDR_ARRAY(msg->bssId));
 			return;
 		}
@@ -216,13 +209,12 @@ void lim_delete_sta_context(tpAniSirGlobal mac_ctx,
 	tpDphHashNode sta_ds;
 
 	if (NULL == msg) {
-		lim_log(mac_ctx, LOGE, FL("Invalid body pointer in message"));
+		pe_err("Invalid body pointer in message");
 		return;
 	}
 	session_entry = pe_find_session_by_sme_session_id(mac_ctx, msg->vdev_id);
 	if (NULL == session_entry) {
-		lim_log(mac_ctx, LOGE,
-			FL("session not found for given sme session"));
+		pe_err("session not found for given sme session");
 		qdf_mem_free(msg);
 		return;
 	}
@@ -232,8 +224,7 @@ void lim_delete_sta_context(tpAniSirGlobal mac_ctx,
 		if (LIM_IS_STA_ROLE(session_entry) && !msg->is_tdls) {
 			if (session_entry->limMlmState !=
 			    eLIM_MLM_LINK_ESTABLISHED_STATE) {
-				lim_log(mac_ctx, LOGE,
-				  FL("Do not process in limMlmState %s(%x)"),
+				pe_err("Do not process in limMlmState %s(%x)",
 				  lim_mlm_state_str(session_entry->limMlmState),
 				  session_entry->limMlmState);
 				qdf_mem_free(msg);
@@ -243,8 +234,7 @@ void lim_delete_sta_context(tpAniSirGlobal mac_ctx,
 					DPH_STA_HASH_INDEX_PEER,
 					&session_entry->dph.dphHashTable);
 			if (NULL == sta_ds) {
-				lim_log(mac_ctx, LOGE,
-					FL("Dph entry not found."));
+				pe_err("Dph entry not found");
 				qdf_mem_free(msg);
 				return;
 			}
@@ -261,7 +251,7 @@ void lim_delete_sta_context(tpAniSirGlobal mac_ctx,
 		break;
 
 	case HAL_DEL_STA_REASON_CODE_UNKNOWN_A2:
-		lim_log(mac_ctx, LOGE, FL("Deleting Unknown station "));
+		pe_err("Deleting Unknown station");
 		lim_print_mac_addr(mac_ctx, msg->addr2, LOGE);
 		lim_send_deauth_mgmt_frame(mac_ctx,
 			eSIR_MAC_CLASS3_FRAME_FROM_NON_ASSOC_STA_REASON,
@@ -269,7 +259,7 @@ void lim_delete_sta_context(tpAniSirGlobal mac_ctx,
 		break;
 
 	default:
-		lim_log(mac_ctx, LOGE, FL(" Unknown reason code "));
+		pe_err("Unknown reason code");
 		break;
 	}
 	qdf_mem_free(msg);
@@ -294,7 +284,7 @@ lim_trigger_sta_deletion(tpAniSirGlobal mac_ctx, tpDphHashNode sta_ds,
 	tLimMlmDisassocInd mlm_disassoc_ind;
 
 	if (!sta_ds) {
-		lim_log(mac_ctx, LOGW, FL("Skip STA deletion (invalid STA)"));
+		pe_warn("Skip STA deletion (invalid STA)");
 		return;
 	}
 
@@ -303,8 +293,7 @@ lim_trigger_sta_deletion(tpAniSirGlobal mac_ctx, tpDphHashNode sta_ds,
 			eLIM_MLM_WT_DEL_BSS_RSP_STATE) ||
 		sta_ds->sta_deletion_in_progress) {
 		/* Already in the process of deleting context for the peer */
-		lim_log(mac_ctx, LOG1,
-			FL("Deletion is in progress (%d) for peer:%p in mlmState %d"),
+		pe_debug("Deletion is in progress (%d) for peer:%p in mlmState %d",
 			sta_ds->sta_deletion_in_progress, sta_ds->staAddr,
 			sta_ds->mlmStaContext.mlmState);
 		return;
@@ -356,8 +345,7 @@ lim_tear_down_link_with_ap(tpAniSirGlobal pMac, uint8_t sessionId,
 
 	psessionEntry = pe_find_session_by_session_id(pMac, sessionId);
 	if (psessionEntry == NULL) {
-		lim_log(pMac, LOGP,
-			FL("Session Does not exist for given sessionID"));
+		pe_err("Session Does not exist for given sessionID");
 		return;
 	}
 	/**
@@ -367,8 +355,7 @@ lim_tear_down_link_with_ap(tpAniSirGlobal pMac, uint8_t sessionId,
 	 */
 	psessionEntry->pmmOffloadInfo.bcnmiss = false;
 
-	lim_log(pMac, LOGW,
-		FL("No ProbeRsp from AP after HB failure. Tearing down link"));
+	pe_info("No ProbeRsp from AP after HB failure. Tearing down link");
 
 	/* Announce loss of link to Roaming algorithm */
 	/* and cleanup by sending SME_DISASSOC_REQ to SME */
@@ -407,8 +394,8 @@ lim_tear_down_link_with_ap(tpAniSirGlobal pMac, uint8_t sessionId,
 		else
 			pMac->lim.gLimHeartBeatApMacIndex = 1;
 
-		lim_log(pMac, LOGE, FL("HB Failure on MAC "
-			MAC_ADDRESS_STR" Store it on Index %d"),
+		pe_debug("HB Failure on MAC "
+			MAC_ADDRESS_STR" Store it on Index %d",
 			MAC_ADDR_ARRAY(pStaDs->staAddr), apCount);
 
 		sir_copy_mac_addr(pMac->lim.gLimHeartBeatApMac[apCount],
@@ -471,13 +458,12 @@ void lim_handle_heart_beat_failure(tpAniSirGlobal mac_ctx,
 		/* Ignore HB if channel switch is in progress */
 		if (session->gLimSpecMgmt.dot11hChanSwState ==
 		   eLIM_11H_CHANSW_RUNNING) {
-			lim_log(mac_ctx, LOGE,
-				FL("Ignore Heartbeat failure as Channel switch is in progress"));
+			pe_debug("Ignore Heartbeat failure as Channel switch is in progress");
 			session->pmmOffloadInfo.bcnmiss = false;
 			return;
 		}
 		/* Beacon frame not received within heartbeat timeout. */
-		lim_log(mac_ctx, LOGW, FL("Heartbeat Failure"));
+		pe_warn("Heartbeat Failure");
 		mac_ctx->lim.gLimHBfailureCntInLinkEstState++;
 
 		/*
@@ -497,8 +483,7 @@ void lim_handle_heart_beat_failure(tpAniSirGlobal mac_ctx,
 			 * it is still around. Wait until certain
 			 * timeout for Probe Response from AP.
 			 */
-			lim_log(mac_ctx, LOGW,
-				FL("HB missed from AP. Sending Probe Req"));
+			pe_debug("HB missed from AP. Sending Probe Req");
 			/* for searching AP, we don't include any more IE */
 			if (session->pLimJoinReq != NULL) {
 				scan_ie = &session->pLimJoinReq->addIEScan;
@@ -516,8 +501,7 @@ void lim_handle_heart_beat_failure(tpAniSirGlobal mac_ctx,
 					session->dot11mode, 0, NULL);
 			}
 		} else {
-			lim_log(mac_ctx, LOGW,
-			    FL("HB missed from AP on DFS chanel moving to passive"));
+			pe_debug("HB missed from AP on DFS chanel moving to passive");
 			if (curr_chan < SIR_MAX_24G_5G_CHANNEL_RANGE) {
 				lim_covert_channel_scan_type(mac_ctx, curr_chan,
 					false);
@@ -539,8 +523,7 @@ void lim_handle_heart_beat_failure(tpAniSirGlobal mac_ctx,
 		 * or in states other than link-established state.
 		 * Log error.
 		 */
-		lim_log(mac_ctx, LOG1,
-			FL("received heartbeat timeout in state %X"),
+		pe_debug("received heartbeat timeout in state %X",
 			session->limMlmState);
 		lim_print_mlm_state(mac_ctx, LOG1, session->limMlmState);
 		mac_ctx->lim.gLimHBfailureCntInOtherStates++;