Procházet zdrojové kódy

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
Liangwei Dong před 3 roky
rodič
revize
116aba71e2
1 změnil soubory, kde provedl 2 přidání a 0 odebrání
  1. 2 0
      umac/dfs/dispatcher/src/wlan_dfs_utils_api.c

+ 2 - 0
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);