qcacmn: Send the channel structure to check for ETSI preCAC

While checking if ETSI preCAC is already done on a given channel
in the API "dfs_is_etsi_precac_done", dfs_curchan is always used as
the channel to be checked. Since the API "dfs_is_cac_required" maybe
called without updating the dfs_curchan, using dfs_curchan in
function "dfs_is_etsi_precac_done" is not correct.
Use the current channel provided to the API "dfs_is_cac_required"
as input while checking for ETSI preCAC.

Change-Id: Id2bc59281e17afaa3ba7572f5a2d7bd4718a7639
CRs-Fixed: 2528023
This commit is contained in:
Vignesh Mohan
2019-09-17 12:06:46 +05:30
committed by nshrivas
parent 2c14fae3d5
commit c9a483e5d7
2 changed files with 5 additions and 3 deletions

View File

@@ -172,13 +172,15 @@ static inline int dfs_is_subchan_in_etsi_precac_done_list(struct wlan_dfs *dfs)
/**
* dfs_is_etsi_precac_done() - Is precac done.
* @dfs: Pointer to wlan_dfs structure.
* @channel: Channel to be checked of dfs_channel structure.
*
* Return: If precac already done in channel, return 1. Otherwise return 0.
*/
#if defined(QCA_SUPPORT_ETSI_PRECAC_DFS)
bool dfs_is_etsi_precac_done(struct wlan_dfs *dfs);
bool dfs_is_etsi_precac_done(struct wlan_dfs *dfs, struct dfs_channel *channel);
#else
static inline bool dfs_is_etsi_precac_done(struct wlan_dfs *dfs)
static inline bool
dfs_is_etsi_precac_done(struct wlan_dfs *dfs, struct dfs_channel *channel)
{
return false;
}

View File

@@ -410,7 +410,7 @@ bool dfs_is_cac_required(struct wlan_dfs *dfs,
return false;
}
if (dfs_is_etsi_precac_done(dfs)) {
if (dfs_is_etsi_precac_done(dfs, cur_chan)) {
dfs_debug(dfs, WLAN_DEBUG_DFS,
"ETSI PRE-CAC alreay done on this channel %d",
dfs->dfs_curchan->dfs_ch_ieee);