Browse Source

qcacld-3.0: Remove certer frequency check when doing ACS at 320 MHz

320 MHz channel has overlap between adjacent bonding, so the certer
frequency is not unique, it will check fail if check certer frequency
differ and may not included as a valid bonding.

Remove certer frequency check when doing ACS at 320 MHz.
Fix static analyze error in this file.

Change-Id: Icf500e92ebe64071737161ac1e5a0d22f2a0e08d
CRs-Fixed: 3509363
Will Huang 1 year ago
parent
commit
2c8f0034ef
1 changed files with 3 additions and 11 deletions
  1. 3 11
      core/sap/src/sap_ch_select.c

+ 3 - 11
core/sap/src/sap_ch_select.c

@@ -1852,7 +1852,7 @@ sap_sort_chl_weight_160_mhz(struct mac_context *mac_ctx,
 	uint8_t i, j;
 	tSapSpectChInfo *pSpectInfo;
 	uint8_t minIdx;
-	struct ch_params acs_ch_params;
+	struct ch_params acs_ch_params = {0};
 	int8_t center_freq_diff;
 	uint32_t combined_weight;
 	uint32_t min_ch_weight;
@@ -2027,7 +2027,6 @@ sap_sort_chl_weight_320_mhz(struct mac_context *mac_ctx,
 	tSapSpectChInfo *pSpectInfo;
 	uint8_t minIdx;
 	struct ch_params acs_ch_params = {0};
-	int32_t center_freq_diff;
 	uint32_t combined_weight;
 	uint32_t min_ch_weight;
 	uint32_t valid_chans = 0;
@@ -2054,20 +2053,13 @@ sap_sort_chl_weight_320_mhz(struct mac_context *mac_ctx,
 			continue;
 		}
 
-		center_freq_diff = acs_ch_params.mhz_freq_seg1 -
-				   pSpectInfo[j].chan_freq;
-
-		/* This channel frequency does not have all channels */
-		if (center_freq_diff != 150) {
+		/* no other freq left for 320 Mhz operation in spectrum */
+		if (j + 15 > pSpectInfoParams->numSpectChans) {
 			pSpectInfo[j].weight = SAP_ACS_WEIGHT_MAX * 16;
 			pSpectInfo[j].weight_calc_done = true;
 			continue;
 		}
 
-		/* no other freq left for 320 Mhz operation in spectrum */
-		if (j + 15 > pSpectInfoParams->numSpectChans)
-			continue;
-
 		/* Check whether all frequencies are present for 160 Mhz */
 
 		if (!(((pSpectInfo[j].chan_freq + 20) ==