From 67f4d02569ec39a2f6b6b3ed24643ee61287be09 Mon Sep 17 00:00:00 2001 From: Vignesh U Date: Mon, 30 Mar 2020 19:44:40 +0530 Subject: [PATCH] qcacmn: Add 165MHz channel check for PreCAC done Since the precac tree now supports until 165MHz, the APIs to check if the channel has done precac or not, dfs_is_precac_done_on_ht20_40_80_chan_for_freq() and dfs_is_precac_done_on_ht8080_ht160_chan() needs to be updated. Change dfs_is_precac_done_on_ht20_40_80_chan_for_freq() to dfs_is_precac_done_on_ht20_40_80_160_165_chan_for_freq() which can check if precac is done on a 20/40/80/160/165MHz channel. Change dfs_is_precac_done_on_ht8080_ht160_chan() to dfs_is_precac_done_on_ht8080_chan() which can check if precac is done on a given 80P80MHz channel other than the restricted 80P80MHz (165MHz) channel. Change-Id: I90312f968547d16b2d93783138c0f870439c6c26 CRs-Fixed: 2653171 --- umac/dfs/core/src/dfs_channel.h | 4 ++-- umac/dfs/core/src/dfs_zero_cac.h | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/umac/dfs/core/src/dfs_channel.h b/umac/dfs/core/src/dfs_channel.h index 4b7ec2b712fc..f6a1579e5b31 100644 --- a/umac/dfs/core/src/dfs_channel.h +++ b/umac/dfs/core/src/dfs_channel.h @@ -292,7 +292,7 @@ WLAN_IS_CHAN_11AXA_HE80_80(_c)) #define WLAN_IS_CHAN_MODE_165(_dfs, _c) \ - dfs_is_restricted_80p80mhz_supported(_dfs) && \ - WLAN_IS_CHAN_MODE_80_80(_c) + (dfs_is_restricted_80p80mhz_supported(_dfs) && \ + WLAN_IS_CHAN_MODE_80_80(_c)) #endif /* _DFS_CHANNEL_H_ */ diff --git a/umac/dfs/core/src/dfs_zero_cac.h b/umac/dfs/core/src/dfs_zero_cac.h index b24a8f3426e6..26a6036d4882 100644 --- a/umac/dfs/core/src/dfs_zero_cac.h +++ b/umac/dfs/core/src/dfs_zero_cac.h @@ -897,8 +897,8 @@ bool dfs_is_precac_done_on_ht20_40_80_chan(struct wlan_dfs *dfs, #endif /** - * dfs_is_precac_done_on_ht20_40_80_chan_for_freq() - Is precac done on a - * VHT20/40/80 channel. + * dfs_is_precac_done_on_ht20_40_80_160_165_chan_for_freq() - Is precac done on + * a VHT20/40/80/160/165 channel. *@dfs: Pointer to wlan_dfs structure. *@chan: Channel frequency * @@ -907,14 +907,15 @@ bool dfs_is_precac_done_on_ht20_40_80_chan(struct wlan_dfs *dfs, * * False: If CAC is not done on channel. */ #ifdef CONFIG_CHAN_FREQ_API -bool dfs_is_precac_done_on_ht20_40_80_chan_for_freq(struct wlan_dfs *dfs, - uint16_t chan_freq); +bool +dfs_is_precac_done_on_ht20_40_80_160_165_chan_for_freq(struct wlan_dfs *dfs, + uint16_t chan_freq); #endif /** - * dfs_is_precac_done_on_ht8080_ht160_chan() - Is precac done on - * VHT80+80 or VHT160 - * channel. + * dfs_is_precac_done_on_ht8080_chan() - Is precac done on VHT80+80 channel + * channel other than the restricted + * 80+80 channel. * @dfs: Pointer to wlan_dfs structure. * @chan: Pointer to dfs_channel for which preCAC done is checked. * @@ -922,8 +923,8 @@ bool dfs_is_precac_done_on_ht20_40_80_chan_for_freq(struct wlan_dfs *dfs, * * True: If CAC is done on channel. * * False: If CAC is not done on channel. */ -bool dfs_is_precac_done_on_ht8080_ht160_chan(struct wlan_dfs *dfs, - struct dfs_channel *chan); +bool dfs_is_precac_done_on_ht8080_chan(struct wlan_dfs *dfs, + struct dfs_channel *chan); #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && !defined(QCA_MCL_DFS_SUPPORT) /**