Browse Source

qcacld-3.0: Optimize channel selection in ACS mode

SAP selects different channel between cld2.0 driver and cld3.0
driver in ACS mode, which leads to confusion.
In cld2.0 driver, channel with the least weight is the first
choice, and non-overlap channel will be selected only when
overlap channel is disabled and its weight is not bigger than
the first choice channel.
In cld3.0 driver, non-overlap channel will be selected when
overlap channel is disabled.

The behavior in cld2.0 is more reasonable. Make cld3.0 driver
follow cld2.0 driver.

Change-Id: I6243ace8db7314c698a9b554e65794d2ee66e555
CRs-Fixed: 2086287
bings 7 years ago
parent
commit
14d1d3be37
1 changed files with 4 additions and 0 deletions
  1. 4 0
      core/sap/src/sap_ch_select.c

+ 4 - 0
core/sap/src/sap_ch_select.c

@@ -2310,6 +2310,10 @@ uint8_t sap_select_channel(tHalHandle hal, ptSapContext sap_ctx,
 				spect_info->pSpectCh[count].chNum))
 			continue;
 
+		if (spect_info->pSpectCh[count].weight_copy >
+				sap_ctx->acsBestChannelInfo.weight)
+			continue;
+
 		tmp_ch_num = spect_info->pSpectCh[count].chNum;
 		tmp_ch_num = sap_select_preferred_channel_from_channel_list(
 					tmp_ch_num, sap_ctx, spect_info);