diff options
| -rw-r--r-- | core/sap/src/sap_ch_select.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/core/sap/src/sap_ch_select.c b/core/sap/src/sap_ch_select.c index 1fe6ceda57c6..ef4ad35b393e 100644 --- a/core/sap/src/sap_ch_select.c +++ b/core/sap/src/sap_ch_select.c @@ -643,8 +643,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, @@ -673,9 +674,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(pSapCtx, *pChans, - PHY_SINGLE_CHANNEL_CENTERED)) { + if (sap_dfs_is_channel_in_nol_list( + pSapCtx, *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); @@ -725,12 +735,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 < pSapCtx->num_of_channel; chan_num++) { if (pSpectCh->chNum != |
