Parcourir la source

qcacld-3.0: Modify number of station interfaces for mlo

With 11be mlo, the number of open station interfaces is 3.
Modify the check in policy manager api for the same.

CRs-Fixed: 3320739
Change-Id: I89166ebdf1559cde6f77f5a5c535e5f2e81eefc5
Amruta Kulkarni il y a 2 ans
Parent
commit
eb4164dbf3

+ 46 - 12
components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c

@@ -8959,9 +8959,52 @@ bool policy_mgr_is_sta_mon_concurrency(struct wlan_objmgr_psoc *psoc)
 	return false;
 }
 
+#ifdef WLAN_FEATURE_11BE_MLO
+static QDF_STATUS
+policy_mgr_check_num_of_sta_sessions(struct wlan_objmgr_psoc *psoc) {
+	uint8_t num_open_session = 0;
+
+	/* Ensure there are only 3 station interface when 11be mlo is enabled */
+	if (policy_mgr_mode_specific_num_open_sessions(
+				psoc,
+				QDF_STA_MODE,
+				&num_open_session) != QDF_STATUS_SUCCESS)
+		return QDF_STATUS_E_INVAL;
+
+	if (num_open_session > 3) {
+		policy_mgr_err("cannot add monitor mode, due to %u sta interfaces",
+			       num_open_session);
+		return QDF_STATUS_E_INVAL;
+	}
+
+	return QDF_STATUS_SUCCESS;
+}
+#else
+static QDF_STATUS
+policy_mgr_check_num_of_sta_sessions(struct wlan_objmgr_psoc *psoc) {
+	uint8_t num_open_session = 0;
+
+	/* Ensure there is only one station interface for legacy mode */
+	if (policy_mgr_mode_specific_num_open_sessions(
+				psoc,
+				QDF_STA_MODE,
+				&num_open_session) != QDF_STATUS_SUCCESS)
+		return QDF_STATUS_E_INVAL;
+
+	if (num_open_session > 1) {
+		policy_mgr_err("cannot add monitor mode, due to %u sta interfaces",
+			       num_open_session);
+		return QDF_STATUS_E_INVAL;
+	}
+
+	return QDF_STATUS_SUCCESS;
+}
+#endif
+
 QDF_STATUS policy_mgr_check_mon_concurrency(struct wlan_objmgr_psoc *psoc)
 {
 	uint8_t num_open_session = 0;
+	QDF_STATUS status = QDF_STATUS_SUCCESS;
 
 	if (policy_mgr_mode_specific_num_open_sessions(
 				psoc,
@@ -8984,18 +9027,9 @@ QDF_STATUS policy_mgr_check_mon_concurrency(struct wlan_objmgr_psoc *psoc)
 		return QDF_STATUS_E_INVAL;
 	}
 
-	/* Ensure there is only one station interface */
-	if (policy_mgr_mode_specific_num_open_sessions(
-				psoc,
-				QDF_STA_MODE,
-				&num_open_session) != QDF_STATUS_SUCCESS)
-		return QDF_STATUS_E_INVAL;
-
-	if (num_open_session > 1) {
-		policy_mgr_err("cannot add monitor mode, due to %u sta interfaces",
-			       num_open_session);
-		return QDF_STATUS_E_INVAL;
-	}
+	status = policy_mgr_check_num_of_sta_sessions(psoc);
+	if (QDF_IS_STATUS_ERROR(status))
+		return status;
 
 	num_open_session = policy_mgr_mode_specific_connection_count(
 					psoc,