Browse Source

qcacld-3.0: sap: Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF

Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF.

CRs-Fixed: 2752355
Change-Id: Ia9b814f028df9fabe661861d25dbf45deefd008d
Srinivas Girigowda 4 years ago
parent
commit
f71adaf0e5
3 changed files with 35 additions and 35 deletions
  1. 4 4
      core/sap/src/sap_api_link_cntl.c
  2. 11 10
      core/sap/src/sap_fsm.c
  3. 20 21
      core/sap/src/sap_module.c

+ 4 - 4
core/sap/src/sap_api_link_cntl.c

@@ -798,16 +798,16 @@ wlansap_roam_process_infra_assoc_ind(struct sap_context *sap_ctx,
 				(void *) eSAP_STATUS_SUCCESS);
 		if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 			QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
-				  FL("CSR roam_result = (%d) MAC ("QDF_MAC_ADDR_STR") fail"),
-				  roam_result, QDF_MAC_ADDR_ARRAY(
+				  FL("CSR roam_result = (%d) MAC ("QDF_MAC_ADDR_FMT") fail"),
+				  roam_result, QDF_MAC_ADDR_REF(
 					csr_roam_info->peerMac.bytes));
 		*ret_status = QDF_STATUS_E_FAILURE;
 		}
 	} else {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_WARN,
-			  FL("CSR roam_result = (%d) MAC ("QDF_MAC_ADDR_STR") not allowed"),
+			  FL("CSR roam_result = (%d) MAC ("QDF_MAC_ADDR_FMT") not allowed"),
 			  roam_result,
-			  QDF_MAC_ADDR_ARRAY(csr_roam_info->peerMac.bytes));
+			  QDF_MAC_ADDR_REF(csr_roam_info->peerMac.bytes));
 		*ret_status = QDF_STATUS_E_FAILURE;
 	}
 	return;

+ 11 - 10
core/sap/src/sap_fsm.c

@@ -1778,8 +1778,9 @@ QDF_STATUS sap_signal_hdd_event(struct sap_context *sap_ctx,
 	case eSAP_STOP_BSS_DUE_TO_NO_CHNL:
 		sap_ap_event.sapHddEventCode = eSAP_STOP_BSS_DUE_TO_NO_CHNL;
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
-			  FL("stopping session_id:%d, bssid:%pM, chan_freq:%d"),
-			     sap_ctx->sessionId, sap_ctx->self_mac_addr,
+			  FL("stopping session_id:%d, bssid:"QDF_MAC_ADDR_FMT", chan_freq:%d"),
+			     sap_ctx->sessionId,
+			     QDF_MAC_ADDR_REF(sap_ctx->self_mac_addr),
 			     sap_ctx->chan_freq);
 		break;
 
@@ -3275,8 +3276,8 @@ void sap_print_acl(struct qdf_mac_addr *macList, uint8_t size)
 	for (i = 0; i < size; i++) {
 		macArray = (macList + i)->bytes;
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
-			  "** ACL entry %i - " QDF_MAC_ADDR_STR, i,
-			  QDF_MAC_ADDR_ARRAY(macArray));
+			  "** ACL entry %i - " QDF_MAC_ADDR_FMT, i,
+			  QDF_MAC_ADDR_REF(macArray));
 	}
 	return;
 }
@@ -3294,8 +3295,8 @@ QDF_STATUS sap_is_peer_mac_allowed(struct sap_context *sap_ctx,
 	if (sap_search_mac_list
 		    (sap_ctx->denyMacList, sap_ctx->nDenyMac, peerMac, NULL)) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
-			  "In %s, Peer " QDF_MAC_ADDR_STR " in deny list",
-			  __func__, QDF_MAC_ADDR_ARRAY(peerMac));
+			  "In %s, Peer " QDF_MAC_ADDR_FMT " in deny list",
+			  __func__, QDF_MAC_ADDR_REF(peerMac));
 		return QDF_STATUS_E_FAILURE;
 	}
 	/* A new station CAN associate, unless in deny list. Less stringent mode */
@@ -3305,9 +3306,9 @@ QDF_STATUS sap_is_peer_mac_allowed(struct sap_context *sap_ctx,
 	/* A new station CANNOT associate, unless in accept list. More stringent mode */
 	if (eSAP_DENY_UNLESS_ACCEPTED == sap_ctx->eSapMacAddrAclMode) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
-			  "In %s, Peer " QDF_MAC_ADDR_STR
+			  "In %s, Peer " QDF_MAC_ADDR_FMT
 			  " denied, Mac filter mode is eSAP_DENY_UNLESS_ACCEPTED",
-			  __func__, QDF_MAC_ADDR_ARRAY(peerMac));
+			  __func__, QDF_MAC_ADDR_REF(peerMac));
 		return QDF_STATUS_E_FAILURE;
 	}
 
@@ -3318,9 +3319,9 @@ QDF_STATUS sap_is_peer_mac_allowed(struct sap_context *sap_ctx,
 		sap_signal_hdd_event(sap_ctx, NULL, eSAP_UNKNOWN_STA_JOIN,
 				     (void *) peerMac);
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
-			  "In %s, Peer " QDF_MAC_ADDR_STR
+			  "In %s, Peer " QDF_MAC_ADDR_FMT
 			  " denied, Mac filter mode is eSAP_SUPPORT_ACCEPT_AND_DENY",
-			  __func__, QDF_MAC_ADDR_ARRAY(peerMac));
+			  __func__, QDF_MAC_ADDR_REF(peerMac));
 		return QDF_STATUS_E_FAILURE;
 	}
 	return QDF_STATUS_SUCCESS;

+ 20 - 21
core/sap/src/sap_module.c

@@ -962,9 +962,9 @@ QDF_STATUS wlansap_modify_acl(struct sap_context *sap_ctx,
 	}
 	if (qdf_mem_cmp(sap_ctx->bssid.bytes, peer_sta_mac,
 			QDF_MAC_ADDR_SIZE) == 0) {
-		sap_err("requested peer mac is" QDF_MAC_ADDR_STR
+		sap_err("requested peer mac is "QDF_MAC_ADDR_FMT
 			"our own SAP BSSID. Do not blacklist or whitelist this BSSID",
-			QDF_MAC_ADDR_ARRAY(peer_sta_mac));
+			QDF_MAC_ADDR_REF(peer_sta_mac));
 		return QDF_STATUS_E_FAULT;
 	}
 	QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_LOW,
@@ -990,10 +990,10 @@ QDF_STATUS wlansap_modify_acl(struct sap_context *sap_ctx,
 				 peer_sta_mac, &staBLIndex);
 
 	if (sta_white_list && sta_black_list) {
-		sap_err("Peer mac " QDF_MAC_ADDR_STR
+		sap_err("Peer mac " QDF_MAC_ADDR_FMT
 			" found in white and black lists."
 			"Initial lists passed incorrect. Cannot execute this command.",
-			QDF_MAC_ADDR_ARRAY(peer_sta_mac));
+			QDF_MAC_ADDR_REF(peer_sta_mac));
 		return QDF_STATUS_E_FAILURE;
 
 	}
@@ -1007,15 +1007,15 @@ QDF_STATUS wlansap_modify_acl(struct sap_context *sap_ctx,
 			/* if list is already at max, return failure */
 			if (sap_ctx->nAcceptMac == MAX_ACL_MAC_ADDRESS) {
 				sap_err("White list is already maxed out. Cannot accept "
-					  QDF_MAC_ADDR_STR,
-					  QDF_MAC_ADDR_ARRAY(peer_sta_mac));
+					  QDF_MAC_ADDR_FMT,
+					  QDF_MAC_ADDR_REF(peer_sta_mac));
 				return QDF_STATUS_E_FAILURE;
 			}
 			if (sta_white_list) {
 				/* Do nothing if already present in white list. Just print a warning */
 				sap_warn("MAC address already present in white list "
-					 QDF_MAC_ADDR_STR,
-					 QDF_MAC_ADDR_ARRAY(peer_sta_mac));
+					 QDF_MAC_ADDR_FMT,
+					 QDF_MAC_ADDR_REF(peer_sta_mac));
 				return QDF_STATUS_SUCCESS;
 			}
 			if (sta_black_list) {
@@ -1056,8 +1056,8 @@ QDF_STATUS wlansap_modify_acl(struct sap_context *sap_ctx,
 					  sap_ctx->nDenyMac);
 			} else {
 				sap_warn("MAC address to be deleted is not present in the white list "
-					 QDF_MAC_ADDR_STR,
-					 QDF_MAC_ADDR_ARRAY(peer_sta_mac));
+					 QDF_MAC_ADDR_FMT,
+					 QDF_MAC_ADDR_REF(peer_sta_mac));
 				return QDF_STATUS_E_FAILURE;
 			}
 		} else {
@@ -1074,15 +1074,15 @@ QDF_STATUS wlansap_modify_acl(struct sap_context *sap_ctx,
 			/* if list is already at max, return failure */
 			if (sap_ctx->nDenyMac == MAX_ACL_MAC_ADDRESS) {
 				sap_err("Black list is already maxed out. Cannot accept "
-					QDF_MAC_ADDR_STR,
-					QDF_MAC_ADDR_ARRAY(peer_sta_mac));
+					QDF_MAC_ADDR_FMT,
+					QDF_MAC_ADDR_REF(peer_sta_mac));
 				return QDF_STATUS_E_FAILURE;
 			}
 			if (sta_black_list) {
 				/* Do nothing if already present in white list */
 				sap_warn("MAC address already present in black list "
-					 QDF_MAC_ADDR_STR,
-					 QDF_MAC_ADDR_ARRAY(peer_sta_mac));
+					 QDF_MAC_ADDR_FMT,
+					 QDF_MAC_ADDR_REF(peer_sta_mac));
 				return QDF_STATUS_SUCCESS;
 			}
 			if (sta_white_list) {
@@ -1119,8 +1119,8 @@ QDF_STATUS wlansap_modify_acl(struct sap_context *sap_ctx,
 					  sap_ctx->nDenyMac);
 			} else {
 				sap_warn("MAC address to be deleted is not present in the black list "
-					  QDF_MAC_ADDR_STR,
-					  QDF_MAC_ADDR_ARRAY(peer_sta_mac));
+					  QDF_MAC_ADDR_FMT,
+					  QDF_MAC_ADDR_REF(peer_sta_mac));
 				return QDF_STATUS_E_FAILURE;
 			}
 		} else {
@@ -1499,9 +1499,8 @@ QDF_STATUS wlan_sap_getstation_ie_information(struct sap_context *sap_ctx,
 			qdf_mem_copy(buf,
 				sap_ctx->pStaWpaRsnReqIE,
 				sap_ctx->nStaWPARSnReqIeLength);
-			sap_info("WPAIE: "QDF_MAC_ADDR_STR"",
-				 buf[0], buf[1], buf[2], buf[3], buf[4],
-				 buf[5]);
+			sap_info("WPAIE: "QDF_MAC_ADDR_FMT,
+				 QDF_MAC_ADDR_REF(buf));
 			qdf_status = QDF_STATUS_SUCCESS;
 		}
 	}
@@ -2363,9 +2362,9 @@ void wlansap_populate_del_sta_params(const uint8_t *mac,
 	else
 		params->subtype = SIR_MAC_MGMT_DEAUTH;
 
-	sap_debug("Delete STA with RC:%hu subtype:%hhu MAC::" QDF_MAC_ADDR_STR,
+	sap_debug("Delete STA with RC:%hu subtype:%hhu MAC::" QDF_MAC_ADDR_FMT,
 		  params->reason_code, params->subtype,
-		  QDF_MAC_ADDR_ARRAY(params->peerMacAddr.bytes));
+		  QDF_MAC_ADDR_REF(params->peerMacAddr.bytes));
 }
 
 void sap_undo_acs(struct sap_context *sap_ctx, struct sap_config *sap_cfg)