From 116aba71e200a8d1949edf95f003cefa956d6f6e Mon Sep 17 00:00:00 2001 From: Liangwei Dong Date: Wed, 18 Aug 2021 18:17:59 +0800 Subject: [PATCH] qcacmn: Fix DFS_RANDOM_CH_FLAG_NO_DFS_CH not working When DFS_RANDOM_CH_FLAG_NO_DFS_CH set, the random channel selection will pick non-dfs channel. But currently the MCL API utils_dfs_get_channel_list doesn't populate the DFS flags "WLAN_CHAN_DFS" for dfs channel. That causes the dfs_prepare_random_channel_for_freq API can't identify DFS channel. Fix by set WLAN_CHAN_DFS for dfs channel Change-Id: I7ead760ddc77c198a630d12960e775961840796c CRs-Fixed: 3016746 --- umac/dfs/dispatcher/src/wlan_dfs_utils_api.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/umac/dfs/dispatcher/src/wlan_dfs_utils_api.c b/umac/dfs/dispatcher/src/wlan_dfs_utils_api.c index f62ecdb582..1e05a1134c 100644 --- a/umac/dfs/dispatcher/src/wlan_dfs_utils_api.c +++ b/umac/dfs/dispatcher/src/wlan_dfs_utils_api.c @@ -840,6 +840,8 @@ static void utils_dfs_get_channel_list(struct wlan_objmgr_pdev *pdev, chan_list[i].dfs_ch_ieee = wlan_reg_freq_to_chan(pdev, pcl_ch[i]); chan_list[i].dfs_ch_freq = pcl_ch[i]; + if (wlan_reg_is_dfs_for_freq(pdev, pcl_ch[i])) + chan_list[i].dfs_ch_flagext |= WLAN_CHAN_DFS; } *num_chan = i; dfs_info(NULL, WLAN_DEBUG_DFS_ALWAYS, "num channels %d", i);