瀏覽代碼

qcacld-3.0: Add PCL handling for ML STA + P2P + P2P

Add PCL handling for ML STA + P2P + P2P concurrencies,
based on current hw mode (SBS/DBS/SMM).

Change-Id: I337b12a0c03ab89968572056f27f47a6b9392803
CRs-Fixed: 3177305
Sheenam Monga 3 年之前
父節點
當前提交
4d63e56111

+ 53 - 19
components/cmn_services/policy_mgr/inc/wlan_policy_mgr_public_struct.h

@@ -852,8 +852,12 @@ enum policy_mgr_two_connection_mode {
  * SAP on 2.4 G
  * @PM_STA_SAP_24_STA_5_DBS: STA & SAP connection on 2.4 Ghz SCC/MCC, another
  * STA on 5G
+ * @PM_STA_STA_24_SAP_5_DBS: STA & STA connection on 2.4 GHZ SCC/MCC,
+ * SAP on 5 GHZ
  * @PM_STA_SAP_5_STA_24_DBS: STA & SAP connection on 5 Ghz SCC/MCC, another
  * STA on 2.4 G
+ * @PM_STA_STA_5_SAP_24_DBS: STA & STA connection on 5 GHZ SCC/MCC,
+ * SAP on 2.4 GHZ
  * @PM_NAN_DISC_SAP_SCC_24_NDI_5_DBS: NAN_DISC & SAP connection on 2.4 Ghz SCC,
  * NDI/NDP on 5 G
  * @PM_NAN_DISC_NDI_SCC_24_SAP_5_DBS: NAN_DISC & NDI/NDP connection on 2.4 Ghz
@@ -890,25 +894,39 @@ enum policy_mgr_two_connection_mode {
  * and second STA on 5Ghz SMM
  * @PM_NAN_DISC_24_STA_24_STA_5_DBS: NAN Disc on 2.4Ghz and first STA on 2.4Ghz
  * and second STA on 5Ghz DBS
- * @PM_STA_24_SAP_5_LOW_MCC_STA_5_HIGH_SBS : First STA on 2.4 & SAP on low 5G
- * MCC on mac 0 and second STA on high 5g on mac1
- * @PM_STA_24_SAP_5_HIGH_MCC_STA_5_LOW_SBS : First STA on 2.4 & SAP on high 5G
- * MCC on mac 0 and second STA on high 5g on mac1
- * @PM_STA_SAP_5_LOW_STA_5_HIGH_SBS : First STA on low 5G & SAP on low 5G
- * SCC/MCC on mac0 and second STA on high 5G on mac1
- * @PM_STA_SAP_5_HIGH_STA_5_LOW_SBS : First STA on high 5G & SAP on high 5G
- * SCC/MCC on mac1 and second STA on low 5G on mac0
- * @PM_STA_5_LOW_SAP_24_MCC_STA_5_HIGH_SBS : First STA on low 5G & SAP on high
- * 2.4G MCC on mac0 and second STA on high 5g on mac1
- * @PM_STA_5_HIGH_SAP_24_MCC_STA_5_LOW_SBS : First STA on high 5G & SAP on 2.4G
- * MCC on mac1 and second STA on low 5g on mac0
+ * @PM_STA_STA_SAP_MCC_SCC_5G_HIGH_PLUS_5_LOW_SBS: ANY 2 link on 5 GHZ high mac
+ * and one link on 5 GHZ low doing SBS
+ * @PM_STA_24_SAP_5_HIGH_MCC_STA_5_LOW_SBS : First STA on 2.4 GHZ & SAP on high
+ * 5 GHZ MCC on mac 0 and second STA on low 5 GHZ on mac1 doing SBS
+ * @PM_STA_24_STA_5_HIGH_MCC_SAP_5_LOW_SBS : First STA on 2.4 GHZ & second STA
+ * on high 5 GHZ MCC on mac 0 and SAP on high 5 GHZ on mac1 doing SBS
+ * @PM_STA_SAP_5_HIGH_STA_5_LOW_SBS : First STA on high 5 GHZ & SAP on high
+ * 5 GHZ SCC/MCC on mac0 and second STA on low 5 GHZ on mac1 doing SBS
+ * @PM_STA_5_HIGH_SAP_24_MCC_STA_5_LOW_SBS : First STA on high 5 GHZ & SAP on
+ * 2.4 GHZ MCC on mac0 and second STA on low 5 GHZ on mac1 doing SBS
+ * @PM_STA_STA_5_HIGH_MCC_SAP_5_LOW_SBS : First STA on high 5 GHZ & Second STA
+ * on high 5 GHZ MCC on mac0 and SAP on low 5 GHZ on mac1 doing SBS
+ * @PM_STA_STA_SAP_MCC_SCC_5G_LOW_PLUS_5_HIGH_SBS: Any 2 link on low 5 GHZ mac
+ * and one link on high 5 GHZ freq doing SBS
+ * @PM_STA_24_SAP_5_LOW_MCC_STA_5_HIGH_SBS : First STA on 2.4 GHZ & SAP on low
+ * 5 GHZ MCC on mac 0 and second STA on high 5 GHZ on mac1 doing SBS
+ * @PM_STA_24_STA_5_LOW_MCC_SAP_5_HIGH_SBS : First STA on 2.4 & second STA on
+ * low 5G MCC on mac 0 and SAP on high 5g on mac1 doing SBS
+ * @PM_STA_SAP_5_LOW_STA_5_HIGH_SBS : First STA on low 5 GHZ & SAP on low 5 GHZ
+ * SCC/MCC on mac0 and second STA on high 5 GHZ on mac1 doing SBS
+ * @PM_STA_5_LOW_SAP_24_MCC_STA_5_HIGH_SBS : First STA on low 5 GHZ & SAP on
+ * 2.4 GHZ MCC on mac0 and second STA on high 5 GHZ on mac1 doing SBS
+ * @PM_STA_STA_5_LOW_MCC_SAP_5_HIGH_SBS : First STA on high 5 GHZ & Second STA
+ * on high 5 GHZ MCC on mac0 and SAP on low 5 GHZ on mac1 doing SBS
  *
  */
 enum policy_mgr_three_connection_mode {
 	PM_STA_SAP_SCC_24_SAP_5_DBS,
 	PM_STA_SAP_SCC_5_SAP_24_DBS,
 	PM_STA_SAP_24_STA_5_DBS,
+	PM_STA_STA_24_SAP_5_DBS = PM_STA_SAP_24_STA_5_DBS,
 	PM_STA_SAP_5_STA_24_DBS,
+	PM_STA_STA_5_SAP_24_DBS = PM_STA_SAP_5_STA_24_DBS,
 	PM_NAN_DISC_SAP_SCC_24_NDI_5_DBS,
 	PM_NAN_DISC_NDI_SCC_24_SAP_5_DBS,
 	PM_SAP_NDI_SCC_5_NAN_DISC_24_DBS,
@@ -933,14 +951,30 @@ enum policy_mgr_three_connection_mode {
 	PM_NAN_DISC_24_STA_5_STA_24_DBS,
 	PM_NAN_DISC_24_STA_24_STA_5_SMM,
 	PM_NAN_DISC_24_STA_24_STA_5_DBS,
-	PM_STA_24_SAP_5_LOW_MCC_STA_5_HIGH_SBS,
-	PM_STA_24_SAP_5_HIGH_MCC_STA_5_LOW_SBS,
-	PM_STA_SAP_5_LOW_STA_5_HIGH_SBS,
-	PM_STA_SAP_5_HIGH_STA_5_LOW_SBS,
-	PM_STA_5_LOW_SAP_24_MCC_STA_5_HIGH_SBS,
-	PM_STA_5_HIGH_SAP_24_MCC_STA_5_LOW_SBS,
+	PM_STA_STA_SAP_MCC_SCC_5G_HIGH_PLUS_5_LOW_SBS,
+	PM_STA_24_SAP_5_HIGH_MCC_STA_5_LOW_SBS =
+		PM_STA_STA_SAP_MCC_SCC_5G_HIGH_PLUS_5_LOW_SBS,
+	PM_STA_24_STA_5_HIGH_MCC_SAP_5_LOW_SBS =
+		PM_STA_STA_SAP_MCC_SCC_5G_HIGH_PLUS_5_LOW_SBS,
+	PM_STA_SAP_5_HIGH_STA_5_LOW_SBS =
+		PM_STA_STA_SAP_MCC_SCC_5G_HIGH_PLUS_5_LOW_SBS,
+	PM_STA_5_HIGH_SAP_24_MCC_STA_5_LOW_SBS =
+		PM_STA_STA_SAP_MCC_SCC_5G_HIGH_PLUS_5_LOW_SBS,
+	PM_STA_STA_5_HIGH_MCC_SAP_5_LOW_SBS =
+		PM_STA_STA_SAP_MCC_SCC_5G_HIGH_PLUS_5_LOW_SBS,
+	PM_STA_STA_SAP_MCC_SCC_5G_LOW_PLUS_5_HIGH_SBS,
+	PM_STA_24_SAP_5_LOW_MCC_STA_5_HIGH_SBS =
+		PM_STA_STA_SAP_MCC_SCC_5G_LOW_PLUS_5_HIGH_SBS,
+	PM_STA_24_STA_5_LOW_MCC_SAP_5_HIGH_SBS =
+		PM_STA_STA_SAP_MCC_SCC_5G_LOW_PLUS_5_HIGH_SBS,
+	PM_STA_SAP_5_LOW_STA_5_HIGH_SBS =
+		PM_STA_STA_SAP_MCC_SCC_5G_LOW_PLUS_5_HIGH_SBS,
+	PM_STA_5_LOW_SAP_24_MCC_STA_5_HIGH_SBS =
+		PM_STA_STA_SAP_MCC_SCC_5G_LOW_PLUS_5_HIGH_SBS,
+	PM_STA_STA_5_LOW_MCC_SAP_5_HIGH_SBS =
+		PM_STA_STA_SAP_MCC_SCC_5G_LOW_PLUS_5_HIGH_SBS,
 
-	PM_MAX_THREE_CONNECTION_MODE
+	PM_MAX_THREE_CONNECTION_MODE,
 };
 #endif
 

+ 1 - 1
components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c

@@ -1401,7 +1401,7 @@ policy_mgr_2_freq_same_mac_in_freq_range(
 	return false;
 }
 
-static bool
+bool
 policy_mgr_2_freq_same_mac_in_sbs(struct policy_mgr_psoc_priv_obj *pm_ctx,
 				  qdf_freq_t freq_1, qdf_freq_t freq_2)
 {

+ 15 - 0
components/cmn_services/policy_mgr/src/wlan_policy_mgr_i.h

@@ -845,4 +845,19 @@ bool policy_mgr_is_concurrency_allowed(struct wlan_objmgr_psoc *psoc,
 				       uint32_t ch_freq,
 				       enum hw_mode_bandwidth bw,
 				       uint32_t ext_flags);
+
+/**
+ * policy_mgr_2_freq_same_mac_in_sbs() - to check provided frequencies are
+ * in sbs freq range or not
+ *
+ * @pm_ctx: policy mgr psoc priv object
+ * @freq_1: first frequency
+ * @freq_2: second frequency
+ *
+ * This API is used to check provided frequencies are in sbs freq range or not
+ *
+ * Return: true/false.
+ */
+bool policy_mgr_2_freq_same_mac_in_sbs(struct policy_mgr_psoc_priv_obj *pm_ctx,
+				       qdf_freq_t freq_1, qdf_freq_t freq_2);
 #endif

+ 280 - 3
components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c

@@ -2045,6 +2045,267 @@ policy_mgr_get_third_connection_pcl_table_index(
 }
 
 #ifdef FEATURE_FOURTH_CONNECTION
+#ifdef WLAN_FEATURE_11BE_MLO
+/**
+ * policy_mgr_get_index_for_ml_sta_sap_dbs() - Find the index for next
+ * connection for ML STA + SAP, in case current HW mode is DBS and ML STA is
+ * 2.4 GHZ + 5 GHZ/6 GHZ OR if SBS is not supported.
+ * @pm_ctx: policy manager context
+ * @index: Index to return for next connection
+ * @sap_freq: SAP freq
+ * @sta_freq_list: STA freq list
+ * @ml_sta_idx: ML STA index in freq_list
+ *
+ * This function finds the index for next
+ * connection for ML STA + SAP, in case current HW mode is DBS and ML STA is
+ * 2.4 GHZ + 5 GHZ/6 GHZ OR if SBS is not supported.
+ *
+ * Return: none
+ */
+static void
+policy_mgr_get_index_for_ml_sta_sap_dbs(
+	struct policy_mgr_psoc_priv_obj *pm_ctx,
+	enum policy_mgr_three_connection_mode *index, qdf_freq_t sap_freq,
+	qdf_freq_t *sta_freq_list, uint8_t *ml_sta_idx)
+{
+	/* If ML STA and SAP all are on same band */
+	if ((WLAN_REG_IS_24GHZ_CH_FREQ(sta_freq_list[ml_sta_idx[0]]) ==
+	     WLAN_REG_IS_24GHZ_CH_FREQ(sta_freq_list[ml_sta_idx[1]])) &&
+	    (WLAN_REG_IS_24GHZ_CH_FREQ(sta_freq_list[ml_sta_idx[0]]) ==
+	     WLAN_REG_IS_24GHZ_CH_FREQ(sap_freq))) {
+		policy_mgr_err("Invalid mode for ML STA %d and %d are on same band as SAP %d",
+			       sta_freq_list[ml_sta_idx[0]],
+			       sta_freq_list[ml_sta_idx[1]], sap_freq);
+		return;
+	}
+
+	/*
+	 * If ML STA is MCC and SAP is on differet band and is not sharing mac
+	 * with any link. SAP on same band is handled above, so ML STA on same
+	 * band mean SAP cannot be on same band. This can happen if SBS is not
+	 * enabled.
+	 */
+	if (WLAN_REG_IS_24GHZ_CH_FREQ(sta_freq_list[ml_sta_idx[0]]) ==
+	    WLAN_REG_IS_24GHZ_CH_FREQ(sta_freq_list[ml_sta_idx[1]])) {
+		if (WLAN_REG_IS_24GHZ_CH_FREQ(sap_freq))
+			/*
+			 * As all 3 cannot be on same band, so if SAP is 2.4 GHZ
+			 * mean both ML STA are on 5 / 6 GHZ
+			 */
+			*index = PM_STA_STA_5_SAP_24_DBS;
+		else
+			/*
+			 * As all 3 cannot be on same band, so if SAP is
+			 *  5 / 6 GHZ, mean both ML STA are on 2.4 GHZ.
+			 */
+			policy_mgr_err("Invalid mode for ML STA %d and %d are on 2.4 GHZ, sap freq %d",
+				       sta_freq_list[ml_sta_idx[0]],
+				       sta_freq_list[ml_sta_idx[1]], sap_freq);
+
+		return;
+	}
+
+	/*
+	 * if ML STA is 2 GHZ + 5 GHZ/6 GHZ DBS, check with which freq the SAP
+	 * will share mac, and return index as per it.
+	 */
+	if (WLAN_REG_IS_24GHZ_CH_FREQ(sap_freq))
+		*index = PM_STA_SAP_24_STA_5_DBS;
+	else
+		*index = PM_STA_SAP_5_STA_24_DBS;
+}
+
+/**
+ * policy_mgr_get_index_for_ml_sta_sap_sbs() - Find the index for next
+ * connection for ML STA + SAP, in case current HW mode is SBS or ML STA is
+ * with 5 GHZ + 5 GHZ/6 GHZ SBS separation.
+ * @pm_ctx: policy manager context
+ * @index: Index to return for next connection
+ * @sap_freq: SAP freq
+ * @sta_freq_list: STA freq list
+ * @ml_sta_idx: ML STA index in freq_list
+ *
+ * This function finds the index for next
+ * connection for ML STA + SAP, in case current HW mode is SBS or ML STA is
+ * with 5 GHZ + 5 GHZ/6 GHZ SBS separation.
+ *
+ * Return: none
+ */
+static void policy_mgr_get_index_for_ml_sta_sap_sbs(
+	struct policy_mgr_psoc_priv_obj *pm_ctx,
+	enum policy_mgr_three_connection_mode *index, qdf_freq_t sap_freq,
+	qdf_freq_t *sta_freq_list, uint8_t *ml_sta_idx)
+{
+	qdf_freq_t sbs_cut_off_freq;
+
+	/*
+	 * Sanity check: At least one of the 3 combo (ML STA OR SAP + one of
+	 * ML STA link) needs to be creating SBS separation for
+	 * HW mode to be in SBS, if not it shouldn't have entered this API.
+	 */
+	if (!policy_mgr_are_sbs_chan(pm_ctx->psoc, sta_freq_list[ml_sta_idx[0]],
+				     sta_freq_list[ml_sta_idx[1]]) &&
+	    !policy_mgr_are_sbs_chan(pm_ctx->psoc, sap_freq,
+				     sta_freq_list[ml_sta_idx[0]]) &&
+	    !policy_mgr_are_sbs_chan(pm_ctx->psoc, sap_freq,
+				     sta_freq_list[ml_sta_idx[1]])) {
+		policy_mgr_err("SAP freq (%d) and ML STA freq %d and %d, none of the 2 connections/3 vdevs are leading to SBS",
+			       sap_freq,
+			       sta_freq_list[ml_sta_idx[0]],
+			       sta_freq_list[ml_sta_idx[1]]);
+		return;
+	}
+
+	sbs_cut_off_freq =  policy_mgr_get_sbs_cut_off_freq(pm_ctx->psoc);
+	if (!sbs_cut_off_freq) {
+		policy_mgr_err("Invalid cutoff freq");
+		return;
+	}
+
+	if (WLAN_REG_IS_24GHZ_CH_FREQ(sap_freq)) {
+		/*
+		 * if SAP is 2.4 GHZ that means both ML STA needs to
+		 * be with 5 GHZ + 5 GHZ/6 GHZ SBS separation. If not, it would
+		 * have failed the sanity check. So Get STA link with
+		 * which SAP freq is sharing mac and select index accordingly
+		 */
+		if (policy_mgr_2_freq_same_mac_in_sbs(
+						pm_ctx, sap_freq,
+						sta_freq_list[ml_sta_idx[0]])) {
+			/*
+			 * SAP is sharig mac with link ml_sta_idx[0], so check
+			 * if ml_sta_idx[0] is lower 5 GHZ or high 5 GHZ and
+			 * select index
+			 */
+			if (sta_freq_list[ml_sta_idx[0]] < sbs_cut_off_freq)
+				*index = PM_STA_5_LOW_SAP_24_MCC_STA_5_HIGH_SBS;
+			else
+				*index = PM_STA_5_HIGH_SAP_24_MCC_STA_5_LOW_SBS;
+		} else {
+			/*
+			 * SAP is sharig mac with link ml_sta_idx[1], so check
+			 * if ml_sta_idx[1] is lower 5 GHZ or high 5 GHZ and
+			 * select index
+			 */
+			if (sta_freq_list[ml_sta_idx[1]] < sbs_cut_off_freq)
+				*index = PM_STA_5_LOW_SAP_24_MCC_STA_5_HIGH_SBS;
+			else
+				*index = PM_STA_5_HIGH_SAP_24_MCC_STA_5_LOW_SBS;
+		}
+
+		return;
+	}
+
+	/* SAP freq is 5 GHZ or 6 GHZ and one ML sta is on 2.4 GHZ */
+	if (WLAN_REG_IS_24GHZ_CH_FREQ(sta_freq_list[ml_sta_idx[0]]) ||
+	    WLAN_REG_IS_24GHZ_CH_FREQ(sta_freq_list[ml_sta_idx[1]])) {
+		/*
+		 * If (2 GHZ + 5 GHZ/6 GHZ) ML is MCC i.e Both sta links are on
+		 * same mac and SAP is on separate mac. This can happen if SBS
+		 * is not dynamic and is low 5 GHZ shared, with ML STA on 5 GHZ
+		 * low along with SAP 5Ghz high and vice versa. As both links
+		 * of ML STA and sap are on different mac, so set index based
+		 * on sap frequency whether it is in 5 GHZ low band or 5 GHZ
+		 * high Band.
+		 */
+		if (policy_mgr_2_freq_same_mac_in_sbs(
+					pm_ctx, sta_freq_list[ml_sta_idx[0]],
+					sta_freq_list[ml_sta_idx[1]])) {
+			if (sap_freq < sbs_cut_off_freq)
+				*index = PM_STA_24_STA_5_HIGH_MCC_SAP_5_LOW_SBS;
+			else
+				*index = PM_STA_24_STA_5_LOW_MCC_SAP_5_HIGH_SBS;
+		} else {
+			/*
+			 * STA ML is (2 GHZ + 5 GHZ/6 GHZ) select as per the SAP
+			 * freq, as for current mode to be in SBS, SAP will
+			 * share mac with STA 2.4 GHZ Link or will not share
+			 * mac at all (2 GHZ + 5 GHZ/6 GHZ MCC). Other case i.e
+			 * 2 links on 5 GHZ and one STA link on 2 GHZ is DBS and
+			 * sanity check already taken care this at start of the
+			 * func.
+			 */
+			if (sap_freq < sbs_cut_off_freq)
+				*index = PM_STA_24_SAP_5_LOW_MCC_STA_5_HIGH_SBS;
+			else
+				*index = PM_STA_24_SAP_5_HIGH_MCC_STA_5_LOW_SBS;
+		}
+		return;
+	}
+	/*
+	 * If (5 GHZ + 5 GHZ/6 GHZ) ML is MCC i.e SAP is not sharing mac
+	 * with any link. This can happen if SBS is not dynamic and is
+	 * low 5 GHZ shared, with ML STA on 5 GHZ low along with SAP 5 GHZ
+	 * high and vice versa. As both ML sta link are on same mac and
+	 * sap is on different mac, so decide whether ML links are sharing
+	 * low 5 GHZ frequency or high 5 GHZ frequency based on sap frequency
+	 */
+	if (policy_mgr_2_freq_same_mac_in_sbs(
+				pm_ctx, sta_freq_list[ml_sta_idx[0]],
+				sta_freq_list[ml_sta_idx[1]])) {
+		if (sap_freq < sbs_cut_off_freq)
+			*index = PM_STA_STA_5_HIGH_MCC_SAP_5_LOW_SBS;
+		else
+			*index = PM_STA_STA_5_LOW_MCC_SAP_5_HIGH_SBS;
+	} else {
+		/*
+		 * STA ML is (5 GHZ + 5 GHZ/6 GHZ SBS/MCC), select as per the
+		 * SAP freq, as for current mode to be in SBS, SAP will share
+		 * mac with the corresponding low/high 5 GHZ
+		 * (5 GHZ + 5 GHZ/6 GHZ SBS) or will not share mac at all
+		 * (5 GHZ +5 GHZ/6 GHZ MCC). Other case sanity already
+		 * taken care at start of the func.
+		 */
+		if (sap_freq < sbs_cut_off_freq)
+			*index = PM_STA_SAP_5_LOW_STA_5_HIGH_SBS;
+		else
+			*index = PM_STA_SAP_5_HIGH_STA_5_LOW_SBS;
+	}
+}
+
+static void
+policy_mgr_get_index_for_ml_sta_sap(
+			struct policy_mgr_psoc_priv_obj *pm_ctx,
+			enum policy_mgr_three_connection_mode *index,
+			qdf_freq_t sap_freq, qdf_freq_t *sta_freq_list,
+			uint8_t *ml_sta_idx)
+{
+	/*
+	 * P2P GO/P2P CLI are treated as SAP to optimize as pcl
+	 * table is same for all three.
+	 */
+	policy_mgr_debug("channel: sap0: %d, ML STA link0: %d, ML STA link1: %d",
+			 sap_freq, sta_freq_list[ml_sta_idx[0]],
+			 sta_freq_list[ml_sta_idx[1]]);
+	if (policy_mgr_is_current_hwmode_sbs(pm_ctx->psoc) ||
+	    policy_mgr_are_sbs_chan(pm_ctx->psoc, sta_freq_list[ml_sta_idx[0]],
+				    sta_freq_list[ml_sta_idx[1]])) {
+		/* if current mode is SBS or the ML STA is 5+5/6Ghz SBS */
+		policy_mgr_get_index_for_ml_sta_sap_sbs(pm_ctx, index,
+							sap_freq,
+							sta_freq_list,
+							ml_sta_idx);
+		return;
+	}
+	/*
+	 * current HW mode is DBS and ML STA is 2.4 GHZ + 5 GHZ or SBS
+	 * is not enabled
+	 */
+	policy_mgr_get_index_for_ml_sta_sap_dbs(pm_ctx, index, sap_freq,
+						sta_freq_list, ml_sta_idx);
+}
+
+#else /* WLAN_FEATURE_11BE_MLO */
+
+static inline void
+policy_mgr_get_index_for_ml_sta_sap(
+			struct policy_mgr_psoc_priv_obj *pm_ctx,
+			enum policy_mgr_three_connection_mode *index,
+			qdf_freq_t sap_freq, qdf_freq_t *sta_freq_list,
+			uint8_t *ml_sta_idx) {}
+
+#endif /* WLAN_FEATURE_11BE_MLO */
+
 enum policy_mgr_three_connection_mode
 		policy_mgr_get_fourth_connection_pcl_table_index(
 		struct wlan_objmgr_psoc *psoc)
@@ -2056,10 +2317,16 @@ enum policy_mgr_three_connection_mode
 	uint32_t count_sta = 0;
 	uint32_t count_ndi = 0;
 	uint32_t count_nan_disc = 0;
+	uint8_t num_ml_sta = 0, num_non_ml_sta = 0;
 	uint32_t list_sap[MAX_NUMBER_OF_CONC_CONNECTIONS];
 	uint32_t list_sta[MAX_NUMBER_OF_CONC_CONNECTIONS];
 	uint32_t list_ndi[MAX_NUMBER_OF_CONC_CONNECTIONS];
 	uint32_t list_nan_disc[MAX_NUMBER_OF_CONC_CONNECTIONS];
+	uint8_t ml_sta_idx[MAX_NUMBER_OF_CONC_CONNECTIONS] = {0};
+	uint8_t non_ml_sta_idx[MAX_NUMBER_OF_CONC_CONNECTIONS] = {0};
+	qdf_freq_t freq_list[MAX_NUMBER_OF_CONC_CONNECTIONS] = {0};
+	uint8_t vdev_id_list[MAX_NUMBER_OF_CONC_CONNECTIONS] = {0};
+	qdf_freq_t sap_freq = 0;
 
 	pm_ctx = policy_mgr_get_context(psoc);
 	if (!pm_ctx) {
@@ -2081,12 +2348,18 @@ enum policy_mgr_three_connection_mode
 				psoc, PM_P2P_CLIENT_MODE, &list_sap[count_sap]);
 	count_sta = policy_mgr_mode_specific_connection_count(
 				psoc, PM_STA_MODE, list_sta);
+	policy_mgr_get_ml_and_non_ml_sta_count(psoc, &num_ml_sta, ml_sta_idx,
+					       &num_non_ml_sta, non_ml_sta_idx,
+					       freq_list, vdev_id_list);
+
 	count_ndi = policy_mgr_mode_specific_connection_count(
 				psoc, PM_NDI_MODE, list_ndi);
 	count_nan_disc = policy_mgr_mode_specific_connection_count(
 				psoc, PM_NAN_DISC_MODE, list_nan_disc);
-	policy_mgr_debug("sap/ago %d, sta %d, ndi %d nan disc %d",
-			 count_sap, count_sta, count_ndi, count_nan_disc);
+	policy_mgr_debug("sap/go/cli:%d sta:%d ndi:%d nan disc:%d ml_sta:%d",
+			 count_sap, count_sta, count_ndi, count_nan_disc,
+			 num_ml_sta);
+
 	if (count_sap == 2 && count_sta == 1) {
 		policy_mgr_debug(
 			"channel: sap0: %d, sap1: %d, sta0: %d",
@@ -2124,7 +2397,11 @@ enum policy_mgr_three_connection_mode
 		} else {
 			index =  PM_MAX_THREE_CONNECTION_MODE;
 		}
-	} else if (count_sap == 1 && count_sta == 2) {
+	} else if (num_ml_sta == 2 && count_sap == 1) {
+		sap_freq = pm_conc_connection_list[list_sap[0]].freq;
+		policy_mgr_get_index_for_ml_sta_sap(pm_ctx, &index, sap_freq,
+						    freq_list, ml_sta_idx);
+	} else if (count_sap == 1 && count_sta == 2 && !num_ml_sta) {
 		policy_mgr_debug(
 			"channel: sap0: %d, sta0: %d, sta1: %d",
 			pm_conc_connection_list[list_sap[0]].freq,

+ 2 - 12
components/cmn_services/policy_mgr/src/wlan_policy_mgr_tables_2x2_dbs_i.h

@@ -1997,20 +1997,10 @@ fourth_connection_pcl_dbs_sbs_table
 			 PM_SCC_ON_5_CH_5G} },
 	[PM_STA_SAP_5_STA_24_DBS] = {
 	[PM_SAP_MODE] = { PM_SBS_CH_2G, PM_SBS_CH_2G, PM_SBS_CH_2G } },
-
-	[PM_STA_24_SAP_5_LOW_MCC_STA_5_HIGH_SBS] = {
-	[PM_SAP_MODE] = {PM_CH_5G_HIGH, PM_CH_5G_HIGH, PM_CH_5G_HIGH} },
-	[PM_STA_24_SAP_5_HIGH_MCC_STA_5_LOW_SBS] = {
-	[PM_SAP_MODE] = {PM_CH_5G_LOW, PM_CH_5G_LOW, PM_CH_5G_LOW} },
-	[PM_STA_SAP_5_LOW_STA_5_HIGH_SBS] = {
-	[PM_SAP_MODE] = {PM_CH_5G_HIGH, PM_CH_5G_HIGH, PM_CH_5G_HIGH} },
-	[PM_STA_SAP_5_HIGH_STA_5_LOW_SBS] = {
+	[PM_STA_STA_SAP_MCC_SCC_5G_HIGH_PLUS_5_LOW_SBS] = {
 	[PM_SAP_MODE] = {PM_CH_5G_LOW, PM_CH_5G_LOW, PM_CH_5G_LOW} },
-	[PM_STA_5_LOW_SAP_24_MCC_STA_5_HIGH_SBS] = {
+	[PM_STA_STA_SAP_MCC_SCC_5G_LOW_PLUS_5_HIGH_SBS] = {
 	[PM_SAP_MODE] = {PM_CH_5G_HIGH, PM_CH_5G_HIGH, PM_CH_5G_HIGH} },
-	[PM_STA_5_HIGH_SAP_24_MCC_STA_5_LOW_SBS] = {
-	[PM_SAP_MODE] = {PM_CH_5G_LOW, PM_CH_5G_LOW, PM_CH_5G_LOW} },
-
 };
 #endif
 #endif