Parcourir la source

qcacld-3.0: tdls: 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: I79eb9801810c2bd08699dede9e73ff7bf17fc5b9
Srinivas Girigowda il y a 4 ans
Parent
commit
3e043aa2ce

+ 77 - 77
components/tdls/core/src/wlan_tdls_cmds_process.c

@@ -165,8 +165,8 @@ static QDF_STATUS tdls_pe_add_peer(struct tdls_add_peer_request *req)
 	qdf_mem_copy(addstareq->peermac.bytes, req->add_peer_req.peer_addr,
 		     QDF_MAC_ADDR_SIZE);
 
-	tdls_debug("for " QDF_MAC_ADDR_STR,
-		   QDF_MAC_ADDR_ARRAY(addstareq->peermac.bytes));
+	tdls_debug("for " QDF_MAC_ADDR_FMT,
+		   QDF_MAC_ADDR_REF(addstareq->peermac.bytes));
 	msg.type = soc_obj->tdls_add_sta_req;
 	msg.bodyptr = addstareq;
 	status = scheduler_post_message(QDF_MODULE_ID_TDLS,
@@ -228,8 +228,8 @@ QDF_STATUS tdls_pe_del_peer(struct tdls_del_peer_request *req)
 	qdf_mem_copy(delstareq->peermac.bytes, req->del_peer_req.peer_addr,
 		     QDF_MAC_ADDR_SIZE);
 
-	tdls_debug("for " QDF_MAC_ADDR_STR,
-		   QDF_MAC_ADDR_ARRAY(delstareq->peermac.bytes));
+	tdls_debug("for " QDF_MAC_ADDR_FMT,
+		   QDF_MAC_ADDR_REF(delstareq->peermac.bytes));
 	msg.type = soc_obj->tdls_del_sta_req;
 	msg.bodyptr = delstareq;
 	status = scheduler_post_message(QDF_MODULE_ID_TDLS,
@@ -311,8 +311,8 @@ static QDF_STATUS tdls_pe_update_peer(struct tdls_update_peer_request *req)
 	qdf_mem_copy(&addstareq->supported_rates,
 		     update_peer->supported_rates,
 		     update_peer->supported_rates_len);
-	tdls_debug("for " QDF_MAC_ADDR_STR,
-		   QDF_MAC_ADDR_ARRAY(addstareq->peermac.bytes));
+	tdls_debug("for " QDF_MAC_ADDR_FMT,
+		   QDF_MAC_ADDR_REF(addstareq->peermac.bytes));
 
 	msg.type = soc_obj->tdls_add_sta_req;
 	msg.bodyptr = addstareq;
@@ -452,8 +452,8 @@ static QDF_STATUS tdls_activate_add_peer(struct tdls_add_peer_request *req)
 
 	peer = tdls_get_peer(vdev_obj, mac);
 	if (!peer) {
-		tdls_err("peer: " QDF_MAC_ADDR_STR " not exist. invalid",
-			 QDF_MAC_ADDR_ARRAY(mac));
+		tdls_err("peer: " QDF_MAC_ADDR_FMT " not exist. invalid",
+			 QDF_MAC_ADDR_REF(mac));
 		status = QDF_STATUS_E_INVAL;
 		goto addrsp;
 	}
@@ -469,8 +469,8 @@ static QDF_STATUS tdls_activate_add_peer(struct tdls_add_peer_request *req)
 
 	/* when others are on-going, we want to change link_status to idle */
 	if (tdls_is_progress(vdev_obj, mac, true)) {
-		tdls_notice(QDF_MAC_ADDR_STR " TDLS setuping. Req declined.",
-			    QDF_MAC_ADDR_ARRAY(mac));
+		tdls_notice(QDF_MAC_ADDR_FMT " TDLS setuping. Req declined.",
+			    QDF_MAC_ADDR_REF(mac));
 		status = QDF_STATUS_E_PERM;
 		goto setlink;
 	}
@@ -478,9 +478,9 @@ static QDF_STATUS tdls_activate_add_peer(struct tdls_add_peer_request *req)
 	/* first to check if we reached to maximum supported TDLS peer. */
 	curr_tdls_peers = tdls_get_connected_peer(soc_obj);
 	if (soc_obj->max_num_tdls_sta <= curr_tdls_peers) {
-		tdls_err(QDF_MAC_ADDR_STR
+		tdls_err(QDF_MAC_ADDR_FMT
 			 " Request declined. Current %d, Max allowed %d.",
-			 QDF_MAC_ADDR_ARRAY(mac), curr_tdls_peers,
+			 QDF_MAC_ADDR_REF(mac), curr_tdls_peers,
 			 soc_obj->max_num_tdls_sta);
 		status = QDF_STATUS_E_PERM;
 		goto setlink;
@@ -491,8 +491,8 @@ static QDF_STATUS tdls_activate_add_peer(struct tdls_add_peer_request *req)
 
 	status = tdls_pe_add_peer(req);
 	if (QDF_IS_STATUS_ERROR(status)) {
-		tdls_err(QDF_MAC_ADDR_STR " add peer failed with status %d",
-			 QDF_MAC_ADDR_ARRAY(mac), status);
+		tdls_err(QDF_MAC_ADDR_FMT " add peer failed with status %d",
+			 QDF_MAC_ADDR_REF(mac), status);
 		goto setlink;
 	}
 
@@ -631,8 +631,8 @@ static int tdls_validate_setup_frames(struct tdls_soc_priv_obj *tdls_soc,
 	 * there is no harm to double-check.
 	 */
 	if (TDLS_SETUP_REQUEST == tdls_validate->action_code) {
-		tdls_err(QDF_MAC_ADDR_STR " TDLS Max peer already connected. action (%d) declined. Num of peers (%d), Max allowed (%d).",
-			 QDF_MAC_ADDR_ARRAY(tdls_validate->peer_mac),
+		tdls_err(QDF_MAC_ADDR_FMT " TDLS Max peer already connected. action (%d) declined. Num of peers (%d), Max allowed (%d).",
+			 QDF_MAC_ADDR_REF(tdls_validate->peer_mac),
 			 tdls_validate->action_code,
 			 tdls_soc->connected_peer_count,
 			 tdls_soc->max_num_tdls_sta);
@@ -643,8 +643,8 @@ static int tdls_validate_setup_frames(struct tdls_soc_priv_obj *tdls_soc,
 	 * code to supplicant
 	 */
 	tdls_validate->status_code = QDF_STATUS_E_RESOURCES;
-	tdls_err(QDF_MAC_ADDR_STR " TDLS Max peer already connected, send response status (%d). Num of peers (%d), Max allowed (%d).",
-		 QDF_MAC_ADDR_ARRAY(tdls_validate->peer_mac),
+	tdls_err(QDF_MAC_ADDR_FMT " TDLS Max peer already connected, send response status (%d). Num of peers (%d), Max allowed (%d).",
+		 QDF_MAC_ADDR_REF(tdls_validate->peer_mac),
 		 tdls_validate->action_code,
 		 tdls_soc->connected_peer_count,
 		 tdls_soc->max_num_tdls_sta);
@@ -695,17 +695,17 @@ int tdls_validate_mgmt_request(struct tdls_action_frame_request *tdls_mgmt_req)
 		/* if tdls_mode is disabled, then decline the peer's request */
 		if (TDLS_SUPPORT_DISABLED == tdls_soc->tdls_current_mode ||
 		    TDLS_SUPPORT_SUSPENDED == tdls_soc->tdls_current_mode) {
-			tdls_notice(QDF_MAC_ADDR_STR
+			tdls_notice(QDF_MAC_ADDR_FMT
 				" TDLS mode is disabled. action %d declined.",
-				QDF_MAC_ADDR_ARRAY(tdls_validate->peer_mac),
+				QDF_MAC_ADDR_REF(tdls_validate->peer_mac),
 				tdls_validate->action_code);
 			return -ENOTSUPP;
 		}
 		if (tdls_soc->tdls_nss_switch_in_progress) {
 			tdls_err("nss switch in progress, action %d declined "
-				QDF_MAC_ADDR_STR,
+				QDF_MAC_ADDR_FMT,
 				tdls_validate->action_code,
-				QDF_MAC_ADDR_ARRAY(tdls_validate->peer_mac));
+				QDF_MAC_ADDR_REF(tdls_validate->peer_mac));
 			return -EAGAIN;
 		}
 	}
@@ -714,9 +714,9 @@ int tdls_validate_mgmt_request(struct tdls_action_frame_request *tdls_mgmt_req)
 		if (tdls_is_progress(tdls_vdev,
 			tdls_validate->peer_mac, true)) {
 			tdls_err("setup is ongoing. action %d declined for "
-				 QDF_MAC_ADDR_STR,
+				 QDF_MAC_ADDR_FMT,
 				 tdls_validate->action_code,
-				 QDF_MAC_ADDR_ARRAY(tdls_validate->peer_mac));
+				 QDF_MAC_ADDR_REF(tdls_validate->peer_mac));
 			return -EPERM;
 		}
 	}
@@ -748,8 +748,8 @@ int tdls_validate_mgmt_request(struct tdls_action_frame_request *tdls_mgmt_req)
 					       tdls_validate->peer_mac);
 			if (curr_peer) {
 				if (TDLS_IS_LINK_CONNECTED(curr_peer)) {
-					tdls_err(QDF_MAC_ADDR_STR " already connected action %d declined.",
-						QDF_MAC_ADDR_ARRAY(
+					tdls_err(QDF_MAC_ADDR_FMT " already connected action %d declined.",
+						QDF_MAC_ADDR_REF(
 						tdls_validate->peer_mac),
 						tdls_validate->action_code);
 
@@ -759,8 +759,8 @@ int tdls_validate_mgmt_request(struct tdls_action_frame_request *tdls_mgmt_req)
 		}
 	}
 
-	tdls_debug("tdls_mgmt" QDF_MAC_ADDR_STR " action %d, dialog_token %d status %d, len = %zu",
-		   QDF_MAC_ADDR_ARRAY(tdls_validate->peer_mac),
+	tdls_debug("tdls_mgmt " QDF_MAC_ADDR_FMT " action %d, dialog_token %d status %d, len = %zu",
+		   QDF_MAC_ADDR_REF(tdls_validate->peer_mac),
 		   tdls_validate->action_code, tdls_validate->dialog_token,
 		   tdls_validate->status_code, tdls_validate->len);
 
@@ -769,8 +769,8 @@ int tdls_validate_mgmt_request(struct tdls_action_frame_request *tdls_mgmt_req)
 	if (TDLS_TEARDOWN == tdls_validate->action_code) {
 		temp_peer = tdls_find_peer(tdls_vdev, tdls_validate->peer_mac);
 		if (!temp_peer) {
-			tdls_err(QDF_MAC_ADDR_STR " peer doesn't exist",
-				     QDF_MAC_ADDR_ARRAY(
+			tdls_err(QDF_MAC_ADDR_FMT " peer doesn't exist",
+				     QDF_MAC_ADDR_REF(
 				     tdls_validate->peer_mac));
 			return -EPERM;
 		}
@@ -778,8 +778,8 @@ int tdls_validate_mgmt_request(struct tdls_action_frame_request *tdls_mgmt_req)
 		if (TDLS_IS_LINK_CONNECTED(temp_peer))
 			tdls_validate->responder = temp_peer->is_responder;
 		else {
-			tdls_err(QDF_MAC_ADDR_STR " peer doesn't exist or not connected %d dialog_token %d status %d, tdls_validate->len = %zu",
-				 QDF_MAC_ADDR_ARRAY(tdls_validate->peer_mac),
+			tdls_err(QDF_MAC_ADDR_FMT " peer doesn't exist or not connected %d dialog_token %d status %d, tdls_validate->len = %zu",
+				 QDF_MAC_ADDR_REF(tdls_validate->peer_mac),
 				 temp_peer->link_status,
 				 tdls_validate->dialog_token,
 				 tdls_validate->status_code,
@@ -896,8 +896,8 @@ tdls_activate_update_peer(struct tdls_update_peer_request *req)
 
 	curr_peer = tdls_find_peer(vdev_obj, mac);
 	if (!curr_peer) {
-		tdls_err(QDF_MAC_ADDR_STR " not exist. return invalid",
-			 QDF_MAC_ADDR_ARRAY(mac));
+		tdls_err(QDF_MAC_ADDR_FMT " not exist. return invalid",
+			 QDF_MAC_ADDR_REF(mac));
 		status = QDF_STATUS_E_INVAL;
 		goto updatersp;
 	}
@@ -905,33 +905,33 @@ tdls_activate_update_peer(struct tdls_update_peer_request *req)
 	/* in change station, we accept only when sta_id is valid */
 	if (curr_peer->link_status ==  TDLS_LINK_TEARING ||
 	    !curr_peer->valid_entry) {
-		tdls_err(QDF_MAC_ADDR_STR " link %d. update peer rejected",
-			 QDF_MAC_ADDR_ARRAY(mac), curr_peer->link_status);
+		tdls_err(QDF_MAC_ADDR_FMT " link %d. update peer rejected",
+			 QDF_MAC_ADDR_REF(mac), curr_peer->link_status);
 		status = QDF_STATUS_E_PERM;
 		goto updatersp;
 	}
 
 	if (curr_peer->link_status ==  TDLS_LINK_CONNECTED &&
 	    curr_peer->valid_entry) {
-		tdls_err(QDF_MAC_ADDR_STR " link %d. update peer is igonored as tdls state is already connected ",
-			 QDF_MAC_ADDR_ARRAY(mac), curr_peer->link_status);
+		tdls_err(QDF_MAC_ADDR_FMT " link %d. update peer is igonored as tdls state is already connected ",
+			 QDF_MAC_ADDR_REF(mac), curr_peer->link_status);
 		status = QDF_STATUS_SUCCESS;
 		goto updatersp;
 	}
 
 	/* when others are on-going, we want to change link_status to idle */
 	if (tdls_is_progress(vdev_obj, mac, true)) {
-		tdls_notice(QDF_MAC_ADDR_STR " TDLS setuping. Req declined.",
-			    QDF_MAC_ADDR_ARRAY(mac));
+		tdls_notice(QDF_MAC_ADDR_FMT " TDLS setuping. Req declined.",
+			    QDF_MAC_ADDR_REF(mac));
 		status = QDF_STATUS_E_PERM;
 		goto setlink;
 	}
 
 	curr_tdls_peers = tdls_get_connected_peer(soc_obj);
 	if (soc_obj->max_num_tdls_sta <= curr_tdls_peers) {
-		tdls_err(QDF_MAC_ADDR_STR
+		tdls_err(QDF_MAC_ADDR_FMT
 			 " Request declined. Current: %d, Max allowed: %d.",
-			 QDF_MAC_ADDR_ARRAY(mac), curr_tdls_peers,
+			 QDF_MAC_ADDR_REF(mac), curr_tdls_peers,
 			 soc_obj->max_num_tdls_sta);
 		status = QDF_STATUS_E_PERM;
 		goto setlink;
@@ -944,8 +944,8 @@ tdls_activate_update_peer(struct tdls_update_peer_request *req)
 	tdls_set_peer_caps(vdev_obj, mac, &req->update_peer_req);
 	status = tdls_pe_update_peer(req);
 	if (QDF_IS_STATUS_ERROR(status)) {
-		tdls_err(QDF_MAC_ADDR_STR " update peer failed with status %d",
-			 QDF_MAC_ADDR_ARRAY(mac), status);
+		tdls_err(QDF_MAC_ADDR_FMT " update peer failed with status %d",
+			 QDF_MAC_ADDR_REF(mac), status);
 		goto setlink;
 	}
 
@@ -1160,16 +1160,16 @@ QDF_STATUS tdls_process_del_peer(struct tdls_oper_request *req)
 	mac = req->peer_addr;
 	peer = tdls_find_peer(vdev_obj, mac);
 	if (!peer) {
-		tdls_err(QDF_MAC_ADDR_STR
+		tdls_err(QDF_MAC_ADDR_FMT
 			 " not found, ignore NL80211_TDLS_ENABLE_LINK",
-			 QDF_MAC_ADDR_ARRAY(mac));
+			 QDF_MAC_ADDR_REF(mac));
 		status = QDF_STATUS_E_INVAL;
 		goto error;
 	}
 
 	if (!peer->valid_entry) {
-		tdls_err("invalid peer:" QDF_MAC_ADDR_STR " link state %d",
-			 QDF_MAC_ADDR_ARRAY(mac), peer->link_status);
+		tdls_err("invalid peer:" QDF_MAC_ADDR_FMT " link state %d",
+			 QDF_MAC_ADDR_REF(mac), peer->link_status);
 		status = QDF_STATUS_E_INVAL;
 		goto error;
 	}
@@ -1403,8 +1403,8 @@ static QDF_STATUS tdls_add_peer_rsp(struct tdls_add_sta_rsp *rsp)
 				qdf_copy_macaddr(&conn_rec[sta_idx].peer_mac,
 						 &rsp->peermac);
 				tdls_debug("TDLS: Add sta mac at idx %d"
-					   QDF_MAC_ADDR_STR, sta_idx,
-					   QDF_MAC_ADDR_ARRAY
+					   QDF_MAC_ADDR_FMT, sta_idx,
+					   QDF_MAC_ADDR_REF
 					   (rsp->peermac.bytes));
 				break;
 			}
@@ -1461,8 +1461,8 @@ QDF_STATUS tdls_process_del_peer_rsp(struct tdls_del_sta_rsp *rsp)
 	const uint8_t *macaddr;
 	struct tdls_osif_indication ind;
 
-	tdls_debug("del peer rsp: vdev %d  peer " QDF_MAC_ADDR_STR,
-		   rsp->session_id, QDF_MAC_ADDR_ARRAY(rsp->peermac.bytes));
+	tdls_debug("del peer rsp: vdev %d  peer " QDF_MAC_ADDR_FMT,
+		   rsp->session_id, QDF_MAC_ADDR_REF(rsp->peermac.bytes));
 	psoc = rsp->psoc;
 	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, rsp->session_id,
 						    WLAN_TDLS_SB_ID);
@@ -1490,8 +1490,8 @@ QDF_STATUS tdls_process_del_peer_rsp(struct tdls_del_sta_rsp *rsp)
 		tdls_debug("TDLS: del STA with sta_idx %d", sta_idx);
 		curr_peer = tdls_find_peer(vdev_obj, macaddr);
 		if (curr_peer) {
-			tdls_debug(QDF_MAC_ADDR_STR " status is %d",
-				   QDF_MAC_ADDR_ARRAY(macaddr),
+			tdls_debug(QDF_MAC_ADDR_FMT " status is %d",
+				   QDF_MAC_ADDR_REF(macaddr),
 				   curr_peer->link_status);
 
 			id = wlan_vdev_get_id(vdev);
@@ -1543,8 +1543,8 @@ tdls_wma_update_peer_state(struct tdls_soc_priv_obj *soc_obj,
 	struct scheduler_msg msg = {0,};
 	QDF_STATUS status;
 
-	tdls_debug("update TDLS peer " QDF_MAC_ADDR_STR " vdev %d, state %d",
-		   QDF_MAC_ADDR_ARRAY(peer_state->peer_macaddr),
+	tdls_debug("update TDLS peer " QDF_MAC_ADDR_FMT " vdev %d, state %d",
+		   QDF_MAC_ADDR_REF(peer_state->peer_macaddr),
 		   peer_state->vdev_id, peer_state->peer_state);
 	msg.type = soc_obj->tdls_update_peer_state;
 	msg.reserved = 0;
@@ -1593,18 +1593,18 @@ QDF_STATUS tdls_process_enable_link(struct tdls_oper_request *req)
 	mac = req->peer_addr;
 	peer = tdls_find_peer(vdev_obj, mac);
 	if (!peer) {
-		tdls_err(QDF_MAC_ADDR_STR
+		tdls_err(QDF_MAC_ADDR_FMT
 			 " not found, ignore NL80211_TDLS_ENABLE_LINK",
-			 QDF_MAC_ADDR_ARRAY(mac));
+			 QDF_MAC_ADDR_REF(mac));
 		status = QDF_STATUS_E_INVAL;
 		goto error;
 	}
 
-	tdls_debug("enable link for peer " QDF_MAC_ADDR_STR " link state %d",
-		   QDF_MAC_ADDR_ARRAY(mac), peer->link_status);
+	tdls_debug("enable link for peer " QDF_MAC_ADDR_FMT " link state %d",
+		   QDF_MAC_ADDR_REF(mac), peer->link_status);
 	if (!peer->valid_entry) {
-		tdls_err("invalid entry " QDF_MAC_ADDR_STR,
-			 QDF_MAC_ADDR_ARRAY(mac));
+		tdls_err("invalid entry " QDF_MAC_ADDR_FMT,
+			 QDF_MAC_ADDR_REF(mac));
 		status = QDF_STATUS_E_INVAL;
 		goto error;
 	}
@@ -1722,8 +1722,8 @@ static QDF_STATUS tdls_config_force_peer(
 
 	peer = tdls_get_peer(vdev_obj, macaddr);
 	if (!peer) {
-		tdls_err("peer " QDF_MAC_ADDR_STR " does not exist",
-			 QDF_MAC_ADDR_ARRAY(macaddr));
+		tdls_err("peer " QDF_MAC_ADDR_FMT " does not exist",
+			 QDF_MAC_ADDR_REF(macaddr));
 		status = QDF_STATUS_E_NULL_VALUE;
 		goto error;
 	}
@@ -1785,8 +1785,8 @@ QDF_STATUS tdls_process_setup_peer(struct tdls_oper_request *req)
 	struct wlan_objmgr_vdev *vdev;
 	QDF_STATUS status;
 
-	tdls_debug("Configure external TDLS peer " QDF_MAC_ADDR_STR,
-		   QDF_MAC_ADDR_ARRAY(req->peer_addr));
+	tdls_debug("Configure external TDLS peer " QDF_MAC_ADDR_FMT,
+		   QDF_MAC_ADDR_REF(req->peer_addr));
 
 	/* reference cnt is acquired in ucfg_tdls_oper */
 	vdev = req->vdev;
@@ -1831,8 +1831,8 @@ QDF_STATUS tdls_process_remove_force_peer(struct tdls_oper_request *req)
 	struct tdls_osif_indication ind;
 
 	macaddr = req->peer_addr;
-	tdls_debug("NL80211_TDLS_TEARDOWN for " QDF_MAC_ADDR_STR,
-		   QDF_MAC_ADDR_ARRAY(macaddr));
+	tdls_debug("NL80211_TDLS_TEARDOWN for " QDF_MAC_ADDR_FMT,
+		   QDF_MAC_ADDR_REF(macaddr));
 
 	vdev = req->vdev;
 	if (!vdev) {
@@ -1861,8 +1861,8 @@ QDF_STATUS tdls_process_remove_force_peer(struct tdls_oper_request *req)
 
 	peer = tdls_find_peer(vdev_obj, macaddr);
 	if (!peer) {
-		tdls_err("peer matching " QDF_MAC_ADDR_STR " not found",
-			 QDF_MAC_ADDR_ARRAY(macaddr));
+		tdls_err("peer matching " QDF_MAC_ADDR_FMT " not found",
+			 QDF_MAC_ADDR_REF(macaddr));
 		status = QDF_STATUS_E_NULL_VALUE;
 		goto error;
 	}
@@ -1953,9 +1953,9 @@ QDF_STATUS tdls_process_should_discover(struct wlan_objmgr_vdev *vdev,
 	vdev_obj = wlan_vdev_get_tdls_vdev_obj(vdev);
 	type = evt->message_type;
 
-	tdls_debug("TDLS %s: " QDF_MAC_ADDR_STR "reason %d",
+	tdls_debug("TDLS %s: " QDF_MAC_ADDR_FMT "reason %d",
 		   tdls_evt_to_str(type),
-		   QDF_MAC_ADDR_ARRAY(evt->peermac.bytes),
+		   QDF_MAC_ADDR_REF(evt->peermac.bytes),
 		   evt->peer_reason);
 	if (!soc_obj || !vdev_obj) {
 		tdls_err("soc_obj: %pK, vdev_obj: %pK, ignore %s",
@@ -2010,9 +2010,9 @@ QDF_STATUS tdls_process_should_teardown(struct wlan_objmgr_vdev *vdev,
 	soc_obj = wlan_vdev_get_tdls_soc_obj(vdev);
 	vdev_obj = wlan_vdev_get_tdls_vdev_obj(vdev);
 
-	tdls_debug("TDLS %s: " QDF_MAC_ADDR_STR "reason %d",
+	tdls_debug("TDLS %s: " QDF_MAC_ADDR_FMT "reason %d",
 		   tdls_evt_to_str(type),
-		   QDF_MAC_ADDR_ARRAY(evt->peermac.bytes), evt->peer_reason);
+		   QDF_MAC_ADDR_REF(evt->peermac.bytes), evt->peer_reason);
 
 	if (!soc_obj || !vdev_obj) {
 		tdls_err("soc_obj: %pK, vdev_obj: %pK, ignore %s",
@@ -2028,9 +2028,9 @@ QDF_STATUS tdls_process_should_teardown(struct wlan_objmgr_vdev *vdev,
 
 	reason = evt->peer_reason;
 	if (TDLS_LINK_CONNECTED == curr_peer->link_status) {
-		tdls_err("%s reason: %d for" QDF_MAC_ADDR_STR,
+		tdls_err("%s reason: %d for" QDF_MAC_ADDR_FMT,
 			 tdls_evt_to_str(type), evt->peer_reason,
-			 QDF_MAC_ADDR_ARRAY(evt->peermac.bytes));
+			 QDF_MAC_ADDR_REF(evt->peermac.bytes));
 		if (reason == TDLS_TEARDOWN_RSSI ||
 		    reason == TDLS_DISCONNECTED_PEER_DELETE ||
 		    reason == TDLS_TEARDOWN_PTR_TIMEOUT ||
@@ -2147,7 +2147,7 @@ static int tdls_teardown_links(struct tdls_soc_priv_obj *soc_obj, uint32_t mode)
 			continue;
 
 		tdls_debug("Indicate TDLS teardown peer bssid "
-			   QDF_MAC_ADDR_STR, QDF_MAC_ADDR_ARRAY(
+			   QDF_MAC_ADDR_FMT, QDF_MAC_ADDR_REF(
 			   curr_peer->peer_mac.bytes));
 		tdls_indicate_teardown(curr_peer->vdev_priv, curr_peer,
 				       TDLS_TEARDOWN_PEER_UNSPEC_REASON);

+ 34 - 34
components/tdls/core/src/wlan_tdls_ct.c

@@ -104,8 +104,8 @@ void tdls_discovery_timeout_peer_cb(void *user_data)
 							    &p_node);
 				continue;
 			}
-			tdls_debug(QDF_MAC_ADDR_STR " to idle state",
-				   QDF_MAC_ADDR_ARRAY(peer->peer_mac.bytes));
+			tdls_debug(QDF_MAC_ADDR_FMT " to idle state",
+				   QDF_MAC_ADDR_REF(peer->peer_mac.bytes));
 			tdls_set_peer_link_status(peer,
 						  TDLS_LINK_IDLE,
 						  TDLS_LINK_NOT_SUPPORTED);
@@ -381,8 +381,8 @@ void tdls_implicit_send_discovery_request(
 	/* This function is called in mutex_lock */
 	temp_peer = tdls_is_progress(tdls_vdev_obj, NULL, 0);
 	if (temp_peer) {
-		tdls_notice(QDF_MAC_ADDR_STR " ongoing. pre_setup ignored",
-			    QDF_MAC_ADDR_ARRAY(temp_peer->peer_mac.bytes));
+		tdls_notice(QDF_MAC_ADDR_FMT " ongoing. pre_setup ignored",
+			    QDF_MAC_ADDR_REF(temp_peer->peer_mac.bytes));
 		goto done;
 	}
 
@@ -448,9 +448,9 @@ int tdls_recv_discovery_resp(struct tdls_vdev_priv_obj *tdls_vdev,
 	if (0 == tdls_vdev->discovery_sent_cnt)
 		qdf_mc_timer_stop(&tdls_vdev->peer_discovery_timer);
 
-	tdls_debug("Discovery(%u) Response from " QDF_MAC_ADDR_STR
+	tdls_debug("Discovery(%u) Response from " QDF_MAC_ADDR_FMT
 		   " link_status %d", tdls_vdev->discovery_sent_cnt,
-		   QDF_MAC_ADDR_ARRAY(curr_peer->peer_mac.bytes),
+		   QDF_MAC_ADDR_REF(curr_peer->peer_mac.bytes),
 		   curr_peer->link_status);
 
 	tdls_cfg = &tdls_vdev->threshold_config;
@@ -464,9 +464,9 @@ int tdls_recv_discovery_resp(struct tdls_vdev_priv_obj *tdls_vdev,
 			tdls_set_peer_link_status(curr_peer,
 						TDLS_LINK_DISCOVERED,
 						TDLS_LINK_SUCCESS);
-			tdls_debug("Rssi Threshold met: " QDF_MAC_ADDR_STR
+			tdls_debug("Rssi Threshold met: " QDF_MAC_ADDR_FMT
 				" rssi = %d threshold= %d",
-				QDF_MAC_ADDR_ARRAY(curr_peer->peer_mac.bytes),
+				QDF_MAC_ADDR_REF(curr_peer->peer_mac.bytes),
 				curr_peer->rssi,
 				tdls_cfg->rssi_trigger_threshold);
 
@@ -479,9 +479,9 @@ int tdls_recv_discovery_resp(struct tdls_vdev_priv_obj *tdls_vdev,
 						TDLS_EVENT_SETUP_REQ,
 						&indication);
 		} else {
-			tdls_debug("Rssi Threshold not met: " QDF_MAC_ADDR_STR
+			tdls_debug("Rssi Threshold not met: " QDF_MAC_ADDR_FMT
 				" rssi = %d threshold = %d ",
-				QDF_MAC_ADDR_ARRAY(curr_peer->peer_mac.bytes),
+				QDF_MAC_ADDR_REF(curr_peer->peer_mac.bytes),
 				curr_peer->rssi,
 				tdls_cfg->rssi_trigger_threshold);
 
@@ -523,9 +523,9 @@ void tdls_indicate_teardown(struct tdls_vdev_priv_obj *tdls_vdev,
 	}
 
 	if (curr_peer->link_status != TDLS_LINK_CONNECTED) {
-		tdls_err("link state %d peer:" QDF_MAC_ADDR_STR,
+		tdls_err("link state %d peer:" QDF_MAC_ADDR_FMT,
 			 curr_peer->link_status,
-			 QDF_MAC_ADDR_ARRAY(curr_peer->peer_mac.bytes));
+			 QDF_MAC_ADDR_REF(curr_peer->peer_mac.bytes));
 		return;
 	}
 
@@ -570,9 +570,9 @@ tdls_get_conn_info(struct tdls_soc_priv_obj *tdls_soc,
 		if (!qdf_mem_cmp(
 			    tdls_soc->tdls_conn_info[sta_idx].peer_mac.bytes,
 			    peer_mac->bytes, QDF_MAC_ADDR_SIZE)) {
-			tdls_debug("tdls peer exists idx %d " QDF_MAC_ADDR_STR,
+			tdls_debug("tdls peer exists idx %d " QDF_MAC_ADDR_FMT,
 				   sta_idx,
-				   QDF_MAC_ADDR_ARRAY(peer_mac->bytes));
+				   QDF_MAC_ADDR_REF(peer_mac->bytes));
 			tdls_soc->tdls_conn_info[sta_idx].index = sta_idx;
 			return &tdls_soc->tdls_conn_info[sta_idx];
 		}
@@ -607,9 +607,9 @@ tdls_ct_process_idle_handler(struct wlan_objmgr_vdev *vdev,
 		return;
 	}
 
-	tdls_debug(QDF_MAC_ADDR_STR
+	tdls_debug(QDF_MAC_ADDR_FMT
 		" tx_pkt: %d, rx_pkt: %d, idle_packet_n: %d",
-		QDF_MAC_ADDR_ARRAY(curr_peer->peer_mac.bytes),
+		QDF_MAC_ADDR_REF(curr_peer->peer_mac.bytes),
 		curr_peer->tx_pkt,
 		curr_peer->rx_pkt,
 		tdls_vdev_obj->threshold_config.idle_packet_n);
@@ -622,13 +622,13 @@ tdls_ct_process_idle_handler(struct wlan_objmgr_vdev *vdev,
 	    (curr_peer->rx_pkt >=
 	     tdls_vdev_obj->threshold_config.idle_packet_n)) {
 		/* this tdls link got back to normal, so keep it */
-		tdls_debug("tdls link to " QDF_MAC_ADDR_STR
+		tdls_debug("tdls link to " QDF_MAC_ADDR_FMT
 			 " back to normal, will stay",
-			  QDF_MAC_ADDR_ARRAY(curr_peer->peer_mac.bytes));
+			  QDF_MAC_ADDR_REF(curr_peer->peer_mac.bytes));
 	} else {
 		/* this tdls link needs to get torn down */
-		tdls_notice("trigger tdls link to "QDF_MAC_ADDR_STR" down",
-			    QDF_MAC_ADDR_ARRAY(curr_peer->peer_mac.bytes));
+		tdls_notice("trigger tdls link to "QDF_MAC_ADDR_FMT" down",
+			    QDF_MAC_ADDR_REF(curr_peer->peer_mac.bytes));
 		tdls_indicate_teardown(tdls_vdev_obj,
 					curr_peer,
 					TDLS_TEARDOWN_PEER_UNSPEC_REASON);
@@ -650,8 +650,8 @@ void tdls_ct_idle_handler(void *user_data)
 
 	idx = tdls_info->index;
 	if (idx == INVALID_TDLS_PEER_INDEX || idx >= WLAN_TDLS_STA_MAX_NUM) {
-		tdls_debug("invalid peer index %d" QDF_MAC_ADDR_STR, idx,
-			  QDF_MAC_ADDR_ARRAY(tdls_info->peer_mac.bytes));
+		tdls_debug("invalid peer index %d" QDF_MAC_ADDR_FMT, idx,
+			  QDF_MAC_ADDR_REF(tdls_info->peer_mac.bytes));
 		return;
 	}
 
@@ -740,16 +740,16 @@ static void tdls_ct_process_connected_link(
 		if (QDF_TIMER_STATE_RUNNING !=
 		    curr_peer->peer_idle_timer.state) {
 			tdls_warn("Tx/Rx Idle timer start: "
-				QDF_MAC_ADDR_STR "!",
-				QDF_MAC_ADDR_ARRAY(curr_peer->peer_mac.bytes));
+				QDF_MAC_ADDR_FMT "!",
+				QDF_MAC_ADDR_REF(curr_peer->peer_mac.bytes));
 			tdls_timer_restart(tdls_vdev->vdev,
 				&curr_peer->peer_idle_timer,
 				tdls_vdev->threshold_config.idle_timeout_t);
 		}
 	} else if (QDF_TIMER_STATE_RUNNING ==
 		   curr_peer->peer_idle_timer.state) {
-		tdls_warn("Tx/Rx Idle timer stop: " QDF_MAC_ADDR_STR "!",
-			 QDF_MAC_ADDR_ARRAY(curr_peer->peer_mac.bytes));
+		tdls_warn("Tx/Rx Idle timer stop: " QDF_MAC_ADDR_FMT "!",
+			 QDF_MAC_ADDR_REF(curr_peer->peer_mac.bytes));
 		qdf_mc_timer_stop(&curr_peer->peer_idle_timer);
 	}
 }
@@ -769,8 +769,8 @@ static void tdls_ct_process_cap_supported(struct tdls_peer *curr_peer,
 					struct tdls_soc_priv_obj *tdls_soc_obj)
 {
 	if (curr_peer->rx_pkt || curr_peer->tx_pkt)
-		tdls_debug(QDF_MAC_ADDR_STR "link_status %d tdls_support %d tx %d rx %d rssi %d",
-			   QDF_MAC_ADDR_ARRAY(curr_peer->peer_mac.bytes),
+		tdls_debug(QDF_MAC_ADDR_FMT "link_status %d tdls_support %d tx %d rx %d rssi %d",
+			   QDF_MAC_ADDR_REF(curr_peer->peer_mac.bytes),
 			   curr_peer->link_status, curr_peer->tdls_support,
 			   curr_peer->tx_pkt, curr_peer->rx_pkt,
 			   curr_peer->rssi);
@@ -814,8 +814,8 @@ static void tdls_ct_process_cap_unknown(struct tdls_peer *curr_peer,
 			return;
 
 	if (curr_peer->rx_pkt || curr_peer->tx_pkt)
-		tdls_debug(QDF_MAC_ADDR_STR "link_status %d tdls_support %d tx %d rx %d",
-			   QDF_MAC_ADDR_ARRAY(curr_peer->peer_mac.bytes),
+		tdls_debug(QDF_MAC_ADDR_FMT "link_status %d tdls_support %d tx %d rx %d",
+			   QDF_MAC_ADDR_REF(curr_peer->peer_mac.bytes),
 			   curr_peer->link_status, curr_peer->tdls_support,
 			   curr_peer->tx_pkt, curr_peer->rx_pkt);
 
@@ -1118,8 +1118,8 @@ int tdls_set_tdls_offchannelmode(struct wlan_objmgr_vdev *vdev,
 	qdf_mem_copy(&chan_switch_params.peer_mac_addr,
 		     &conn_peer->peer_mac.bytes,
 		     QDF_MAC_ADDR_SIZE);
-	tdls_notice("Peer " QDF_MAC_ADDR_STR " vdevId: %d, off channel: %d, offset: %d, mode: %d, is_responder: %d",
-		 QDF_MAC_ADDR_ARRAY(chan_switch_params.peer_mac_addr),
+	tdls_notice("Peer " QDF_MAC_ADDR_FMT " vdevId: %d, off channel: %d, offset: %d, mode: %d, is_responder: %d",
+		 QDF_MAC_ADDR_REF(chan_switch_params.peer_mac_addr),
 		 chan_switch_params.vdev_id,
 		 chan_switch_params.tdls_off_ch,
 		 chan_switch_params.tdls_off_ch_bw_offset,
@@ -1288,8 +1288,8 @@ void tdls_disable_offchan_and_teardown_links(
 		if (!curr_peer)
 			continue;
 
-		tdls_notice("indicate TDLS teardown %pM",
-			    curr_peer->peer_mac.bytes);
+		tdls_notice("indicate TDLS teardown "QDF_MAC_ADDR_FMT,
+			    QDF_MAC_ADDR_REF(curr_peer->peer_mac.bytes));
 
 		/* Indicate teardown to supplicant */
 		tdls_indicate_teardown(tdls_vdev,

+ 4 - 4
components/tdls/core/src/wlan_tdls_main.c

@@ -417,8 +417,8 @@ static int __tdls_get_all_peers_from_list(
 			if (buf_len < 32 + 1)
 				break;
 			len = qdf_scnprintf(buf, buf_len,
-				QDF_MAC_ADDR_STR "%4s%3s%5d\n",
-				QDF_MAC_ADDR_ARRAY(curr_peer->peer_mac.bytes),
+				QDF_MAC_ADDR_FMT "%4s%3s%5d\n",
+				QDF_MAC_ADDR_REF(curr_peer->peer_mac.bytes),
 				(curr_peer->tdls_support ==
 				 TDLS_CAP_SUPPORTED) ? "Y" : "N",
 				TDLS_IS_LINK_CONNECTED(curr_peer) ? "Y" :
@@ -504,8 +504,8 @@ static QDF_STATUS tdls_process_reset_all_peers(struct wlan_objmgr_vdev *vdev)
 		if (!curr_peer)
 			continue;
 
-		tdls_notice("indicate TDLS teardown %pM",
-			    curr_peer->peer_mac.bytes);
+		tdls_notice("indicate TDLS teardown "QDF_MAC_ADDR_FMT,
+			    QDF_MAC_ADDR_REF(curr_peer->peer_mac.bytes));
 
 		/* Indicate teardown to supplicant */
 		tdls_indicate_teardown(tdls_vdev,

+ 4 - 4
components/tdls/core/src/wlan_tdls_mgmt.c

@@ -55,8 +55,8 @@ QDF_STATUS tdls_set_rssi(struct wlan_objmgr_vdev *vdev,
 		return QDF_STATUS_E_INVAL;
 	}
 
-	tdls_debug("rssi %d, peer " QDF_MAC_ADDR_STR,
-		   rssi, QDF_MAC_ADDR_ARRAY(mac));
+	tdls_debug("rssi %d, peer " QDF_MAC_ADDR_FMT,
+		   rssi, QDF_MAC_ADDR_REF(mac));
 
 	tdls_vdev = wlan_objmgr_vdev_get_comp_private_obj(
 			vdev, WLAN_UMAC_COMP_TDLS);
@@ -113,8 +113,8 @@ static QDF_STATUS tdls_process_rx_mgmt(
 						TDLS_PUBLIC_ACTION_DISC_RESP) {
 		mac = &rx_mgmt->buf[TDLS_80211_PEER_ADDR_OFFSET];
 		tdls_notice("[TDLS] TDLS Discovery Response,"
-		       QDF_MAC_ADDR_STR " RSSI[%d] <--- OTA",
-		       QDF_MAC_ADDR_ARRAY(mac), rx_mgmt->rx_rssi);
+		       QDF_MAC_ADDR_FMT " RSSI[%d] <--- OTA",
+		       QDF_MAC_ADDR_REF(mac), rx_mgmt->rx_rssi);
 			tdls_recv_discovery_resp(tdls_vdev, mac);
 			tdls_set_rssi(tdls_vdev->vdev, mac, rx_mgmt->rx_rssi);
 	}

+ 14 - 14
components/tdls/core/src/wlan_tdls_peer.c

@@ -61,8 +61,8 @@ struct tdls_peer *tdls_find_peer(struct tdls_vdev_priv_obj *vdev_obj,
 		status = qdf_list_peek_next(head, p_node, &p_node);
 	}
 
-	tdls_debug("no tdls peer " QDF_MAC_ADDR_STR,
-		   QDF_MAC_ADDR_ARRAY(macaddr));
+	tdls_debug("no tdls peer " QDF_MAC_ADDR_FMT,
+		   QDF_MAC_ADDR_REF(macaddr));
 	return NULL;
 }
 
@@ -194,8 +194,8 @@ static struct tdls_peer *tdls_add_peer(struct tdls_vdev_priv_obj *vdev_obj,
 
 	qdf_list_insert_back(head, &peer->node);
 
-	tdls_debug("add tdls peer: " QDF_MAC_ADDR_STR,
-		   QDF_MAC_ADDR_ARRAY(macaddr));
+	tdls_debug("add tdls peer: " QDF_MAC_ADDR_FMT,
+		   QDF_MAC_ADDR_REF(macaddr));
 	return peer;
 }
 
@@ -228,8 +228,8 @@ tdls_find_progress_peer_in_list(qdf_list_t *head,
 			status = qdf_list_peek_next(head, p_node, &p_node);
 			continue;
 		} else if (TDLS_LINK_CONNECTING == peer->link_status) {
-			tdls_debug(QDF_MAC_ADDR_STR " TDLS_LINK_CONNECTING",
-				   QDF_MAC_ADDR_ARRAY(peer->peer_mac.bytes));
+			tdls_debug(QDF_MAC_ADDR_FMT " TDLS_LINK_CONNECTING",
+				   QDF_MAC_ADDR_REF(peer->peer_mac.bytes));
 			return peer;
 		}
 		status = qdf_list_peek_next(head, p_node, &p_node);
@@ -359,9 +359,9 @@ tdls_find_first_connected_peer(struct tdls_vdev_priv_obj *vdev_obj)
 			peer = qdf_container_of(p_node, struct tdls_peer, node);
 
 			if (peer && TDLS_LINK_CONNECTED == peer->link_status) {
-				tdls_debug(QDF_MAC_ADDR_STR
+				tdls_debug(QDF_MAC_ADDR_FMT
 					   " TDLS_LINK_CONNECTED",
-					   QDF_MAC_ADDR_ARRAY(
+					   QDF_MAC_ADDR_REF(
 						   peer->peer_mac.bytes));
 				return peer;
 			}
@@ -696,9 +696,9 @@ void tdls_set_peer_link_status(struct tdls_peer *peer,
 	struct tdls_vdev_priv_obj *vdev_obj;
 	enum tdls_link_state old_status;
 
-	tdls_debug("state %d reason %d peer:" QDF_MAC_ADDR_STR,
+	tdls_debug("state %d reason %d peer:" QDF_MAC_ADDR_FMT,
 		   link_status, link_reason,
-		   QDF_MAC_ADDR_ARRAY(peer->peer_mac.bytes));
+		   QDF_MAC_ADDR_REF(peer->peer_mac.bytes));
 
 	vdev_obj = peer->vdev_priv;
 	old_status = peer->link_status;
@@ -868,8 +868,8 @@ QDF_STATUS tdls_reset_peer(struct tdls_vdev_priv_obj *vdev_obj,
 	}
 
 	if (curr_peer->is_peer_idle_timer_initialised) {
-		tdls_debug(QDF_MAC_ADDR_STR ": destroy  idle timer ",
-			   QDF_MAC_ADDR_ARRAY(curr_peer->peer_mac.bytes));
+		tdls_debug(QDF_MAC_ADDR_FMT ": destroy  idle timer ",
+			   QDF_MAC_ADDR_REF(curr_peer->peer_mac.bytes));
 		qdf_mc_timer_stop(&curr_peer->peer_idle_timer);
 		qdf_mc_timer_destroy(&curr_peer->peer_idle_timer);
 		curr_peer->is_peer_idle_timer_initialised = false;
@@ -902,9 +902,9 @@ void tdls_peer_idle_timers_destroy(struct tdls_vdev_priv_obj *vdev_obj)
 		while (QDF_IS_STATUS_SUCCESS(status)) {
 			peer = qdf_container_of(p_node, struct tdls_peer, node);
 			if (peer && peer->is_peer_idle_timer_initialised) {
-				tdls_debug(QDF_MAC_ADDR_STR
+				tdls_debug(QDF_MAC_ADDR_FMT
 					   ": destroy  idle timer ",
-					   QDF_MAC_ADDR_ARRAY(
+					   QDF_MAC_ADDR_REF(
 						   peer->peer_mac.bytes));
 				qdf_mc_timer_stop(&peer->peer_idle_timer);
 				qdf_mc_timer_destroy(&peer->peer_idle_timer);

+ 2 - 2
components/tdls/dispatcher/src/wlan_tdls_tgt_api.c

@@ -184,9 +184,9 @@ tgt_tdls_event_handler(struct wlan_objmgr_psoc *psoc,
 		tdls_err("psoc: 0x%pK, info: 0x%pK", psoc, info);
 		return QDF_STATUS_E_NULL_VALUE;
 	}
-	tdls_debug("vdev: %d, type: %d, reason: %d" QDF_MAC_ADDR_STR,
+	tdls_debug("vdev: %d, type: %d, reason: %d" QDF_MAC_ADDR_FMT,
 		   info->vdev_id, info->message_type, info->peer_reason,
-		   QDF_MAC_ADDR_ARRAY(info->peermac.bytes));
+		   QDF_MAC_ADDR_REF(info->peermac.bytes));
 	notify = qdf_mem_malloc(sizeof(*notify));
 	if (!notify) {
 		tdls_err("mem allocate fail");

+ 2 - 2
components/tdls/dispatcher/src/wlan_tdls_ucfg_api.c

@@ -659,9 +659,9 @@ QDF_STATUS ucfg_tdls_oper(struct wlan_objmgr_vdev *vdev,
 		return QDF_STATUS_E_NULL_VALUE;
 	}
 
-	tdls_debug("%s for peer " QDF_MAC_ADDR_STR,
+	tdls_debug("%s for peer " QDF_MAC_ADDR_FMT,
 		   tdls_get_oper_str(cmd),
-		   QDF_MAC_ADDR_ARRAY(macaddr));
+		   QDF_MAC_ADDR_REF(macaddr));
 
 	req = qdf_mem_malloc(sizeof(*req));
 	if (!req) {