qcacld-3.0: Set/get candidate channel to switch when radar is detected

Currently driver switches to a random channel when radar is detected.
Easymesh expects ap switching to a given channel.

Add API to set/get given channel. AP should switch to given channel
when radar is detected.
The given channel will be cleared after a radar detection.

Change-Id: I29b97e247583be768842c128e6a3e5d5bfd859f7
CRs-Fixed: 3034735
このコミットが含まれているのは:
Bing Sun
2021-09-16 14:04:52 +08:00
committed by Madan Koyyalamudi
コミット c7defa218a
5個のファイルの変更146行の追加1行の削除

ファイルの表示

@@ -245,7 +245,16 @@ static qdf_freq_t sap_random_channel_sel(struct sap_context *sap_ctx)
*/
flag |= DFS_RANDOM_CH_FLAG_NO_6GHZ_CH;
if (QDF_IS_STATUS_ERROR(utils_dfs_get_vdev_random_channel_for_freq(
if (sap_ctx->candidate_freq &&
sap_ctx->chan_freq != sap_ctx->candidate_freq &&
!utils_dfs_is_freq_in_nol(pdev, sap_ctx->candidate_freq)) {
chan_freq = sap_ctx->candidate_freq;
wlan_reg_set_channel_params_for_freq(pdev, chan_freq, 0,
ch_params);
sap_debug("random chan select candidate freq=%d", chan_freq);
sap_ctx->candidate_freq = 0;
} else if (QDF_IS_STATUS_ERROR(
utils_dfs_get_vdev_random_channel_for_freq(
pdev, sap_ctx->vdev, flag, ch_params,
&hw_mode, &chan_freq, &acs_info))) {
/* No available channel found */

ファイルの表示

@@ -240,6 +240,7 @@ struct sap_context {
*/
bool is_forcescc_restart_required;
#endif
qdf_freq_t candidate_freq;
};
/*----------------------------------------------------------------------------