qcacmn: revert: Fix CAC during vdev restart

With the change I7d4d4fdf4a6defac8fc436b63495b51c272669af the CAC is
restarted for both VAP down-up case and VAP restart case in the same
channel. For the VAP restart in the same channel CAC should not be
restarted.

Restarting CAC for VAP down-up is handled in
I456bbee34a722f3d18c781cbcc87585cbeee5d54.

Revert I7d4d4fdf4a6defac8fc436b63495b51c272669af without merge
conflicts.

Change-Id: Icbde60be9515a7a31e06ba74158ca2126f58520c
CRs-Fixed: 2539623
This commit is contained in:
Vignesh U 2019-09-19 22:57:18 +05:30 • committed by nshrivas
commit 9ecadbf280
2 changed files with 15 additions and 62 deletions

View file

@ -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_ */

View file

@ -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;