qcacmn: Update set ch params API to consider passive ch

Currently, reg_set_2g_channel_params_for_freq only considers
enabled channels when filling in the channel params. This
could cause issue when starting vdev in a passive channel.
Update the logic to consider CHANNEL_STATE_DFS as well.

Change-Id: I7a49aaa9a51e09729d7b912a6e3fd62fa240d714
CRs-fixed: 2835565
This commit is contained in:
Lincoln Tran 2020-12-10 11:34:10 -08:00 • committed by Gerrit - the friendly Code Review server
commit 8eabb22a71

View file

@ -3669,7 +3669,8 @@ static void reg_set_2g_channel_params_for_freq(struct wlan_objmgr_pdev *pdev,
reg_get_2g_bonded_channel_state_for_freq(pdev, oper_freq,
sec_ch_2g_freq,
ch_params->ch_width);
if (chan_state == CHANNEL_STATE_ENABLE) {
if ((chan_state == CHANNEL_STATE_ENABLE) ||
(chan_state == CHANNEL_STATE_DFS)) {
if (ch_params->ch_width == CH_WIDTH_40MHZ) {
if (oper_freq < sec_ch_2g_freq)
ch_params->sec_ch_offset =