Переглянути джерело

qcacld-3.0: Instead of lim_print_mac_addr() use QDF_MAC_ADDR_FMT

Instead of calling lim_print_mac_addr() API to print the mac_addr
in lim, directly use the QDF_MAC_ADDR_FMT macro.

Change-Id: Ib3eab515ef0a3716f7c3257280239e3975c6b601
CRs-Fixed: 3401402
Deeksha Gupta 2 роки тому
батько
коміт
acc243c3de

+ 11 - 14
core/mac/src/pe/lim/lim_process_probe_req_frame.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -286,9 +286,8 @@ lim_process_probe_req_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_info,
 	if (LIM_IS_AP_ROLE(session)) {
 		frame_len = WMA_GET_RX_PAYLOAD_LEN(rx_pkt_info);
 
-		pe_debug("Received Probe Request: %d bytes from",
-			frame_len);
-			lim_print_mac_addr(mac_ctx, mac_hdr->sa, LOGD);
+		pe_debug("Received Probe Request: %d bytes from "QDF_MAC_ADDR_FMT,
+			 frame_len, QDF_MAC_ADDR_REF(mac_hdr->sa));
 		/* Get pointer to Probe Request frame body */
 		body_ptr = WMA_GET_RX_MPDU_DATA(rx_pkt_info);
 
@@ -342,9 +341,8 @@ lim_process_probe_req_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_info,
 			}
 
 			if ((rate_11b > 0) && (other_rates == 0)) {
-				pe_debug("Received a probe req frame with only 11b rates, SA is: ");
-					lim_print_mac_addr(mac_ctx,
-						mac_hdr->sa, LOGD);
+				pe_debug("Received a probe req frame with only 11b rates, SA: "QDF_MAC_ADDR_FMT,
+					 QDF_MAC_ADDR_REF(mac_hdr->sa));
 					goto free_and_exit;
 			}
 		}
@@ -414,9 +412,8 @@ lim_process_probe_req_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_info,
 					goto free_and_exit;
 				}
 			} else {
-				pe_debug("Ignore ProbeReq frm with unmatch SSID received from");
-					lim_print_mac_addr(mac_ctx, mac_hdr->sa,
-							   LOGD);
+				pe_debug("Ignore ProbeReq frm with unmatch SSID received from SA: "QDF_MAC_ADDR_FMT,
+					 QDF_MAC_ADDR_REF(mac_hdr->sa));
 			}
 		} else {
 			/*
@@ -439,12 +436,12 @@ lim_process_probe_req_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_info,
 			goto free_and_exit;
 		}
 multipleSSIDcheck:
-		pe_debug("Ignore ProbeReq frm with unmatch SSID rcved from");
-			lim_print_mac_addr(mac_ctx, mac_hdr->sa, LOGD);
+		pe_debug("Ignore ProbeReq frm with unmatch SSID rcved from SA: "QDF_MAC_ADDR_FMT,
+			 QDF_MAC_ADDR_REF(mac_hdr->sa));
 	} else {
 		/* Ignore received Probe Request frame */
-		pe_debug("Ignoring Probe Request frame received from");
-		lim_print_mac_addr(mac_ctx, mac_hdr->sa, LOGD);
+		pe_debug("Ignoring Probe Request frame received from SA: "QDF_MAC_ADDR_FMT,
+			 QDF_MAC_ADDR_REF(mac_hdr->sa));
 	}
 
 free_and_exit:

+ 13 - 14
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -6725,9 +6725,9 @@ void __lim_process_sme_assoc_cnf_new(struct mac_context *mac_ctx, uint32_t msg_t
 	sta_ds = dph_get_hash_entry(mac_ctx, assoc_cnf.aid,
 			&session_entry->dph.dphHashTable);
 	if (!sta_ds) {
-		pe_err("Rcvd invalid msg %X due to no STA ctx, aid %d, peer",
-				msg_type, assoc_cnf.aid);
-		lim_print_mac_addr(mac_ctx, assoc_cnf.peer_macaddr.bytes, LOGE);
+		pe_err("Rcvd invalid msg %X due to no STA ctx, aid %d, peer "QDF_MAC_ADDR_FMT,
+		       msg_type, assoc_cnf.aid,
+		       QDF_MAC_ADDR_REF(assoc_cnf.peer_macaddr.bytes));
 
 		/*
 		 * send a DISASSOC_IND message to WSM to make sure
@@ -6743,9 +6743,9 @@ void __lim_process_sme_assoc_cnf_new(struct mac_context *mac_ctx, uint32_t msg_t
 	if (qdf_mem_cmp((uint8_t *)sta_ds->staAddr,
 				(uint8_t *) assoc_cnf.peer_macaddr.bytes,
 				QDF_MAC_ADDR_SIZE)) {
-		pe_debug("peerMacAddr mismatched for aid %d, peer ",
-				assoc_cnf.aid);
-		lim_print_mac_addr(mac_ctx, assoc_cnf.peer_macaddr.bytes, LOGD);
+		pe_debug("peerMacAddr mismatched for aid %d, peer "QDF_MAC_ADDR_FMT,
+			 assoc_cnf.aid,
+			 QDF_MAC_ADDR_REF(assoc_cnf.peer_macaddr.bytes));
 		goto end;
 	}
 
@@ -6754,10 +6754,9 @@ void __lim_process_sme_assoc_cnf_new(struct mac_context *mac_ctx, uint32_t msg_t
 		 (msg_type != eWNI_SME_ASSOC_CNF)) ||
 		((sta_ds->mlmStaContext.subType == LIM_REASSOC) &&
 		 (msg_type != eWNI_SME_ASSOC_CNF))) {
-		pe_debug("not in MLM_WT_ASSOC_CNF_STATE, for aid %d, peer"
-			"StaD mlmState: %d",
-			assoc_cnf.aid, sta_ds->mlmStaContext.mlmState);
-		lim_print_mac_addr(mac_ctx, assoc_cnf.peer_macaddr.bytes, LOGD);
+		pe_debug("peer " QDF_MAC_ADDR_FMT " not in WT_ASSOC_CNF_STATE, for aid %d, sta mlmstate %d",
+			 QDF_MAC_ADDR_REF(assoc_cnf.peer_macaddr.bytes),
+			 assoc_cnf.aid, sta_ds->mlmStaContext.mlmState);
 		goto end;
 	}
 	/*
@@ -7554,8 +7553,8 @@ static void __lim_process_sme_set_ht2040_mode(struct mac_context *mac,
 				pSetHT2040Mode->bssid.bytes,
 				&sessionId);
 	if (!pe_session) {
-		pe_debug("Session does not exist for given BSSID");
-		lim_print_mac_addr(mac, pSetHT2040Mode->bssid.bytes, LOGD);
+		pe_debug("Session does not exist for given BSSID: "QDF_MAC_ADDR_FMT,
+			 QDF_MAC_ADDR_REF(pSetHT2040Mode->bssid.bytes));
 		return;
 	}
 
@@ -8509,8 +8508,8 @@ static void lim_process_sme_start_beacon_req(struct mac_context *mac, uint32_t *
 				pBeaconStartInd->bssid,
 				&sessionId);
 	if (!pe_session) {
-		lim_print_mac_addr(mac, pBeaconStartInd->bssid, LOGE);
-		pe_err("Session does not exist for given bssId");
+		pe_err("Session does not exist for given bssId: "QDF_MAC_ADDR_FMT,
+		       QDF_MAC_ADDR_REF(pBeaconStartInd->bssid));
 		return;
 	}
 

+ 3 - 4
core/mac/src/pe/lim/lim_reassoc_utils.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -148,9 +148,8 @@ void lim_handle_del_bss_in_re_assoc_context(struct mac_context *mac,
 				&pe_session->dph.dphHashTable);
 		if (!sta) {
 			/* Could not add hash table entry */
-			pe_err("could not add hash entry at DPH for");
-			lim_print_mac_addr(mac,
-				pe_session->limReAssocbssId, LOGE);
+			pe_err("could not add hash entry at DPH for BSSID: "QDF_MAC_ADDR_FMT,
+			       QDF_MAC_ADDR_REF(pe_session->limReAssocbssId));
 			mlmReassocCnf.resultCode =
 				eSIR_SME_RESOURCES_UNAVAILABLE;
 			mlmReassocCnf.protStatusCode = eSIR_SME_SUCCESS;

+ 6 - 6
core/mac/src/pe/lim/lim_security_utils.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -382,9 +382,9 @@ void lim_delete_pre_auth_node(struct mac_context *mac, tSirMacAddr macAddr)
 
 			pPrevNode->next = pTempNode->next;
 
-			pe_debug("subsequent node to delete, Release data entry: %pK id %d peer",
-				       pTempNode, pTempNode->authNodeIdx);
-			       lim_print_mac_addr(mac, macAddr, LOG1);
+			pe_debug("subsequent node to delete, Release data entry: %pK id %d peer "QDF_MAC_ADDR_FMT,
+				 pTempNode, pTempNode->authNodeIdx,
+				 QDF_MAC_ADDR_REF(macAddr));
 			lim_release_pre_auth_node(mac, pTempNode);
 
 			return;
@@ -394,8 +394,8 @@ void lim_delete_pre_auth_node(struct mac_context *mac, tSirMacAddr macAddr)
 		pTempNode = pTempNode->next;
 	}
 
-	pe_err("peer not found in pre-auth list, addr= ");
-	lim_print_mac_addr(mac, macAddr, LOGE);
+	pe_err("peer not found in pre-auth list, addr= "QDF_MAC_ADDR_FMT,
+	       QDF_MAC_ADDR_REF(macAddr));
 
 } /*** end lim_delete_pre_auth_node() ***/