Răsfoiți Sursa

qcacmn: Add the channel structure as an argument for ETSI preCAC check

While checking if ETSI preCAC is already done on a given channel
in this API "dfs_is_etsi_precac_done", dfs_curchan is always used as
the channel to be checked. Since there are APIs such as
"dfs_is_cac_required", which may be called before dfs_curchan is
updated, add the channel structure which is to be checked for
ETSI preCAC in the argument list.

Change-Id: I77cf059f9afd83c850a7603f6197ac2b78fa2586
CRs-Fixed: 2528023
Vignesh Mohan 5 ani în urmă
părinte
comite
8f00992e04

+ 2 - 2
umac/dfs/core/src/misc/dfs_etsi_precac.c

@@ -76,14 +76,14 @@ int dfs_is_subchan_in_etsi_precac_done_list(struct wlan_dfs *dfs,
 	return 0;
 }
 
-bool dfs_is_etsi_precac_done(struct wlan_dfs *dfs)
+bool dfs_is_etsi_precac_done(struct wlan_dfs *dfs, struct dfs_channel *channel)
 {
 	bool ret_val = 1;
 	uint8_t channels[NUM_CHANNELS_160MHZ];
 	uint8_t nchannels = 0;
 	int i;
 
-	nchannels = dfs_get_bonding_channels_without_seg_info(dfs->dfs_curchan,
+	nchannels = dfs_get_bonding_channels_without_seg_info(channel,
 							      channels);
 
 	for (i = 0; i < nchannels; i++) {

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

@@ -1847,7 +1847,7 @@ void dfs_start_precac_timer(struct wlan_dfs *dfs,
 	 * that etsi_precac/cac is done on primary segment.
 	 */
 	if (WLAN_IS_CHAN_DFS(dfs->dfs_curchan) &&
-	    !dfs_is_etsi_precac_done(dfs) &&
+	    !dfs_is_etsi_precac_done(dfs, dfs->dfs_curchan) &&
 	    !dfs_is_precac_done(dfs, dfs->dfs_curchan))
 		precac_timeout = QDF_MAX(primary_cac_timeout,
 					 secondary_cac_timeout) +