Kaynağa Gözat

qcacmn: Don’t consider PCL weightage for STA iface

In case of one STA interface is active and/or the
secondary is about to come up. If host receives
CONCURRENT_DUAL_STA_POLICY vendor command with policy
PREFER_PRIMARY. Then don’t consider PCL weightage for
all subsequent STA connections. Due to this host/FW
allows all subsequent connections with the best
available candidate (either in DBS, SCC or in MCC).

Change-Id: Id200e1011ef8560b763ec1cbc3664666da6d395f
CRs-Fixed: 2915748
abhinav kumar 4 yıl önce
ebeveyn
işleme
28138b7558

+ 13 - 3
umac/mlme/connection_mgr/core/src/wlan_cm_bss_scoring.c

@@ -591,17 +591,26 @@ cm_get_pcl_weight_of_channel(uint32_t chan_freq,
 
 /**
  * cm_calculate_pcl_score() - Calculate PCL score based on PCL weightage
+ * @psoc: psoc ptr
  * @pcl_chan_weight: pcl weight of BSS channel
  * @pcl_weightage: PCL _weightage out of total weightage
  *
  * Return: pcl score
  */
-static int32_t cm_calculate_pcl_score(int pcl_chan_weight,
+static int32_t cm_calculate_pcl_score(struct wlan_objmgr_psoc *psoc,
+				      int pcl_chan_weight,
 				      uint8_t pcl_weightage)
 {
 	int32_t pcl_score = 0;
 	int32_t temp_pcl_chan_weight = 0;
 
+	/*
+	 * Don’t consider pcl weightage for STA connection,
+	 * if primary interface is configured.
+	 */
+	if (!policy_mgr_is_pcl_weightage_required(psoc))
+		return 0;
+
 	if (pcl_chan_weight) {
 		temp_pcl_chan_weight =
 			(CM_MAX_WEIGHT_OF_PCL_CHANNELS - pcl_chan_weight);
@@ -1306,7 +1315,8 @@ cm_get_pcl_weight_of_channel(uint32_t chan_freq,
 	return false;
 }
 
-static int32_t cm_calculate_pcl_score(int pcl_chan_weight,
+static int32_t cm_calculate_pcl_score(struct wlan_objmgr_psoc *psoc,
+				      int pcl_chan_weight,
 				      uint8_t pcl_weightage)
 {
 	return 0;
@@ -1451,7 +1461,7 @@ static int cm_calculate_bss_score(struct wlan_objmgr_psoc *psoc,
 					     weight_config->rssi_weightage);
 	score += rssi_score;
 
-	pcl_score = cm_calculate_pcl_score(pcl_chan_weight,
+	pcl_score = cm_calculate_pcl_score(psoc, pcl_chan_weight,
 					   weight_config->pcl_weightage);
 	score += pcl_score;