Parcourir la source

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
Vignesh Mohan il y a 5 ans
Parent
commit
c9a483e5d7
2 fichiers modifiés avec 5 ajouts et 3 suppressions
  1. 4 2
      umac/dfs/core/src/dfs_etsi_precac.h
  2. 1 1
      umac/dfs/core/src/misc/dfs_cac.c

+ 4 - 2
umac/dfs/core/src/dfs_etsi_precac.h

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

+ 1 - 1
umac/dfs/core/src/misc/dfs_cac.c

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