qcacmn: Do not update ch_params if RCAC frequency is NULL

While selecting the next channel after radar, if RCAC is enabled,
RCAC frequency and ch params are chosen. But in case where no
RCAC frequency was found, ch params were filled with 0s which are
then used by the next channel selection logic (random channel)
to figure out the next channel.

Since the ch params were now 0s, the ch width is pointing to
20MHz (0 enum) which results in a 20MHz channel picked irrespective
of current mode.

Do not modify ch params if the RCAC frequency is NULL.

CRs-Fixed: 2729023
Change-Id: If542fb8584a767ad8d1fe6115af039e8bc2cb173
This commit is contained in:
Vignesh Mohan
2020-07-13 13:39:32 +05:30
committed by snandini
parent 9088f48e99
commit e62226ba5f

View File

@@ -1668,6 +1668,11 @@ QDF_STATUS utils_dfs_get_rcac_channel(struct wlan_objmgr_pdev *pdev,
return status;
*target_chan_freq = dfs->dfs_rcac_param.rcac_pri_freq;
/* Do not modify the input ch_params if no RCAC channel is present. */
if (!*target_chan_freq)
return status;
*chan_params = dfs->dfs_rcac_param.rcac_ch_params;
return QDF_STATUS_SUCCESS;