From 70eb719dfef91a86b3655b055721500fb1978dc7 Mon Sep 17 00:00:00 2001 From: Vignesh U Date: Tue, 28 Apr 2020 11:28:02 +0530 Subject: [PATCH] qcacmn: Reduce the PRI threshold to detect w53 duplet pulses So far the DFS algorithm detected only a train of single pulses and the diff ts(PRI) which is the difference in time stamps between 2 consecutive pulses, should be greater than a threshold DFS_INVALID_PRI_LIMIT of 100us. When the diff ts is less than 100us, the radar queue gets reset. With the updated w53 DFS specification for Japan country, new sets of duplets have been introduced and the time interval between the 2 pulses in a single duplet can be as low as 20us. Since, the diff ts threshold DFS_INVALID_PRI_LIMIT is 100us, the duplets with a time interval less than 100us is not be detected. Reduce the diff ts threshold DFS_INVALID_PRI_LIMIT to 15us for MKKN DFS domain. CRs-Fixed: 2656660 Change-Id: I67b8ebab80155a5bcefcaa33f5a8d75c30d2ef40 --- umac/dfs/core/src/dfs.h | 1 + umac/dfs/core/src/dfs_confirm_radar.h | 6 ++++++ umac/dfs/core/src/filtering/dfs_partial_offload_radar.c | 6 ++++++ umac/dfs/core/src/filtering/dfs_process_radarevent.c | 4 ++-- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/umac/dfs/core/src/dfs.h b/umac/dfs/core/src/dfs.h index 6d07307812bb..f5d67b7b251b 100644 --- a/umac/dfs/core/src/dfs.h +++ b/umac/dfs/core/src/dfs.h @@ -1278,6 +1278,7 @@ struct wlan_dfs { uint16_t dfs_agile_rcac_freq_ucfg; struct ch_params dfs_rcac_ch_params; #endif + uint16_t dfs_lowest_pri_limit; }; #if defined(QCA_SUPPORT_AGILE_DFS) || defined(ATH_SUPPORT_ZERO_CAC_DFS) diff --git a/umac/dfs/core/src/dfs_confirm_radar.h b/umac/dfs/core/src/dfs_confirm_radar.h index 1a3c28c2bec2..363fe0054c46 100644 --- a/umac/dfs/core/src/dfs_confirm_radar.h +++ b/umac/dfs/core/src/dfs_confirm_radar.h @@ -25,6 +25,12 @@ #include "dfs_internal.h" #define DFS_INVALID_PRI_LIMIT 100 /* should we use 135? */ +/* The time interval between two sucessive pulses + * in case of w53 chirp type can be as low as 50us. + * Experimentally the PRI limit was found to be as + * low as 15us. + */ +#define DFS_INVALID_PRI_LIMIT_MKKN 15 #define FRAC_PRI_SCORE_ARRAY_SIZE 40 /** diff --git a/umac/dfs/core/src/filtering/dfs_partial_offload_radar.c b/umac/dfs/core/src/filtering/dfs_partial_offload_radar.c index 9c75eb20980b..c45686d20389 100644 --- a/umac/dfs/core/src/filtering/dfs_partial_offload_radar.c +++ b/umac/dfs/core/src/filtering/dfs_partial_offload_radar.c @@ -437,6 +437,7 @@ void dfs_get_po_radars(struct wlan_dfs *dfs) dfs_debug(dfs, WLAN_DEBUG_DFS_ALWAYS, "FCC domain"); rinfo.dfsdomain = DFS_FCC_DOMAIN; dfs_assign_fcc_pulse_table(&rinfo, target_type, tx_ops); + dfs->dfs_lowest_pri_limit = DFS_INVALID_PRI_LIMIT; break; case DFS_CN_DOMAIN: dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS, @@ -452,6 +453,7 @@ void dfs_get_po_radars(struct wlan_dfs *dfs) rinfo.numradars = QDF_ARRAY_SIZE(dfs_china_radars); rinfo.b5pulses = NULL; rinfo.numb5radars = 0; + dfs->dfs_lowest_pri_limit = DFS_INVALID_PRI_LIMIT; break; case DFS_ETSI_DOMAIN: dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS, "ETSI domain"); @@ -469,6 +471,7 @@ void dfs_get_po_radars(struct wlan_dfs *dfs) } rinfo.b5pulses = NULL; rinfo.numb5radars = 0; + dfs->dfs_lowest_pri_limit = DFS_INVALID_PRI_LIMIT; break; case DFS_KR_DOMAIN: dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS, @@ -487,6 +490,7 @@ void dfs_get_po_radars(struct wlan_dfs *dfs) rinfo.numradars = QDF_ARRAY_SIZE(dfs_korea_radars); rinfo.b5pulses = NULL; rinfo.numb5radars = 0; + dfs->dfs_lowest_pri_limit = DFS_INVALID_PRI_LIMIT; break; case DFS_MKKN_DOMAIN: dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS, "MKKN domain"); @@ -494,6 +498,7 @@ void dfs_get_po_radars(struct wlan_dfs *dfs) rinfo.dfs_radars = dfs_mkk4_radars; rinfo.numradars = QDF_ARRAY_SIZE(dfs_mkk4_radars); dfs_assign_mkk_bin5_radars(&rinfo, target_type, tx_ops); + dfs->dfs_lowest_pri_limit = DFS_INVALID_PRI_LIMIT_MKKN; break; case DFS_MKK4_DOMAIN: dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS, "MKK4 domain"); @@ -501,6 +506,7 @@ void dfs_get_po_radars(struct wlan_dfs *dfs) rinfo.dfs_radars = dfs_mkk4_radars; rinfo.numradars = QDF_ARRAY_SIZE(dfs_mkk4_radars); dfs_assign_mkk_bin5_radars(&rinfo, target_type, tx_ops); + dfs->dfs_lowest_pri_limit = DFS_INVALID_PRI_LIMIT; break; default: dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS, "UNINIT domain"); diff --git a/umac/dfs/core/src/filtering/dfs_process_radarevent.c b/umac/dfs/core/src/filtering/dfs_process_radarevent.c index d3e2cb05b91f..ef3aadac9272 100644 --- a/umac/dfs/core/src/filtering/dfs_process_radarevent.c +++ b/umac/dfs/core/src/filtering/dfs_process_radarevent.c @@ -298,7 +298,7 @@ static bool dfs_is_real_radar(struct wlan_dfs *dfs, * We do not give score to PRI that is lower then the * limit. */ - if (search_bin < DFS_INVALID_PRI_LIMIT) + if (search_bin < dfs->dfs_lowest_pri_limit) break; /* @@ -1248,7 +1248,7 @@ static inline void dfs_conditional_clear_delaylines( * false detects. */ - if (diff_ts < DFS_INVALID_PRI_LIMIT) { + if (diff_ts < dfs->dfs_lowest_pri_limit) { dfs->dfs_seq_num = 0; dfs_reset_alldelaylines(dfs); dfs_reset_radarq(dfs);