Browse Source

qcacld-3.0: Don't skip RSO stop command if roaming is enabled

Currently, roaming state machine relies on the disconnect
sequence where link vdev gets disconnected first and then
assoc vdev. RSO stop is sent as part of link disconnection
and skipped for assoc vdev disconnection as the roaming
state machine is per ML than per link.
If link vdev connection hasn't happened due to some
reason (e.g. link not available in scan while connect, single link
ML connection), RSO stop command is not sent to firmware due
dependency on above sequence.
Check roam state while processing assoc vdev disconnect and send
RSO stop command to firmware if it's in enabled state to cleanup
the RSO state machine in firmware.

Change-Id: If3e9a579c0f3da27a337fbbffcaf0beb580bd8bd
CRs-Fixed: 3215155
Srinivas Dasari 2 years ago
parent
commit
70e98be7ab

+ 16 - 5
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c

@@ -4218,17 +4218,28 @@ cm_handle_mlo_rso_state_change(struct wlan_objmgr_pdev *pdev,
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	struct wlan_objmgr_vdev *vdev;
 	struct wlan_objmgr_vdev *assoc_vdev = NULL;
+	struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
 
 	vdev = wlan_objmgr_get_vdev_by_id_from_pdev(pdev, *vdev_id,
 						    WLAN_MLME_NB_ID);
 	if (!vdev)
 		return QDF_STATUS_E_FAILURE;
 
-	if (wlan_vdev_mlme_get_is_mlo_vdev(wlan_pdev_get_psoc(pdev),
-					   *vdev_id)) {
-		if ((reason == REASON_DISCONNECTED ||
-		     reason == REASON_DRIVER_DISABLED) &&
-		    (cm_is_vdev_disconnecting(vdev))) {
+	if (wlan_vdev_mlme_get_is_mlo_vdev(psoc, *vdev_id) &&
+	    (reason == REASON_DISCONNECTED ||
+	     reason == REASON_DRIVER_DISABLED) &&
+	    cm_is_vdev_disconnecting(vdev)) {
+		/*
+		 * Processing disconnect on assoc vdev but roaming is still
+		 * enabled. It's either due to single ML usecase or failed to
+		 * connect to second link.
+		 */
+		if (!wlan_vdev_mlme_get_is_mlo_link(psoc, *vdev_id) &&
+		    wlan_is_roaming_enabled(pdev, *vdev_id)) {
+			mlme_debug("MLO ROAM: Process RSO stop on assoc vdev : %d",
+				   *vdev_id);
+			*is_rso_skip = false;
+		} else {
 			mlme_debug("MLO ROAM: skip RSO cmd on assoc vdev %d",
 				   *vdev_id);
 			*is_rso_skip = true;

+ 2 - 0
components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_api.h

@@ -1558,4 +1558,6 @@ bool wlan_cm_same_band_sta_allowed(struct wlan_objmgr_psoc *psoc);
  * Return: qdf_status
  */
 QDF_STATUS cm_cleanup_mlo_link(struct wlan_objmgr_vdev *vdev);
+
+bool wlan_is_roaming_enabled(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id);
 #endif  /* WLAN_CM_ROAM_API_H__ */

+ 14 - 0
components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_api.c

@@ -3392,3 +3392,17 @@ cm_cleanup_mlo_link(struct wlan_objmgr_vdev *vdev)
 
 	return status;
 }
+
+bool wlan_is_roaming_enabled(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id)
+{
+	struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
+	enum roam_offload_state cur_state;
+
+	cur_state = mlme_get_roam_state(psoc, vdev_id);
+	if (cur_state == WLAN_ROAM_RSO_ENABLED ||
+	    cur_state == WLAN_ROAMING_IN_PROG ||
+	    cur_state == WLAN_ROAM_SYNCH_IN_PROG)
+		return true;
+
+	return false;
+}

+ 1 - 10
components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_ucfg_api.c

@@ -28,16 +28,7 @@
 
 bool ucfg_is_roaming_enabled(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id)
 {
-	struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
-	enum roam_offload_state cur_state;
-
-	cur_state = mlme_get_roam_state(psoc, vdev_id);
-	if (cur_state == WLAN_ROAM_RSO_ENABLED ||
-	    cur_state == WLAN_ROAMING_IN_PROG ||
-	    cur_state == WLAN_ROAM_SYNCH_IN_PROG)
-		return true;
-
-	return false;
+	return wlan_is_roaming_enabled(pdev, vdev_id);
 }
 
 QDF_STATUS