qcacld-3.0: Fix SAP alone failed when g_sta_sap_scc_on_dfs_chan is 1

if g_sta_sap_scc_on_dfs_chan is 1, SAP can't start on DFS channel except
there is STA/P2P client on it.
When SAP start alone,  when select SAP channel after ACS, need remove DFS
channel correctly by valid check.

Change-Id: Ie500816bb0aeae3efd18767e64901bf19bedd6fc
CRs-Fixed: 3036095
这个提交包含在:
Jianmin Zhu
2021-09-14 15:05:03 +08:00
提交者 Madan Koyyalamudi
父节点 43c3d663af
当前提交 509be8c4f4

查看文件

@@ -2513,6 +2513,9 @@ uint32_t sap_select_channel(mac_handle_t mac_handle,
/*Loop till get the best channel in the given range */ /*Loop till get the best channel in the given range */
for (count = 0; count < spect_info->numSpectChans; count++) { for (count = 0; count < spect_info->numSpectChans; count++) {
if (!spect_info->pSpectCh[count].valid)
continue;
best_chan_freq = spect_info->pSpectCh[count].chan_freq; best_chan_freq = spect_info->pSpectCh[count].chan_freq;
/* check if best_ch_num is in preferred channel list */ /* check if best_ch_num is in preferred channel list */
best_chan_freq = best_chan_freq =
@@ -2566,6 +2569,9 @@ next_bw:
for (count = 0; count < spect_info->numSpectChans; count++) { for (count = 0; count < spect_info->numSpectChans; count++) {
struct ch_params ch_params = {0}; struct ch_params ch_params = {0};
if (!spect_info->pSpectCh[count].valid)
continue;
cal_chan_freq = spect_info->pSpectCh[count].chan_freq; cal_chan_freq = spect_info->pSpectCh[count].chan_freq;
cal_chan_weight = spect_info->pSpectCh[count].weight; cal_chan_weight = spect_info->pSpectCh[count].weight;
/* skip pcl channel whose weight is bigger than best */ /* skip pcl channel whose weight is bigger than best */