浏览代码

qcacld-3.0: Fix to populate band for stand by vdev

In T2LM status event currently band info is not populating
for the stand by vdev

Update band info for stand by vdev also

Change-Id: If7413158a1e3edf170ae04791d377a4ad6008544
CRs-Fixed: 3624562
Vinod Kumar Myadam 1 年之前
父节点
当前提交
e4a6ca8d3c

+ 7 - 5
components/cmn_services/logging/inc/wlan_connectivity_logging.h

@@ -1253,13 +1253,11 @@ wlan_connectivity_t2lm_req_resp_event(struct wlan_objmgr_vdev *vdev,
 				      bool is_rx, uint8_t subtype);
 /**
  * wlan_connectivity_t2lm_status_event() - Fill and send T2LM data
- * @psoc: Pointer to global psoc object
  * @vdev: vdev pointer
  *
  * Return: None
  */
-void wlan_connectivity_t2lm_status_event(struct wlan_objmgr_psoc *psoc,
-					 struct wlan_objmgr_vdev *vdev);
+void wlan_connectivity_t2lm_status_event(struct wlan_objmgr_vdev *vdev);
 
 /**
  * wlan_populate_mlo_mgmt_event_param() - API to populate MLO management frame
@@ -1296,8 +1294,7 @@ wlan_connectivity_t2lm_req_resp_event(struct wlan_objmgr_vdev *vdev,
 {}
 
 static inline void
-wlan_connectivity_t2lm_status_event(struct wlan_objmgr_psoc *psoc,
-				    struct wlan_objmgr_vdev *vdev)
+wlan_connectivity_t2lm_status_event(struct wlan_objmgr_vdev *vdev)
 {
 }
 
@@ -1562,6 +1559,11 @@ wlan_connectivity_t2lm_req_resp_event(struct wlan_objmgr_vdev *vdev,
 				      bool is_rx, uint8_t subtype)
 {}
 
+static inline void
+wlan_connectivity_t2lm_status_event(struct wlan_objmgr_vdev *vdev)
+{
+}
+
 static inline void
 wlan_connectivity_connecting_event(struct wlan_objmgr_vdev *vdev)
 {

+ 28 - 44
components/cmn_services/logging/src/wlan_connectivity_logging.c

@@ -548,34 +548,21 @@ wlan_connectivity_mlo_setup_event(struct wlan_objmgr_vdev *vdev)
 
 #define IS_LINK_SET(link_bitmap, link_id) ((link_bitmap) & (BIT(link_id)))
 
-static QDF_STATUS
-wlan_popluatate_tid_link_id_bitmap(struct wlan_objmgr_vdev *vdev,
-				   struct mlo_link_info *link_info,
-				   struct wlan_diag_mlo_t2lm_status *buf,
-				   uint8_t bss_link)
+static void
+wlan_populate_tid_link_id_bitmap(struct wlan_t2lm_info *t2lm,
+				 struct mlo_link_info *link_info,
+				 struct wlan_diag_mlo_t2lm_status *buf,
+				 uint8_t bss_link)
 {
 	uint8_t link_id;
-	struct wlan_t2lm_info t2lm[WLAN_T2LM_MAX_DIRECTION] = {0};
 	uint8_t dir, i;
 	uint16_t freq;
-	QDF_STATUS status;
 
 	link_id = link_info->link_id;
-	for (dir = 0; dir < WLAN_T2LM_MAX_DIRECTION; dir++)
-		t2lm[dir].direction = WLAN_T2LM_INVALID_DIRECTION;
-
-	status = wlan_get_t2lm_mapping_status(vdev, t2lm);
-	if (QDF_IS_STATUS_ERROR(status)) {
-		logging_err("Unable to get t2lm_mapping");
-		return QDF_STATUS_E_FAILURE;
-	}
-
 	freq = link_info->link_chan_info->ch_freq;
-
 	buf->mlo_cmn_info[bss_link].band =
 		wlan_convert_freq_to_diag_band(freq);
-
-	buf->mlo_cmn_info[bss_link].vdev_id = wlan_vdev_get_id(vdev);
+	buf->mlo_cmn_info[bss_link].vdev_id = link_info->vdev_id;
 
 	for (dir = 0; dir < WLAN_T2LM_MAX_DIRECTION; dir++) {
 		for (i = 0; i < T2LM_MAX_NUM_TIDS; i++) {
@@ -611,16 +598,15 @@ wlan_popluatate_tid_link_id_bitmap(struct wlan_objmgr_vdev *vdev,
 			}
 		}
 	}
-	return QDF_STATUS_SUCCESS;
 }
 
 void
-wlan_connectivity_t2lm_status_event(struct wlan_objmgr_psoc *psoc,
-				    struct wlan_objmgr_vdev *vdev)
+wlan_connectivity_t2lm_status_event(struct wlan_objmgr_vdev *vdev)
 {
-	uint8_t i = 0;
+	uint8_t i = 0, dir;
 	QDF_STATUS status;
 	struct mlo_link_info *link_info;
+	struct wlan_t2lm_info t2lm[WLAN_T2LM_MAX_DIRECTION] = {0};
 
 	WLAN_HOST_DIAG_EVENT_DEF(wlan_diag_event,
 				 struct wlan_diag_mlo_t2lm_status);
@@ -628,44 +614,42 @@ wlan_connectivity_t2lm_status_event(struct wlan_objmgr_psoc *psoc,
 	if (!mlo_is_mld_sta(vdev))
 		return;
 
-	wlan_diag_event.diag_cmn.timestamp_us = qdf_get_time_of_the_day_us();
-	wlan_diag_event.diag_cmn.ktime_us = qdf_ktime_to_us(qdf_ktime_get());
-	wlan_diag_event.version = DIAG_MLO_T2LM_STATUS_VERSION;
-
 	if (!vdev->mlo_dev_ctx) {
 		logging_err("MLO dev ctx not found");
 		return;
 	}
-
 	link_info = mlo_mgr_get_ap_link(vdev);
 	if (!link_info) {
 		logging_err("link_info invalid");
 		return;
 	}
 
+	if (mlo_mgr_is_link_switch_in_progress(vdev))
+		return;
+
+	wlan_diag_event.diag_cmn.timestamp_us = qdf_get_time_of_the_day_us();
+	wlan_diag_event.diag_cmn.ktime_us = qdf_ktime_to_us(qdf_ktime_get());
+	wlan_diag_event.version = DIAG_MLO_T2LM_STATUS_VERSION;
+
+	for (dir = 0; dir < WLAN_T2LM_MAX_DIRECTION; dir++)
+		t2lm[dir].direction = WLAN_T2LM_INVALID_DIRECTION;
+
+	status = wlan_get_t2lm_mapping_status(vdev, t2lm);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		logging_err("Unable to get t2lm_mapping");
+		return;
+	}
+
 	for (i = 0; i < WLAN_MAX_ML_BSS_LINKS && i < MAX_BANDS; i++) {
-		if (qdf_is_macaddr_zero(&link_info->ap_link_addr) ||
+		if (qdf_is_macaddr_zero(&link_info->ap_link_addr) &&
 		    link_info->vdev_id == WLAN_INVALID_VDEV_ID)
 			continue;
 
-		vdev = wlan_objmgr_get_vdev_by_id_from_psoc(
-							psoc,
-							link_info->vdev_id,
-							WLAN_MLO_MGR_ID);
-		if (!vdev)
-			continue;
-		status =
-			wlan_popluatate_tid_link_id_bitmap(vdev,
-							   link_info,
-							   &wlan_diag_event,
-							   i);
-		wlan_objmgr_vdev_release_ref(vdev, WLAN_MLO_MGR_ID);
-		if (QDF_IS_STATUS_ERROR(status))
-			goto out;
+		wlan_populate_tid_link_id_bitmap(t2lm, link_info,
+						 &wlan_diag_event, i);
 		link_info++;
 	}
 
-out:
 	WLAN_HOST_DIAG_EVENT_REPORT(&wlan_diag_event,
 				    EVENT_WLAN_MLO_T2LM_STATUS);
 }

+ 4 - 6
components/umac/mlme/connection_mgr/core/src/wlan_cm_vdev_connect.c

@@ -1635,8 +1635,7 @@ static void cm_process_connect_complete(struct wlan_objmgr_psoc *psoc,
 
 #ifdef WLAN_FEATURE_11BE_MLO
 static QDF_STATUS
-cm_update_tid_mapping(struct wlan_objmgr_psoc *psoc,
-		      struct wlan_objmgr_vdev *vdev)
+cm_update_tid_mapping(struct wlan_objmgr_vdev *vdev)
 {
 	struct wlan_t2lm_context *t2lm_ctx;
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
@@ -1661,14 +1660,13 @@ cm_update_tid_mapping(struct wlan_objmgr_psoc *psoc,
 	if (QDF_IS_STATUS_ERROR(status)) {
 		mlme_err("T2LM IE beacon process failed");
 	}
-	wlan_connectivity_t2lm_status_event(psoc, vdev);
+	wlan_connectivity_t2lm_status_event(vdev);
 
 	return status;
 }
 #else
 static inline QDF_STATUS
-cm_update_tid_mapping(struct wlan_objmgr_psoc *psoc,
-		      struct wlan_objmgr_vdev *vdev)
+cm_update_tid_mapping(struct wlan_objmgr_vdev *vdev)
 {
 	return QDF_STATUS_SUCCESS;
 }
@@ -1781,7 +1779,7 @@ cm_connect_complete_ind(struct wlan_objmgr_vdev *vdev,
 					     mlme_get_tdls_prohibited(vdev),
 					     vdev);
 		wlan_p2p_status_connect(vdev);
-		cm_update_tid_mapping(psoc, vdev);
+		cm_update_tid_mapping(vdev);
 		cm_update_associated_ch_info(vdev, true);
 	}
 

+ 5 - 2
core/mac/src/pe/lim/lim_process_action_frame.c

@@ -2196,12 +2196,15 @@ void lim_process_action_frame(struct mac_context *mac_ctx,
 
 			if (lim_send_t2lm_action_rsp_frame(
 					mac_ctx, mac_hdr->sa, session, token,
-					status_code) != QDF_STATUS_SUCCESS)
+					status_code) != QDF_STATUS_SUCCESS) {
 				pe_err("T2LM action response frame not sent");
-			else
+			} else {
 				wlan_send_peer_level_tid_to_link_mapping(
 								session->vdev,
 								peer);
+				wlan_connectivity_t2lm_status_event(
+								session->vdev);
+			}
 			break;
 		case EHT_T2LM_RESPONSE:
 			wlan_t2lm_deliver_event(