diff --git a/umac/dfs/core/src/dfs.h b/umac/dfs/core/src/dfs.h index 72ea1dbd33b5..5f620d6f97a6 100644 --- a/umac/dfs/core/src/dfs.h +++ b/umac/dfs/core/src/dfs.h @@ -1138,10 +1138,6 @@ struct wlan_dfs { #endif TAILQ_HEAD(, dfs_precac_entry) dfs_precac_list; enum phy_ch_width dfs_precac_chwidth; -#ifdef QCA_SUPPORT_ETSI_PRECAC_DFS - TAILQ_HEAD(, dfs_etsi_precac_entry) dfs_etsiprecac_required_list; - TAILQ_HEAD(, dfs_etsi_precac_entry) dfs_etsiprecac_done_list; -#endif struct dfs_channel *dfs_curchan; struct dfs_channel dfs_cac_started_chan; diff --git a/umac/dfs/core/src/dfs_etsi_precac.h b/umac/dfs/core/src/dfs_etsi_precac.h deleted file mode 100644 index 666fa2cb836a..000000000000 --- a/umac/dfs/core/src/dfs_etsi_precac.h +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved. - * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * DOC: This file has ETSI Pre-CAC DFS APIs. - */ - -#ifndef _DFS_ETSI_PRECAC_H_ -#define _DFS_ETSI_PRECAC_H_ - -#include "dfs.h" - -#define VHT160_IEEE_FREQ_DIFF 16 - -/** - * struct dfs_etsi_precac_entry - PreCAC entry for ETSI domain - * @pe_list: ETSI PreCAC entry. - * @ieee: channel number - * @etsi_caclst_ticks start tick, OS speicfic. - * @dfs: Pointer to wlan_dfs structure. - */ -struct dfs_etsi_precac_entry { - TAILQ_ENTRY(dfs_etsi_precac_entry) pe_list; - uint16_t ieee; - unsigned long etsi_caclst_ticks; - struct wlan_dfs *dfs; -}; - -/** - * dfs_print_etsi_precaclists() - Print etsi precac list. - * @dfs: Pointer to wlan_dfs structure. - */ -#if defined(QCA_SUPPORT_ETSI_PRECAC_DFS) -void dfs_print_etsi_precaclists(struct wlan_dfs *dfs); -#else -static inline void dfs_print_etsi_precaclists(struct wlan_dfs *dfs) -{ -} -#endif - -/** - * dfs_reset_etsi_precac_lists() - Resets the ETSI precac lists. - * @dfs: Pointer to wlan_dfs structure. - */ -#if defined(QCA_SUPPORT_ETSI_PRECAC_DFS) -void dfs_reset_etsi_precac_lists(struct wlan_dfs *dfs); -#else -static inline void dfs_reset_etsi_precac_lists(struct wlan_dfs *dfs) -{ -} -#endif - -/** - * dfs_reset_etsiprecaclists()- Clears and initializes etsi_precac_required_list - * etsi_precac_done_list. - * - * @dfs: Pointer to wlan_dfs structure. - */ -#if defined(QCA_SUPPORT_ETSI_PRECAC_DFS) -void dfs_reset_etsiprecaclists(struct wlan_dfs *dfs); -#else -static inline void dfs_reset_etsiprecaclists(struct wlan_dfs *dfs) -{ -} -#endif - -/** - * dfs_add_to_etsi_precac_required_list()- Add channel to ETSI PreCAC Required - * list. - * - * @dfs: Pointer to wlan_dfs structure. - * @chan: Pointer to channel to be added to ETSI PreCAC Required List. - */ -#if defined(QCA_SUPPORT_ETSI_PRECAC_DFS) -void dfs_add_to_etsi_precac_required_list(struct wlan_dfs *dfs, uint8_t *chan); -#else -static inline void dfs_add_to_etsi_precac_required_list(struct wlan_dfs *dfs, - uint8_t *chan) -{ -} -#endif - -/** - * dfs_deinit_etsi_precac_list() - Clears the etsi precac list. - * @dfs: Pointer to wlan_dfs dtructure. - */ -#if defined(QCA_SUPPORT_ETSI_PRECAC_DFS) -void dfs_deinit_etsi_precac_list(struct wlan_dfs *dfs); -#else -static inline void dfs_deinit_etsi_precac_list(struct wlan_dfs *dfs) -{ -} -#endif - -/** - * dfs_etsi_precac_attach() - Initialize ETSI precac variables. - * @dfs: Pointer to DFS structure. - */ -#if defined(QCA_SUPPORT_ETSI_PRECAC_DFS) -void dfs_etsi_precac_attach(struct wlan_dfs *dfs); -#else -static inline void dfs_etsi_precac_attach(struct wlan_dfs *dfs) -{ -} -#endif - -/** - * dfs_etsi_precac_detach() - Free etsi_precac memory. - * @dfs: Pointer to wlan_dfs dtructure. - */ -#if defined(QCA_SUPPORT_ETSI_PRECAC_DFS) -void dfs_etsi_precac_detach(struct wlan_dfs *dfs); -#else -static inline void dfs_etsi_precac_detach(struct wlan_dfs *dfs) -{ -} -#endif - -/** - * dfs_init_etsiprecac_list() - Init ETSI precac list. - * @dfs: Pointer to wlan_dfs dtructure. - */ -#if defined(QCA_SUPPORT_ETSI_PRECAC_DFS) -void dfs_init_etsi_precac_list(struct wlan_dfs *dfs); -#else -static inline void dfs_init_etsi_precac_list(struct wlan_dfs *dfs) -{ -} -#endif - -/** - * dfs_is_subchan_in_etsi_precac_done_list() - Is HT20 sub channel - * in etsi precac done list. - * @dfs: Pointer to wlan_dfs structure. - * @channel: HT20 sub channel - * - * Return: If subchannel present in precac done list return 1. - * Otherwise return 0 - */ -#if defined(QCA_SUPPORT_ETSI_PRECAC_DFS) -int dfs_is_subchan_in_etsi_precac_done_list(struct wlan_dfs *dfs, - uint8_t channel); -#else -static inline int dfs_is_subchan_in_etsi_precac_done_list(struct wlan_dfs *dfs) -{ - return 0; -} -#endif -/** - * dfs_is_etsi_precac_done() - Is precac done. - * @dfs: Pointer to wlan_dfs structure. - * @channel: Channel to be checked of dfs_channel structure. - * - * Return: If precac already done in channel, return 1. Otherwise return 0. - */ -#if defined(QCA_SUPPORT_ETSI_PRECAC_DFS) -bool dfs_is_etsi_precac_done(struct wlan_dfs *dfs, struct dfs_channel *channel); -#else -static inline bool -dfs_is_etsi_precac_done(struct wlan_dfs *dfs, struct dfs_channel *channel) -{ - return false; -} -#endif - -/** - * dfs_mark_etsi_precac_dfs() - Mark the precac channel as radar for ETSI. - * @dfs: Pointer to wlan_dfs structure. - * @channels: List of HT20 primary channels - * @num_channels: Number of HT20 primary channels - */ -#if defined(QCA_SUPPORT_ETSI_PRECAC_DFS) -void dfs_mark_etsi_precac_dfs(struct wlan_dfs *dfs, - uint8_t *channels, uint8_t num_channels); -#else -static inline void dfs_mark_etsi_precac_dfs(struct wlan_dfs *dfs, - uint8_t *channels, - uint8_t num_channels) -{ -} -#endif - -/** - * dfs_add_chan_to_etsi_done_list() - Add subchannel to ETSI CAC done list, - * if present in ETSI CAC required list - * @dfs: Pointer to wlan_dfs structure. - * @channel: HT20 primary channel - * - * Return: If channel added to ETSI CAC done list, return 1. Otherwise return 0. - */ -#if defined(QCA_SUPPORT_ETSI_PRECAC_DFS) -int dfs_add_chan_to_etsi_done_list(struct wlan_dfs *dfs, uint8_t channel); -#else -static inline int dfs_add_chan_to_etsi_done_list(struct wlan_dfs *dfs, - uint8_t channel) -{ - return 0; -} -#endif - -/** - * dfs_add_to_etsi_precac_done_list() - Add channel to ETSI CAC done list - * @curchan: Pointer to dfs_channel structure. - * - */ -#if defined(QCA_SUPPORT_ETSI_PRECAC_DFS) -void dfs_add_to_etsi_precac_done_list(struct wlan_dfs *dfs); -#else -static inline void dfs_add_to_etsi_precac_done_list(struct wlan_dfs *dfs) -{ -} -#endif - -#endif /* _DFS_ETSI_PRECAC_H_ */ diff --git a/umac/dfs/core/src/misc/dfs.c b/umac/dfs/core/src/misc/dfs.c index de966cb0fac3..9571bff5bacd 100644 --- a/umac/dfs/core/src/misc/dfs.c +++ b/umac/dfs/core/src/misc/dfs.c @@ -31,7 +31,6 @@ #include "../dfs_full_offload.h" #include #include "wlan_dfs_utils_api.h" -#include "../dfs_etsi_precac.h" #include "../dfs_partial_offload_radar.h" /* Disable NOL in FW. */ @@ -187,7 +186,6 @@ int dfs_attach(struct wlan_dfs *dfs) } dfs_cac_timer_attach(dfs); dfs_zero_cac_attach(dfs); - dfs_etsi_precac_attach(dfs); dfs_nol_attach(dfs); /* @@ -257,7 +255,6 @@ void dfs_detach(struct wlan_dfs *dfs) dfs_main_detach(dfs); dfs_zero_cac_detach(dfs); dfs_nol_detach(dfs); - dfs_etsi_precac_detach(dfs); } #ifndef WLAN_DFS_STATIC_MEM_ALLOC @@ -703,7 +700,6 @@ int dfs_control(struct wlan_dfs *dfs, break; case DFS_RESET_PRECAC_LISTS: dfs_reset_precac_lists(dfs); - dfs_reset_etsi_precac_lists(dfs); break; case DFS_INJECT_SEQUENCE: error = dfs_inject_synthetic_pulse_sequence(dfs, indata); diff --git a/umac/dfs/core/src/misc/dfs_cac.c b/umac/dfs/core/src/misc/dfs_cac.c index 5331e294d325..31808c9c3857 100644 --- a/umac/dfs/core/src/misc/dfs_cac.c +++ b/umac/dfs/core/src/misc/dfs_cac.c @@ -30,7 +30,6 @@ #include "../dfs_channel.h" #include "../dfs_zero_cac.h" -#include "../dfs_etsi_precac.h" #include #include "wlan_dfs_utils_api.h" #include "wlan_dfs_mlme_api.h" @@ -122,10 +121,6 @@ static os_timer_func(dfs_cac_timeout) dfs->dfs_curchan->dfs_ch_freq, (qdf_system_ticks_to_msecs(qdf_system_ticks()) / 1000)); - /* Once CAC is done, add channel to ETSI precacdone list*/ - if (utils_get_dfsdomain(dfs->dfs_pdev_obj) == DFS_ETSI_DOMAIN) - dfs_add_to_etsi_precac_done_list(dfs); - /* * When radar is detected during a CAC we are woken up prematurely to * switch to a new channel. Check the channel to decide how to act. @@ -387,13 +382,6 @@ bool dfs_is_cac_required(struct wlan_dfs *dfs, return false; } - if (dfs_is_etsi_precac_done(dfs, cur_chan)) { - dfs_debug(dfs, WLAN_DEBUG_DFS, - "ETSI PRE-CAC alreay done on this channel %d", - dfs->dfs_curchan->dfs_ch_ieee); - return false; - } - /* If the channel has completed PRE-CAC then CAC can be skipped here. */ if (dfs_is_precac_done(dfs, cur_chan)) { dfs_debug(dfs, WLAN_DEBUG_DFS, diff --git a/umac/dfs/core/src/misc/dfs_nol.c b/umac/dfs/core/src/misc/dfs_nol.c index 14af05cde94c..d71f55172e7b 100644 --- a/umac/dfs/core/src/misc/dfs_nol.c +++ b/umac/dfs/core/src/misc/dfs_nol.c @@ -254,8 +254,6 @@ static os_timer_func(dfs_remove_from_nol) dfs_debug(dfs, WLAN_DEBUG_DFS_NOL, "remove channel %d from nol", chan); utils_dfs_unmark_precac_nol(dfs->dfs_pdev_obj, chan); - utils_dfs_add_to_etsi_precac_required_list(dfs->dfs_pdev_obj, - &chan); utils_dfs_reg_update_nol_ch(dfs->dfs_pdev_obj, &chan, 1, DFS_NOL_RESET); utils_dfs_save_nol(dfs->dfs_pdev_obj); diff --git a/umac/dfs/core/src/misc/dfs_process_radar_found_ind.c b/umac/dfs/core/src/misc/dfs_process_radar_found_ind.c index 4334b07e7041..d29468842da6 100644 --- a/umac/dfs/core/src/misc/dfs_process_radar_found_ind.c +++ b/umac/dfs/core/src/misc/dfs_process_radar_found_ind.c @@ -23,7 +23,6 @@ #include "../dfs.h" #include "../dfs_zero_cac.h" -#include "../dfs_etsi_precac.h" #include "../dfs_process_radar_found_ind.h" #include #include @@ -899,13 +898,6 @@ QDF_STATUS dfs_process_radar_ind(struct wlan_dfs *dfs, channels, num_channels); - if (utils_get_dfsdomain(dfs->dfs_pdev_obj) == DFS_ETSI_DOMAIN) { - /* Remove chan from ETSI Pre-CAC Cleared List*/ - dfs_info(dfs, WLAN_DEBUG_DFS_NOL, - "%s : %d remove channel from ETSI PreCAC List\n", - __func__, __LINE__); - dfs_mark_etsi_precac_dfs(dfs, channels, num_channels); - } /* * This calls into the umac DFS code, which sets the umac * related radar flags and begins the channel change diff --git a/umac/dfs/dispatcher/inc/wlan_dfs_utils_api.h b/umac/dfs/dispatcher/inc/wlan_dfs_utils_api.h index 4070d84b8fc1..a14d39dc826e 100644 --- a/umac/dfs/dispatcher/inc/wlan_dfs_utils_api.h +++ b/umac/dfs/dispatcher/inc/wlan_dfs_utils_api.h @@ -133,43 +133,6 @@ QDF_STATUS utils_dfs_reset_precaclists(struct wlan_objmgr_pdev *pdev); */ void utils_dfs_unmark_precac_nol(struct wlan_objmgr_pdev *pdev, uint8_t chan); -/** - * utils_dfs_reset_etsi_precaclists() - Clears and initializes etsi - * precac_required_list, - * etsi precac_done_list and - * etsi precac_nol_list. - * @pdev: Pointer to DFS pdev object. - * - * Wrapper function for dfs_reset_etsiprecaclists(). This function called from - * outside of DFS component. - */ -#ifdef QCA_SUPPORT_ETSI_PRECAC_DFS -QDF_STATUS utils_dfs_reset_etsi_precaclists(struct wlan_objmgr_pdev *pdev); -#else -static inline QDF_STATUS utils_dfs_reset_etsi_precaclists( - struct wlan_objmgr_pdev *pdev) -{ - return QDF_STATUS_SUCCESS; -} -#endif - -/** utils_dfs_add_to_etsi_precac_required_list() - Add channel to ETSI PreCAC - * Required list. - * @pdev: Pointer to DFS pdev object. - * @chan: Pointer to channel to be added to ETSI PreCAC Required List. - * - * Return: void - */ -#ifdef QCA_SUPPORT_ETSI_PRECAC_DFS -void utils_dfs_add_to_etsi_precac_required_list(struct wlan_objmgr_pdev *pdev, - uint8_t *chan); -#else -static inline void -utils_dfs_add_to_etsi_precac_required_list(struct wlan_objmgr_pdev *pdev, - uint8_t *chan) -{ -} -#endif /** * utils_dfs_cancel_precac_timer() - Cancel the precac timer. * @pdev: Pointer to DFS pdev object. diff --git a/umac/dfs/dispatcher/src/wlan_dfs_utils_api.c b/umac/dfs/dispatcher/src/wlan_dfs_utils_api.c index 705d015f20aa..476c69f7557c 100644 --- a/umac/dfs/dispatcher/src/wlan_dfs_utils_api.c +++ b/umac/dfs/dispatcher/src/wlan_dfs_utils_api.c @@ -27,7 +27,6 @@ #include "wlan_dfs_mlme_api.h" #include "../../core/src/dfs.h" #include "../../core/src/dfs_zero_cac.h" -#include "../../core/src/dfs_etsi_precac.h" #include #include "../../core/src/dfs_random_chan_sel.h" #ifdef QCA_DFS_USE_POLICY_MANAGER @@ -54,7 +53,6 @@ QDF_STATUS utils_dfs_reset(struct wlan_objmgr_pdev *pdev) dfs_reset(dfs); dfs_nol_update(dfs); dfs_reset_precaclists(dfs); - dfs_reset_etsiprecaclists(dfs); return QDF_STATUS_SUCCESS; } @@ -113,37 +111,6 @@ void utils_dfs_unmark_precac_nol(struct wlan_objmgr_pdev *pdev, uint8_t chan) qdf_export_symbol(utils_dfs_unmark_precac_nol); -#ifdef QCA_SUPPORT_ETSI_PRECAC_DFS -QDF_STATUS utils_dfs_reset_etsi_precaclists(struct wlan_objmgr_pdev *pdev) -{ - struct wlan_dfs *dfs; - - dfs = wlan_pdev_get_dfs_obj(pdev); - if (!dfs) - return QDF_STATUS_E_FAILURE; - - dfs_reset_etsiprecaclists(dfs); - - return QDF_STATUS_SUCCESS; -} - -qdf_export_symbol(utils_dfs_reset_etsi_precaclists); - -void utils_dfs_add_to_etsi_precac_required_list(struct wlan_objmgr_pdev *pdev, - uint8_t *chan) -{ - struct wlan_dfs *dfs; - - dfs = wlan_pdev_get_dfs_obj(pdev); - if (!dfs) - return; - - dfs_add_to_etsi_precac_required_list(dfs, chan); -} - -qdf_export_symbol(utils_dfs_add_to_etsi_precac_required_list); -#endif - QDF_STATUS utils_dfs_cancel_precac_timer(struct wlan_objmgr_pdev *pdev) { struct wlan_dfs *dfs;