From 0f6729354f270f801f1e81ba78586cd8c0419232 Mon Sep 17 00:00:00 2001 From: Will Huang Date: Thu, 14 Oct 2021 16:47:43 +0800 Subject: [PATCH] qcacld-3.0: Clear dfs_use_nol flag by check chan/bw DFS attribute If ini gDisableDFSChSwitch=1 is set to setup dfs test mode, should disable dfs nol function regardless sap operation channel dfs or not, because sap's bonded channels may have dfs channels if bandwidth is 160M. Fix it by invoke wlan_mlme_check_chan_param_has_dfs(). Change-Id: If42c85a3dd1b83e495d7e6a556a6769c3e9e28b6 CRs-Fixed: 3038252 --- core/sap/src/sap_fsm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index 2827f7d9ae..37142863fa 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -543,7 +543,9 @@ void sap_dfs_set_current_channel(void *ctx) return; } - is_dfs = wlan_reg_is_dfs_for_freq(pdev, sap_ctx->chan_freq); + is_dfs = wlan_mlme_check_chan_param_has_dfs(pdev, + &sap_ctx->ch_params, + sap_ctx->chan_freq); sap_debug("freq=%d, dfs %d seg0=%d, seg1=%d, bw %d", sap_ctx->chan_freq, is_dfs, vht_seg0, vht_seg1, @@ -566,6 +568,7 @@ void sap_dfs_set_current_channel(void *ctx) tgt_dfs_get_radars(pdev); } tgt_dfs_set_phyerr_filter_offload(pdev); + if (mac_ctx->mlme_cfg->dfs_cfg.dfs_disable_channel_switch) tgt_dfs_control(pdev, DFS_SET_USENOL, &use_nol, sizeof(uint32_t), NULL, NULL, &error);