diff --git a/umac/dfs/core/src/dfs.h b/umac/dfs/core/src/dfs.h index 1e81a4b93786..72ea1dbd33b5 100644 --- a/umac/dfs/core/src/dfs.h +++ b/umac/dfs/core/src/dfs.h @@ -1987,20 +1987,6 @@ void dfs_cancel_cac_timer(struct wlan_dfs *dfs); */ void dfs_start_cac_timer(struct wlan_dfs *dfs); -/** - * dfs_is_curchan_subset_of_cac_started_chan() - Check if the dfs current - * channel is subset of cac started channel. - * @dfs: Pointer to wlan_dfs structure. - * - * If the current channel and the cac_started_chan is same or - * if the current channel is subset of the cac_started_chan then - * this function returns true. - * - * Return: true if current channel is same or subset of cac started channel, - * else false. - */ -bool dfs_is_curchan_subset_of_cac_started_chan(struct wlan_dfs *dfs); - /** * dfs_set_update_nol_flag() - Sets update_nol flag. * @dfs: Pointer to wlan_dfs structure. @@ -2656,27 +2642,4 @@ void dfs_reset_agile_config(struct dfs_soc_priv_obj *dfs_soc); * @dfs: Pointer to wlan_dfs. */ int dfs_reinit_timers(struct wlan_dfs *dfs); - -/** - * dfs_skip_cac_after_vdev_restart() - Skip CAC if new channel is same - * as old channel after vdev restart. - * @dfs: Pointer to wlan_dfs structure. - * @cur_chan: Pointer to current channel of the pdev. - * @prev_chan: Pointer to previous channel of the pdev. - * - * Return: False if CAC can be skipped, else true. - */ -#ifdef QCA_SKIP_CAC_AFTER_RESTART -bool dfs_skip_cac_after_vdev_restart(struct wlan_dfs *dfs, - struct dfs_channel *cur_chan, - struct dfs_channel *prev_chan); -#else -static inline bool -dfs_skip_cac_after_vdev_restart(struct wlan_dfs *dfs, - struct dfs_channel *cur_chan, - struct dfs_channel *prev_chan) -{ - return true; -} -#endif #endif /* _DFS_H_ */ diff --git a/umac/dfs/core/src/misc/dfs_cac.c b/umac/dfs/core/src/misc/dfs_cac.c index 4788f916b015..5331e294d325 100644 --- a/umac/dfs/core/src/misc/dfs_cac.c +++ b/umac/dfs/core/src/misc/dfs_cac.c @@ -372,29 +372,6 @@ dfs_is_new_chan_subset_of_old_chan(struct wlan_dfs *dfs, n_new_subchans); } -#ifdef QCA_SKIP_CAC_AFTER_RESTART -bool dfs_skip_cac_after_vdev_restart(struct wlan_dfs *dfs, - struct dfs_channel *cur_chan, - struct dfs_channel *prev_chan) -{ - if (dfs_is_new_chan_subset_of_old_chan(dfs, cur_chan, prev_chan)) { - /* AP bandwidth reduce case: - * When AP detects the RADAR in in-service monitoring - * mode in channel A, it cancels the running CAC and - * tries to find the channel B with the reduced - * bandwidth of channel A. - * If the new channel B is subset of the channel A - * then AP skips the CAC. - */ - if (!dfs->dfs_cac_aborted) { - dfs_debug(dfs, WLAN_DEBUG_DFS, "Skip CAC"); - return false; - } - } - return true; -} -#endif - bool dfs_is_cac_required(struct wlan_dfs *dfs, struct dfs_channel *cur_chan, struct dfs_channel *prev_chan, @@ -456,9 +433,22 @@ bool dfs_is_cac_required(struct wlan_dfs *dfs, dfs_cancel_cac_timer(dfs); } } else { /* CAC timer is not running. */ - return dfs_skip_cac_after_vdev_restart(dfs, + if (dfs_is_new_chan_subset_of_old_chan(dfs, cur_chan, - prev_chan); + prev_chan)) { + /* AP bandwidth reduce case: + * When AP detects the RADAR in in-service monitoring + * mode in channel A, it cancels the running CAC and + * tries to find the channel B with the reduced + * bandwidth of channel A. + * If the new channel B is subset of the channel A + * then AP skips the CAC. + */ + if (!dfs->dfs_cac_aborted) { + dfs_debug(dfs, WLAN_DEBUG_DFS, "Skip CAC"); + return false; + } + } } return true;