summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbings <bings@codeaurora.org>2017-08-02 17:48:56 +0800
committersnandini <snandini@codeaurora.org>2017-08-14 21:42:18 -0700
commitad591e951585e77b97bb52d59cd07fcefcc5110f (patch)
treeb4d320fd6704ae1ad3345ad1d76ff32509982b0d
parent5a6f9be542c81433a17282ede2f64e12d84b14c6 (diff)
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
-rw-r--r--core/sap/src/sap_ch_select.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/sap/src/sap_ch_select.c b/core/sap/src/sap_ch_select.c
index f760da157c8e..2b690225a7cd 100644
--- a/core/sap/src/sap_ch_select.c
+++ b/core/sap/src/sap_ch_select.c
@@ -2651,6 +2651,16 @@ uint8_t sap_select_channel(tHalHandle hal, ptSapContext sap_ctx,
continue;
}
+ if (spect_info->pSpectCh[count].weight_copy >
+ sap_ctx->acsBestChannelInfo.weight) {
+ QDF_TRACE(QDF_MODULE_ID_SAP,
+ QDF_TRACE_LEVEL_INFO_HIGH,
+ "candidate ch weight: %d, best ch weight: %d",
+ spect_info->pSpectCh[count].weight_copy,
+ sap_ctx->acsBestChannelInfo.weight);
+ continue;
+ }
+
if (CDS_IS_DFS_CH(spect_info->pSpectCh[count].chNum) &&
cds_disallow_mcc(spect_info->pSpectCh[count].chNum)) {
QDF_TRACE(QDF_MODULE_ID_SAP,