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:
@@ -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_is_etsi_precac_done() - Is precac done.
|
||||||
* @dfs: Pointer to wlan_dfs structure.
|
* @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.
|
* Return: If precac already done in channel, return 1. Otherwise return 0.
|
||||||
*/
|
*/
|
||||||
#if defined(QCA_SUPPORT_ETSI_PRECAC_DFS)
|
#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
|
#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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -410,7 +410,7 @@ bool dfs_is_cac_required(struct wlan_dfs *dfs,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dfs_is_etsi_precac_done(dfs)) {
|
if (dfs_is_etsi_precac_done(dfs, cur_chan)) {
|
||||||
dfs_debug(dfs, WLAN_DEBUG_DFS,
|
dfs_debug(dfs, WLAN_DEBUG_DFS,
|
||||||
"ETSI PRE-CAC alreay done on this channel %d",
|
"ETSI PRE-CAC alreay done on this channel %d",
|
||||||
dfs->dfs_curchan->dfs_ch_ieee);
|
dfs->dfs_curchan->dfs_ch_ieee);
|
||||||
|
Reference in New Issue
Block a user