Sfoglia il codice sorgente

qcacld-3.0: Update fourth connection PCL table to avoid MCC

If MLO STA connect with one 5 GHz low link and another 6 GHz (non-PSC)
link, and start 2 SAP on 5 GHz band, one SAP will start on 5 GHz low
channel doing SCC, another SAP will not start on 6 GHz (non-PSC)
channel and start on 5 GHz high doing MCC.

Add one PCL type which add SCC on 5 GHz low channel to
PM_SCC_ON_5G_HIGH_5G_HIGH_PLUS_SHARED_2G for this case, so that last
SAP can start on 5 GHz low channel doing SCC.

Change-Id: I4312873c159ac14652990c7c1079c13476dcd383
CRs-Fixed: 3508539
Will Huang 1 anno fa
parent
commit
34b589ce84

+ 1 - 0
components/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h

@@ -129,6 +129,7 @@ static inline const char *pcl_type_to_string(uint32_t idx)
 	CASE_RETURN_STRING(PM_SBS_CH_2G);
 	CASE_RETURN_STRING(PM_SCC_ON_5G_LOW_5G_LOW_PLUS_SHARED_2G);
 	CASE_RETURN_STRING(PM_SCC_ON_5G_HIGH_5G_HIGH_PLUS_SHARED_2G);
+	CASE_RETURN_STRING(PM_SCC_ON_5G_HIGH_5G_HIGH_SCC_ON_5G_LOW_PLUS_SHARED_2G);
 	default:
 		return "Unknown";
 	}

+ 9 - 0
components/cmn_services/policy_mgr/inc/wlan_policy_mgr_public_struct.h

@@ -236,6 +236,9 @@ enum policy_mgr_pcl_group_id {
  * 5G low band i.e 5G freq < sbs cutoff freq
  * @POLICY_MGR_PCL_ORDER_SCC_5G_HIGH_5G_HIGH: 5G High SCC frequency followed by
  * 5G High band i.e 5G freq > sbs cutoff freq
+ * @POLICY_MGR_PCL_ORDER_SCC_5G_HIGH_5G_HIGH_SCC_5G_LOW: 5 GHz High SCC
+ * frequency followed by 5G High band i.e 5G freq > sbs cutoff freq, add 5 GHz
+ * Low SCC frequency
  *
  * Order in which the PCL is requested
  */
@@ -247,6 +250,7 @@ enum policy_mgr_pcl_channel_order {
 	POLICY_MGR_PCL_ORDER_5G,
 	POLICY_MGR_PCL_ORDER_SCC_5G_LOW_5G_LOW,
 	POLICY_MGR_PCL_ORDER_SCC_5G_HIGH_5G_HIGH,
+	POLICY_MGR_PCL_ORDER_SCC_5G_HIGH_5G_HIGH_SCC_5G_LOW,
 };
 
 /**
@@ -407,6 +411,10 @@ enum policy_mgr_mac_use {
  * 5 GHz high frequencies, add 2.4 GHZ if its shared with 5GHz high
  * @PM_SBS_CH_MCC_CH: SBS channels followed by MCC channels
  * @PM_SBS_5G_MCC_24G: SBS channels, 5G MCC channels and 2.4GHz channels
+ * @PM_SCC_ON_5G_HIGH_5G_HIGH_SCC_ON_5G_LOW_PLUS_SHARED_2G: 5GHZ high SCC
+ * channel followed by 5 GHz high frequencies and 5 GHz low SCC channel,
+ * add 2.4 GHZ if its shared with 5GHz high
+ *
  * @PM_MAX_PCL_TYPE: Max place holder
  *
  * These are generic IDs that identify the various roles
@@ -450,6 +458,7 @@ enum policy_mgr_pcl_type {
 	PM_SBS_CH_2G,
 	PM_SCC_ON_5G_LOW_5G_LOW_PLUS_SHARED_2G,
 	PM_SCC_ON_5G_HIGH_5G_HIGH_PLUS_SHARED_2G,
+	PM_SCC_ON_5G_HIGH_5G_HIGH_SCC_ON_5G_LOW_PLUS_SHARED_2G,
 
 	PM_SBS_CH_MCC_CH,
 	PM_SBS_5G_MCC_24G,

+ 26 - 3
components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c

@@ -2481,7 +2481,9 @@ add_sbs_chlist_to_pcl(struct wlan_objmgr_psoc *psoc,
 			pcl_weights[*index] = WEIGHT_OF_GROUP2_PCL_CHANNELS;
 			(*index)++;
 		}
-	} else if (order == POLICY_MGR_PCL_ORDER_SCC_5G_HIGH_5G_HIGH) {
+	} else if (order == POLICY_MGR_PCL_ORDER_SCC_5G_HIGH_5G_HIGH ||
+		   order ==
+		   POLICY_MGR_PCL_ORDER_SCC_5G_HIGH_5G_HIGH_SCC_5G_LOW) {
 		/* Add 5G high SCC channel*/
 		qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
 		cl = pm_conc_connection_list;
@@ -2525,7 +2527,25 @@ add_sbs_chlist_to_pcl(struct wlan_objmgr_psoc *psoc,
 			pcl_weights[*index] = WEIGHT_OF_GROUP2_PCL_CHANNELS;
 			(*index)++;
 		}
-
+		if (order ==
+		    POLICY_MGR_PCL_ORDER_SCC_5G_HIGH_5G_HIGH_SCC_5G_LOW) {
+			conn_index = 0;
+			/* Add 5G low SCC channel*/
+			qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
+			cl = pm_conc_connection_list;
+			while (PM_CONC_CONNECTION_LIST_VALID_INDEX(conn_index)) {
+				if (!WLAN_REG_IS_24GHZ_CH_FREQ(cl[conn_index].freq) &&
+				    cl[conn_index].freq < sbs_cut_off_freq) {
+					pcl_freqs[*index] = cl[conn_index].freq;
+					pcl_weights[*index] =
+						WEIGHT_OF_GROUP3_PCL_CHANNELS;
+					(*index)++;
+					break;
+				}
+				conn_index++;
+			}
+			qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
+		}
 	} else {
 		policy_mgr_debug("invalid order");
 		return;
@@ -3659,13 +3679,16 @@ QDF_STATUS policy_mgr_get_channel_list(struct wlan_objmgr_psoc *psoc,
 		status = QDF_STATUS_SUCCESS;
 		break;
 	case PM_SCC_ON_5G_HIGH_5G_HIGH_PLUS_SHARED_2G:
+	case PM_SCC_ON_5G_HIGH_5G_HIGH_SCC_ON_5G_LOW_PLUS_SHARED_2G:
 		add_sbs_chlist_to_pcl(psoc,  pcl_channels,
 				      pcl_weights, pcl_sz,
 				      len,
 				      skip_6ghz_channel,
 				      channel_list_5, chan_index_5,
 				      channel_list_6, chan_index_6,
-				      POLICY_MGR_PCL_ORDER_SCC_5G_HIGH_5G_HIGH,
+				      (pcl == PM_SCC_ON_5G_HIGH_5G_HIGH_PLUS_SHARED_2G) ?
+				      POLICY_MGR_PCL_ORDER_SCC_5G_HIGH_5G_HIGH :
+				      POLICY_MGR_PCL_ORDER_SCC_5G_HIGH_5G_HIGH_SCC_5G_LOW,
 				      &high_5_band_scc_present,
 				      &low_5_band_scc_present);
 		/*

+ 3 - 3
components/cmn_services/policy_mgr/src/wlan_policy_mgr_tables_2x2_dbs_i.h

@@ -2340,9 +2340,9 @@ fourth_connection_pcl_dbs_sbs_table
 	[PM_STA_MODE] = {PM_SCC_ON_5G_HIGH_5G_HIGH_PLUS_SHARED_2G,
 			 PM_SCC_ON_5G_HIGH_5G_HIGH_PLUS_SHARED_2G,
 			 PM_SCC_ON_5G_HIGH_5G_HIGH_PLUS_SHARED_2G},
-	[PM_SAP_MODE] = {PM_SCC_ON_5G_HIGH_5G_HIGH_PLUS_SHARED_2G,
-			 PM_SCC_ON_5G_HIGH_5G_HIGH_PLUS_SHARED_2G,
-			 PM_SCC_ON_5G_HIGH_5G_HIGH_PLUS_SHARED_2G} },
+	[PM_SAP_MODE] = {PM_SCC_ON_5G_HIGH_5G_HIGH_SCC_ON_5G_LOW_PLUS_SHARED_2G,
+			 PM_SCC_ON_5G_HIGH_5G_HIGH_SCC_ON_5G_LOW_PLUS_SHARED_2G,
+			 PM_SCC_ON_5G_HIGH_5G_HIGH_SCC_ON_5G_LOW_PLUS_SHARED_2G} },
 	[PM_24_5_PLUS_5_LOW_N_HIGH_SHARE_SBS] = {
 	[PM_STA_MODE] = {PM_SCC_ON_5_CH_5G, PM_SCC_ON_5_CH_5G,
 			 PM_SCC_ON_5_CH_5G},