Ver Fonte

qcacmn: Decrement num vdevs in the MLD on vdev detach

Decrement number of vdevs in the MLD on vdev detach.

Change-Id: I9040ac46d60e2e8738f6b3eaf46db6b72bad729c
CRs-Fixed: 3483554
Shashikala Prabhu há 2 anos atrás
pai
commit
528a63c3ce
1 ficheiros alterados com 9 adições e 0 exclusões
  1. 9 0
      umac/mlo_mgr/src/wlan_mlo_mgr_ap.c

+ 9 - 0
umac/mlo_mgr/src/wlan_mlo_mgr_ap.c

@@ -426,10 +426,19 @@ void mlo_ap_link_start_rsp_notify(struct wlan_objmgr_vdev *vdev)
 
 void mlo_ap_vdev_detach(struct wlan_objmgr_vdev *vdev)
 {
+	struct wlan_mlo_dev_context *dev_ctx;
+
 	if (!vdev || !vdev->mlo_dev_ctx) {
 		mlo_err("Invalid input");
 		return;
 	}
+
+	dev_ctx = vdev->mlo_dev_ctx;
+
+	mlo_dev_lock_acquire(dev_ctx);
+	dev_ctx->ap_ctx->num_ml_vdevs--;
+	mlo_dev_lock_release(dev_ctx);
+
 	wlan_vdev_mlme_clear_mlo_vdev(vdev);
 }