Эх сурвалжийг харах

qcacmn: Add fix to avoid race between connect comlplete and disconnect

In case of MLO, if connect is in progress and assoc vdev is moved to
connected state, if the disconnect is received before mlo mgr is
notified for connect, then it can lead to race between connect and
disconnect processing.

Add fix to avoid race between connect comlplete and disconnect by
checking connected link bitmap which is set in mlo connect notifier

Change-Id: I5783827c00106bf6bda2949e4154088fd172de15
CRs-Fixed: 3241708
Himanshu Batra 3 жил өмнө
parent
commit
bccbe0389d

+ 10 - 0
umac/mlo_mgr/src/wlan_mlo_mgr_sta.c

@@ -423,6 +423,16 @@ mlo_validate_disconn_req(struct wlan_objmgr_vdev *vdev,
 				qdf_copy_macaddr(&sta_ctx->disconn_req->bssid,
 						 bssid);
 			return QDF_STATUS_E_BUSY;
+		} else if (wlan_cm_is_vdev_connected(mlo_dev->wlan_vdev_list[i]) &&
+			   !wlan_vdev_mlme_is_mlo_link_vdev(
+				mlo_dev->wlan_vdev_list[i])) {
+				/* If the vdev is moved to connected state but
+				 * MLO mgr is not yet notified, defer disconnect
+				 * as it can cause race between connect complete
+				 * and disconnect initiation
+				 */
+				if (!qdf_test_bit(i, sta_ctx->wlan_connected_links))
+					return QDF_STATUS_E_BUSY;
 		}
 	}
 	return QDF_STATUS_SUCCESS;