diff options
| author | Rakesh Sunki <rsunki@qca.qualcomm.com> | 2015-09-29 18:57:26 -0700 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2015-10-01 16:20:26 +0530 |
| commit | f8b52addff0dcff073a3ba50d76f79771899bbd1 (patch) | |
| tree | e5087e504dd839cfd4a9b2b9ff38293e67bb5475 | |
| parent | ad00fadb8da02f701fe43cc0cacad0c1cd828b0b (diff) | |
qcacld: Fix to increase radar detection for ETSI
When a radar is injected with primary at +/-30MHz from center freq
incorrect pulse duration is reported in the phyerrors and causes
reduction in the radar detection probability.
Fix the issue by modifying the pulse duration when pulses with
certain characteristics encounter host and thereby increase
the radar detection rate.
Change-Id: Id1f96ca42d16c511003aacc14dc7eaf1374bd5e9
CRs-Fixed: 916055
| -rw-r--r-- | CORE/SERVICES/DFS/inc/dfs.h | 13 | ||||
| -rw-r--r-- | CORE/SERVICES/DFS/inc/radar_filters.h | 4 | ||||
| -rw-r--r-- | CORE/SERVICES/DFS/src/dfs_process_radarevent.c | 41 |
3 files changed, 50 insertions, 8 deletions
diff --git a/CORE/SERVICES/DFS/inc/dfs.h b/CORE/SERVICES/DFS/inc/dfs.h index f99aaab9f213..556de5b1a49f 100644 --- a/CORE/SERVICES/DFS/inc/dfs.h +++ b/CORE/SERVICES/DFS/inc/dfs.h @@ -213,14 +213,21 @@ #define DFS_FAST_CLOCK_MULTIPLIER (800/11) #define DFS_NO_FAST_CLOCK_MULTIPLIER (80) -#define DFS_TYPE4_WAR_PLUS_30_MHZ_SEPARATION 30 -#define DFS_TYPE4_WAR_MINUS_30_MHZ_SEPARATION -30 -#define DFS_TYPE4_WAR_PEAK_INDEX_ZERO 0 +#define DFS_WAR_PLUS_30_MHZ_SEPARATION 30 +#define DFS_WAR_MINUS_30_MHZ_SEPARATION -30 +#define DFS_WAR_PEAK_INDEX_ZERO 0 #define DFS_TYPE4_WAR_PULSE_DURATION_LOWER_LIMIT 11 #define DFS_TYPE4_WAR_PULSE_DURATION_UPPER_LIMIT 33 #define DFS_TYPE4_WAR_PRI_LOWER_LIMIT 200 #define DFS_TYPE4_WAR_PRI_UPPER_LIMIT 500 #define DFS_TYPE4_WAR_VALID_PULSE_DURATION 12 +#define DFS_ETSI_TYPE2_TYPE3_WAR_PULSE_DUR_LOWER_LIMIT 15 +#define DFS_ETSI_TYPE2_TYPE3_WAR_PULSE_DUR_UPPER_LIMIT 33 +#define DFS_ETSI_TYPE2_WAR_PRI_LOWER_LIMIT 625 +#define DFS_ETSI_TYPE2_WAR_PRI_UPPER_LIMIT 5000 +#define DFS_ETSI_TYPE3_WAR_PRI_LOWER_LIMIT 250 +#define DFS_ETSI_TYPE3_WAR_PRI_UPPER_LIMIT 435 +#define DFS_ETSI_WAR_VALID_PULSE_DURATION 15 typedef adf_os_spinlock_t dfsq_lock_t; diff --git a/CORE/SERVICES/DFS/inc/radar_filters.h b/CORE/SERVICES/DFS/inc/radar_filters.h index 701dfed9787a..af6e268264a2 100644 --- a/CORE/SERVICES/DFS/inc/radar_filters.h +++ b/CORE/SERVICES/DFS/inc/radar_filters.h @@ -151,10 +151,10 @@ struct dfs_pulse dfs_etsi_radars[] = { // {10, 5, 200, 1000, 0, 24, 5, 0, 8, 15, 0, 0, 2, 33}, /* 0.8-15us, 200-1600 PRF, 15 pulses */ - {15, 15, 200, 1600, 0, 24, 8, 0, 18, 24, 0, 0, 0, 34}, /* Type 2 */ + {15, 15, 200, 1600, 0, 24, 8, 0, 18, 22, 0, 0, 0, 34}, /* Type 2 */ /* 0.8-15us, 2300-4000 PRF, 25 pulses*/ - {25, 15, 2300, 4000, 0, 24, 10, 0, 18, 24, 0, 0, 0, 35}, /* Type 3 */ + {25, 15, 2300, 4000, 0, 24, 10, 0, 18, 22, 0, 0, 0, 35}, /* Type 3 */ /* 20-30us, 2000-4000 PRF, 20 pulses*/ {20, 30, 2000, 4000, 0, 24, 6, 19, 33, 24, 0, 0, 0, 36}, /* Type 4 */ diff --git a/CORE/SERVICES/DFS/src/dfs_process_radarevent.c b/CORE/SERVICES/DFS/src/dfs_process_radarevent.c index 3876fa80d14d..272028bbe652 100644 --- a/CORE/SERVICES/DFS/src/dfs_process_radarevent.c +++ b/CORE/SERVICES/DFS/src/dfs_process_radarevent.c @@ -417,10 +417,10 @@ dfs_process_radarevent(struct ath_dfs *dfs, struct ieee80211_channel *chan) ((chan->ic_flags & IEEE80211_CHAN_VHT80) == IEEE80211_CHAN_VHT80) && (chan->ic_pri_freq_center_freq_mhz_separation == - DFS_TYPE4_WAR_PLUS_30_MHZ_SEPARATION || + DFS_WAR_PLUS_30_MHZ_SEPARATION || chan->ic_pri_freq_center_freq_mhz_separation == - DFS_TYPE4_WAR_MINUS_30_MHZ_SEPARATION) && - (re.sidx == DFS_TYPE4_WAR_PEAK_INDEX_ZERO) && + DFS_WAR_MINUS_30_MHZ_SEPARATION) && + (re.sidx == DFS_WAR_PEAK_INDEX_ZERO) && (re.re_dur > DFS_TYPE4_WAR_PULSE_DURATION_LOWER_LIMIT && re.re_dur < DFS_TYPE4_WAR_PULSE_DURATION_UPPER_LIMIT) && (diff_ts > DFS_TYPE4_WAR_PRI_LOWER_LIMIT && @@ -441,6 +441,41 @@ dfs_process_radarevent(struct ath_dfs *dfs, struct ieee80211_channel *chan) re.re_dur = DFS_TYPE4_WAR_VALID_PULSE_DURATION; } + /* + * Modifying the pulse duration for ETSI Type 2 + * and ETSI type 3 radar pulses when the following + * condition is reported in radar summary report. + */ + if ((DFS_ETSI_DOMAIN == dfs->dfsdomain) && + ((chan->ic_flags & IEEE80211_CHAN_VHT80) == + IEEE80211_CHAN_VHT80) && + (chan->ic_pri_freq_center_freq_mhz_separation == + DFS_WAR_PLUS_30_MHZ_SEPARATION || + chan->ic_pri_freq_center_freq_mhz_separation == + DFS_WAR_MINUS_30_MHZ_SEPARATION) && + (re.sidx == DFS_WAR_PEAK_INDEX_ZERO) && + (re.re_dur > DFS_ETSI_TYPE2_TYPE3_WAR_PULSE_DUR_LOWER_LIMIT && + re.re_dur < DFS_ETSI_TYPE2_TYPE3_WAR_PULSE_DUR_UPPER_LIMIT) && + ((diff_ts > DFS_ETSI_TYPE2_WAR_PRI_LOWER_LIMIT && + diff_ts < DFS_ETSI_TYPE2_WAR_PRI_UPPER_LIMIT) || + (diff_ts > DFS_ETSI_TYPE3_WAR_PRI_LOWER_LIMIT && + diff_ts < DFS_ETSI_TYPE3_WAR_PRI_UPPER_LIMIT ))) { + VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO, + "\n%s:chan->ic_flags=0x%x, Pri Chan MHz Separation=%d\n", + __func__, chan->ic_flags, + chan->ic_pri_freq_center_freq_mhz_separation); + + VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO, + "\n%s: Reported Peak Index = %d,re.re_dur = %d,diff_ts = %d\n", + __func__, re.sidx, re.re_dur, diff_ts); + + VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO, + "\n%s: Modifying the ETSI pulse dur to fit the valid range \n", + __func__); + + re.re_dur = DFS_ETSI_WAR_VALID_PULSE_DURATION; + } + /* BIN5 pulses are FCC and Japan specific */ if ((dfs->dfsdomain == DFS_FCC_DOMAIN) || (dfs->dfsdomain == DFS_MKK4_DOMAIN)) { |
