From 8eabb22a71e070c0f3dd335b99576c467493e5eb Mon Sep 17 00:00:00 2001 From: Lincoln Tran Date: Thu, 10 Dec 2020 11:34:10 -0800 Subject: [PATCH] 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 --- umac/regulatory/core/src/reg_services_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/umac/regulatory/core/src/reg_services_common.c b/umac/regulatory/core/src/reg_services_common.c index df87272fb868..ab644c1706ef 100644 --- a/umac/regulatory/core/src/reg_services_common.c +++ b/umac/regulatory/core/src/reg_services_common.c @@ -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 =