diff options
| author | Mahesh Kumar Kalikot Veetil <mkalikot@qca.qualcomm.com> | 2014-06-04 18:07:04 -0700 |
|---|---|---|
| committer | Pitani Venkata Rajesh Kumar <c_vpitan@qti.qualcomm.com> | 2014-06-07 00:56:18 +0530 |
| commit | 93eb682f78814fb6350f024fe4c45e25c93acb5c (patch) | |
| tree | 6594d9514d3e8f4a0d93956606483df25a133483 | |
| parent | 10b1ca0a32d0dee3c18eb1ecd1f04643a383ff9a (diff) | |
qcacld: dfs: fix for FCC Type-4 radar detection
FCC Type 4 detection failure, reports longer pulse duration than
it should be at center frequency of 5290 MHz in VHT80 mode. Added
a work around to fix the pulse width.
Change-Id: I30f8c54c600fe3e97441bcff33c7de0768dc2c22
CRs-fixed: 674473
| -rw-r--r-- | CORE/SERVICES/DFS/src/dfs_phyerr_tlv.c | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/CORE/SERVICES/DFS/src/dfs_phyerr_tlv.c b/CORE/SERVICES/DFS/src/dfs_phyerr_tlv.c index 3a2d6552479e..b14106b070f2 100644 --- a/CORE/SERVICES/DFS/src/dfs_phyerr_tlv.c +++ b/CORE/SERVICES/DFS/src/dfs_phyerr_tlv.c @@ -170,6 +170,7 @@ radar_summary_parse(struct ath_dfs *dfs, const char *buf, size_t len, struct rx_radar_status *rsu) { uint32_t rs[2]; + int freq_centre, freq; /* Drop out if we have < 2 DWORDs available */ if (len < sizeof(rs)) { @@ -211,6 +212,33 @@ radar_summary_parse(struct ath_dfs *dfs, const char *buf, size_t len, 6); rsu->delta_diff = MS(rs[RADAR_REPORT_PULSE_REG_1], RADAR_REPORT_PULSE_DELTA_DIFF); + + /* WAR for FCC Type 4*/ + /* + * HW is giving longer pulse duration (in case of VHT80, with traffic) + * which fails to detect FCC type4 radar pulses. Added a work around to + * fix the pulse duration and duration delta. + * + * IF VHT80 + * && (primary_channel==30MHz || primary_channel== -30MHz) + * && -4 <= pulse_index <= 4 + * && !chirp + * && pulse duration > 20 us + * THEN + * Set pulse duration to 20 us + */ + + freq = ieee80211_chan2freq(dfs->ic, dfs->ic->ic_curchan); + freq_centre = dfs->ic->ic_curchan->ic_vhtop_ch_freq_seg1; + + if ((IEEE80211_IS_CHAN_11AC_VHT80(dfs->ic->ic_curchan) && + (abs(freq - freq_centre) == 30) && + !rsu->is_chirp && + abs(rsu->sidx) <= 4 && + rsu->pulse_duration > 20)){ + rsu->pulse_duration = 20; + } + } static void @@ -401,9 +429,7 @@ tlv_calc_freq_info(struct ath_dfs *dfs, struct rx_radar_status *rs) * appropriately! */ - chan_centre = dfs->ic->ic_ieee2mhz( - dfs->ic->ic_curchan->ic_vhtop_ch_freq_seg1, - dfs->ic->ic_curchan->ic_flags); + chan_centre = dfs->ic->ic_curchan->ic_vhtop_ch_freq_seg1; } else { /* HT20/HT40 */ |
