qcacld-3.0: Initialize channel info for ACS even if channel is unsafe
Channel info for ACS is not getting initialized if channel is unsafe. So, channel number, rssi, ACS weight, etc. is not getting initialized and is 0 for all the unsafe channels. As a result, wrong weights are getting calculated in ACS algo and wrong channel number is getting printed in logs for all these channels. Initialize channel info for ACS even if channel is unsafe. Change-Id: Iec315ea818b5b51aef6879831b8be29ba4515983 CRs-Fixed: 2260798
This commit is contained in:

کامیت شده توسط
nshrivas

والد
47bc76ae3c
کامیت
052ce25534
@@ -604,8 +604,9 @@ static bool sap_chan_sel_init(tHalHandle halHandle,
|
||||
|
||||
/* Allocate memory for weight computation of 2.4GHz */
|
||||
pSpectCh =
|
||||
(tSapSpectChInfo *) qdf_mem_malloc((pSpectInfoParams->numSpectChans)
|
||||
* sizeof(*pSpectCh));
|
||||
(tSapSpectChInfo *)qdf_mem_malloc(
|
||||
(pSpectInfoParams->numSpectChans) *
|
||||
sizeof(*pSpectCh));
|
||||
|
||||
if (pSpectCh == NULL) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
|
||||
@@ -634,9 +635,18 @@ static bool sap_chan_sel_init(tHalHandle halHandle,
|
||||
channelnum++, pChans++, pSpectCh++) {
|
||||
chSafe = true;
|
||||
|
||||
pSpectCh->chNum = *pChans;
|
||||
/* Initialise for all channels */
|
||||
pSpectCh->rssiAgr = SOFTAP_MIN_RSSI;
|
||||
/* Initialise 20MHz for all the Channels */
|
||||
pSpectCh->channelWidth = SOFTAP_HT20_CHANNELWIDTH;
|
||||
/* Initialise max ACS weight for all channels */
|
||||
pSpectCh->weight = SAP_ACS_WEIGHT_MAX;
|
||||
|
||||
/* check if the channel is in NOL blacklist */
|
||||
if (sap_dfs_is_channel_in_nol_list(sap_ctx, *pChans,
|
||||
PHY_SINGLE_CHANNEL_CENTERED)) {
|
||||
if (sap_dfs_is_channel_in_nol_list(
|
||||
sap_ctx, *pChans,
|
||||
PHY_SINGLE_CHANNEL_CENTERED)) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
|
||||
"In %s, Ch %d is in NOL list", __func__,
|
||||
*pChans);
|
||||
@@ -680,12 +690,7 @@ static bool sap_chan_sel_init(tHalHandle halHandle,
|
||||
continue;
|
||||
|
||||
if (true == chSafe) {
|
||||
pSpectCh->chNum = *pChans;
|
||||
pSpectCh->valid = true;
|
||||
pSpectCh->rssiAgr = SOFTAP_MIN_RSSI; /* Initialise for all channels */
|
||||
pSpectCh->channelWidth = SOFTAP_HT20_CHANNELWIDTH; /* Initialise 20MHz for all the Channels */
|
||||
/* Initialise max ACS weight for all channels */
|
||||
pSpectCh->weight = SAP_ACS_WEIGHT_MAX;
|
||||
for (chan_num = 0; chan_num < sap_ctx->num_of_channel;
|
||||
chan_num++) {
|
||||
if (pSpectCh->chNum !=
|
||||
|
مرجع در شماره جدید
Block a user