Sfoglia il codice sorgente

qcacmn: Add API mlo_is_ml_connection_in_progress

Add API mlo_is_ml_connection_in_progress.
When wpa supplicant enable/disable roaming, need check it to avoid race
condition issue.

Change-Id: I85cc9f8b542169563881c601a477f5c646629071
CRs-Fixed: 3430980
Jianmin Zhu 2 anni fa
parent
commit
41c19f596d
2 ha cambiato i file con 55 aggiunte e 0 eliminazioni
  1. 19 0
      umac/mlo_mgr/inc/wlan_mlo_mgr_sta.h
  2. 36 0
      umac/mlo_mgr/src/wlan_mlo_mgr_sta.c

+ 19 - 0
umac/mlo_mgr/inc/wlan_mlo_mgr_sta.h

@@ -134,6 +134,18 @@ bool ucfg_mlo_is_mld_disconnected(struct wlan_objmgr_vdev *vdev);
  */
 bool mlo_is_mld_disconnecting_connecting(struct wlan_objmgr_vdev *vdev);
 
+/**
+ * mlo_is_ml_connection_in_progress - Check whether MLD assoc or link vdev is
+ * connecting
+ *
+ * @psoc: pointer to psoc
+ * @vdev_id: vdev id
+ *
+ * Return: true if mld is disconnecting, false otherwise
+ */
+bool mlo_is_ml_connection_in_progress(struct wlan_objmgr_psoc *psoc,
+				      uint8_t vdev_id);
+
 #ifndef WLAN_FEATURE_11BE_MLO_ADV_FEATURE
 /**
  * ucfg_mlo_is_mld_connected - Check whether MLD is connected
@@ -752,6 +764,13 @@ bool mlo_is_mld_disconnecting_connecting(struct wlan_objmgr_vdev *vdev)
 	return false;
 }
 
+static inline
+bool mlo_is_ml_connection_in_progress(struct wlan_objmgr_psoc *psoc,
+				      uint8_t vdev_id)
+{
+	return false;
+}
+
 static inline
 bool mlo_is_mld_sta(struct wlan_objmgr_vdev *vdev)
 {

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

@@ -170,6 +170,42 @@ bool mlo_is_mld_disconnecting_connecting(struct wlan_objmgr_vdev *vdev)
 	return false;
 }
 
+bool mlo_is_ml_connection_in_progress(struct wlan_objmgr_psoc *psoc,
+				      uint8_t vdev_id)
+{
+	struct wlan_objmgr_vdev *vdev;
+	struct wlan_mlo_dev_context *mlo_dev_ctx;
+	uint8_t i = 0;
+	bool val = false;
+
+	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
+						    WLAN_MLO_MGR_ID);
+
+	if (!vdev) {
+		mlo_err("Invalid vdev");
+		return false;
+	}
+
+	mlo_dev_ctx = vdev->mlo_dev_ctx;
+	if (!mlo_dev_ctx || !wlan_vdev_mlme_is_mlo_vdev(vdev))
+		goto end;
+
+	for (i =  0; i < WLAN_UMAC_MLO_MAX_VDEVS; i++) {
+		if (!mlo_dev_ctx->wlan_vdev_list[i])
+			continue;
+		if (qdf_test_bit(i, mlo_dev_ctx->sta_ctx->wlan_connected_links)) {
+			if (!wlan_cm_is_vdev_connected(mlo_dev_ctx->wlan_vdev_list[i])) {
+				val = true;
+				goto end;
+			}
+		}
+	}
+
+end:
+	wlan_objmgr_vdev_release_ref(vdev, WLAN_MLO_MGR_ID);
+	return val;
+}
+
 bool ucfg_mlo_is_mld_disconnected(struct wlan_objmgr_vdev *vdev)
 {
 	return mlo_is_mld_disconnected(vdev);