浏览代码

qcacmn: Clear MLO cap only when it is the last disconnect req

Clear MLO cap only when it is the last disconnect req as osif would not
have informed userspace for other disconnect req because of
cm_id mismatch

Change-Id: Ifcfde3e0efd6fb28e73679cbbccfa6f64ed35902
Himanshu Batra 3 年之前
父节点
当前提交
14325a4a60
共有 2 个文件被更改,包括 19 次插入3 次删除
  1. 7 1
      umac/mlme/connection_mgr/core/src/wlan_cm_disconnect.c
  2. 12 2
      umac/mlo_mgr/src/wlan_mlo_mgr_sta.c

+ 7 - 1
umac/mlme/connection_mgr/core/src/wlan_cm_disconnect.c

@@ -480,7 +480,13 @@ QDF_STATUS cm_notify_disconnect_complete(struct cnx_mgr *cm_ctx,
 	mlme_cm_osif_disconnect_complete(cm_ctx->vdev, resp);
 	cm_if_mgr_inform_disconnect_complete(cm_ctx->vdev);
 	cm_inform_blm_disconnect_complete(cm_ctx->vdev, resp);
-	cm_clear_vdev_mlo_cap(cm_ctx->vdev);
+
+	/* Clear MLO cap only when it is the last disconnect req
+	 * as osif would not have informed userspace for other disconnect
+	 * req because of cm_id mismatch
+	 */
+	if (cm_ctx->disconnect_count == 1)
+		cm_clear_vdev_mlo_cap(cm_ctx->vdev);
 
 	return QDF_STATUS_SUCCESS;
 }

+ 12 - 2
umac/mlo_mgr/src/wlan_mlo_mgr_sta.c

@@ -154,6 +154,11 @@ mlo_send_link_disconnect(struct wlan_mlo_dev_context *mlo_dev_ctx,
 			 struct qdf_mac_addr *bssid)
 {
 	uint8_t i = 0;
+	struct wlan_objmgr_vdev *assoc_vdev =
+			mlo_get_assoc_link_vdev(mlo_dev_ctx);
+
+	if (!assoc_vdev)
+		return QDF_STATUS_E_FAILURE;
 
 	for (i =  0; i < WLAN_UMAC_MLO_MAX_VDEVS; i++) {
 		if (!mlo_dev_ctx->wlan_vdev_list[i])
@@ -166,7 +171,7 @@ mlo_send_link_disconnect(struct wlan_mlo_dev_context *mlo_dev_ctx,
 					   NULL);
 	}
 
-	wlan_cm_disconnect(mlo_get_assoc_link_vdev(mlo_dev_ctx),
+	wlan_cm_disconnect(assoc_vdev,
 			   source, reason_code, NULL);
 	return QDF_STATUS_SUCCESS;
 }
@@ -748,6 +753,11 @@ mlo_send_link_disconnect_sync(struct wlan_mlo_dev_context *mlo_dev_ctx,
 			      struct qdf_mac_addr *bssid)
 {
 	uint8_t i = 0;
+	struct wlan_objmgr_vdev *assoc_vdev =
+			mlo_get_assoc_link_vdev(mlo_dev_ctx);
+
+	if (!assoc_vdev)
+		return QDF_STATUS_E_FAILURE;
 
 	for (i =  0; i < WLAN_UMAC_MLO_MAX_VDEVS; i++) {
 		if (!mlo_dev_ctx->wlan_vdev_list[i])
@@ -759,7 +769,7 @@ mlo_send_link_disconnect_sync(struct wlan_mlo_dev_context *mlo_dev_ctx,
 						CM_MLO_DISCONNECT, reason_code);
 	}
 
-	wlan_cm_disconnect_sync(mlo_get_assoc_link_vdev(mlo_dev_ctx),
+	wlan_cm_disconnect_sync(assoc_vdev,
 				source, reason_code);
 	return QDF_STATUS_SUCCESS;
 }