Explorar el Código

qcacld-3.0: Roam abort on mlo links

Currently for mlo roaming if roam sync event is not
handled roaming is aborted only on that vdev,
other vdevs are not cleaned up.
Another issue is link vdev is added to connection manager
list but not removed.

To fix this code change made to abort roaming on all links.
Also remove request from connection manager list.

Change-Id: Ib6e9db21b64e5c44ab7d51ebf795b169c5e7eb29
CRs-Fixed: 3305685
Amruta Kulkarni hace 2 años
padre
commit
434bb9c7ca

+ 1 - 2
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_fw_sync.c

@@ -928,8 +928,7 @@ cm_fw_roam_sync_propagation(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
 	mlme_cm_osif_connect_complete(vdev, connect_rsp);
 	mlme_cm_osif_roam_complete(vdev);
 	mlme_debug(CM_PREFIX_FMT, CM_PREFIX_REF(vdev_id, cm_id));
-	if (!wlan_vdev_mlme_is_mlo_link_vdev(vdev))
-		cm_remove_cmd(cm_ctx, &cm_id);
+	cm_remove_cmd(cm_ctx, &cm_id);
 	status = QDF_STATUS_SUCCESS;
 error:
 	if (rsp)

+ 2 - 1
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload_event.c

@@ -532,7 +532,8 @@ QDF_STATUS cm_roam_sync_event_handler_cb(struct wlan_objmgr_vdev *vdev,
 
 err:
 	if (QDF_IS_STATUS_ERROR(status)) {
-		wlan_mlo_roam_abort_on_link(psoc, sync_ind);
+		wlan_mlo_roam_abort_on_link(psoc, event,
+					    sync_ind->roamed_vdev_id);
 		cm_fw_roam_abort_req(psoc, sync_ind->roamed_vdev_id);
 		cm_roam_stop_req(psoc, sync_ind->roamed_vdev_id,
 				 REASON_ROAM_SYNCH_FAILED,

+ 6 - 5
components/umac/mlme/mlo_mgr/inc/wlan_mlo_mgr_roam.h

@@ -229,16 +229,17 @@ void mlo_cm_roam_sync_cb(struct wlan_objmgr_vdev *vdev,
  * wlan_mlo_roam_abort_on_link - Abort roam on link
  *
  * @psoc: psoc pointer
- * @sync_ind: Roam sync indication
+ * @event: Roam sync indication event pointer
+ * @vdev_id: vdev id value
  *
- * Abort roaming on all the links except the primary. Roam abort on primary
- * link would be taken care in legacy path.
+ * Abort roaming on all the links except the vdev id passed.
+ * Roam abort on vdev id link would be taken care in legacy path.
  *
  * Return: QDF_STATUS
  */
 QDF_STATUS
 wlan_mlo_roam_abort_on_link(struct wlan_objmgr_psoc *psoc,
-			    struct roam_offload_synch_ind *sync_ind);
+			    uint8_t *event, uint8_t vdev_id);
 
 #else /* WLAN_FEATURE_11BE_MLO */
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
@@ -308,7 +309,7 @@ mlo_roam_update_connected_links(struct wlan_objmgr_vdev *vdev,
 
 static inline QDF_STATUS
 wlan_mlo_roam_abort_on_link(struct wlan_objmgr_psoc *psoc,
-			    struct roam_offload_synch_ind *sync_ind)
+			    uint8_t *event, uint8_t vdev_id)
 {
 	return QDF_STATUS_E_NOSUPPORT;
 }

+ 47 - 7
components/umac/mlme/mlo_mgr/src/wlan_mlo_mgr_roam.c

@@ -150,6 +150,27 @@ mlo_clear_link_bmap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id)
 
 	wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_SB_ID);
 }
+
+static QDF_STATUS
+mlo_roam_abort_req(struct wlan_objmgr_psoc *psoc,
+		   uint8_t *event, uint8_t vdev_id)
+{
+	struct roam_offload_synch_ind *sync_ind = NULL;
+
+	sync_ind = (struct roam_offload_synch_ind *)event;
+
+	if (!sync_ind) {
+		mlme_err("Roam Sync ind ptr is NULL");
+		return QDF_STATUS_E_NULL_VALUE;
+	}
+
+	wlan_mlo_roam_abort_on_link(psoc, event, vdev_id);
+	cm_roam_stop_req(psoc, sync_ind->roamed_vdev_id,
+			 REASON_ROAM_SYNCH_FAILED,
+			 NULL, false);
+
+	return QDF_STATUS_SUCCESS;
+}
 #else
 static inline void
 mlo_clear_link_bmap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id)
@@ -175,6 +196,13 @@ mlo_check_connect_req_bmap(struct wlan_objmgr_vdev *vdev)
 {
 	return false;
 }
+
+static inline QDF_STATUS
+mlo_roam_abort_req(struct wlan_objmgr_psoc *psoc,
+		   uint8_t *event, uint8_t vdev_id)
+{
+	return QDF_STATUS_E_NOSUPPORT;
+}
 #endif
 QDF_STATUS mlo_fw_roam_sync_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
 				void *event, uint32_t event_data_len)
@@ -249,6 +277,8 @@ void mlo_cm_roam_sync_cb(struct wlan_objmgr_vdev *vdev,
 						     event, event_data_len);
 			if (QDF_IS_STATUS_ERROR(status)) {
 				mlo_clear_connect_req_links_bmap(link_vdev);
+				mlo_roam_abort_req(psoc, event,
+						   sync_ind->ml_link[i].vdev_id);
 				wlan_objmgr_vdev_release_ref(link_vdev,
 							     WLAN_MLME_SB_ID);
 				return;
@@ -441,19 +471,29 @@ mlo_roam_update_connected_links(struct wlan_objmgr_vdev *vdev,
 
 QDF_STATUS
 wlan_mlo_roam_abort_on_link(struct wlan_objmgr_psoc *psoc,
-			    struct roam_offload_synch_ind *sync_ind)
+			    uint8_t *event, uint8_t vdev_id)
 {
 	uint8_t i;
 	QDF_STATUS status;
+	struct roam_offload_synch_ind *sync_ind = NULL;
 
-	for (i = 0; i < sync_ind->num_setup_links; i++)
-		if (sync_ind->ml_link[i].vdev_id != sync_ind->roamed_vdev_id) {
+	sync_ind = (struct roam_offload_synch_ind *)event;
+
+	if (!sync_ind) {
+		mlo_err("Roam Sync ind ptr is NULL");
+		return QDF_STATUS_E_NULL_VALUE;
+	}
+
+	for (i = 0; i < sync_ind->num_setup_links; i++) {
+		if (sync_ind->ml_link[i].vdev_id != vdev_id) {
 			status = cm_fw_roam_abort_req(psoc,
-						      sync_ind->roamed_vdev_id);
-			if (QDF_IS_STATUS_ERROR(status))
-				mlme_err("LFR3: Fail to abort roam on vdev: %u",
-					 sync_ind->ml_link[i].vdev_id);
+						      sync_ind->ml_link[i].vdev_id);
+			if (QDF_IS_STATUS_ERROR(status)) {
+				mlo_err("LFR3: Fail to abort roam on vdev: %u",
+					sync_ind->ml_link[i].vdev_id);
+			}
 		}
+	}
 
 	return QDF_STATUS_SUCCESS;
 }