From a795c47f7028ca9cc60b5aad98bb9aafb55fd280 Mon Sep 17 00:00:00 2001 From: Vivek Date: Mon, 7 Feb 2022 20:20:27 +0530 Subject: [PATCH] qcacmn: Add CDP call to configure SAWF Add CDP call to configure SAWF enable and disable for a soc. Change-Id: I42f383a2e33808cf91310fd989a2e12db447236d CRs-Fixed: 3119127 --- dp/inc/cdp_txrx_cmn_struct.h | 2 ++ dp/wifi3.0/dp_main.c | 3 +++ wlan_cfg/wlan_cfg.c | 21 +++++++++++++++++++++ wlan_cfg/wlan_cfg.h | 22 ++++++++++++++++++++++ 4 files changed, 48 insertions(+) diff --git a/dp/inc/cdp_txrx_cmn_struct.h b/dp/inc/cdp_txrx_cmn_struct.h index 6e4646206a..8e1c2fdb43 100644 --- a/dp/inc/cdp_txrx_cmn_struct.h +++ b/dp/inc/cdp_txrx_cmn_struct.h @@ -1371,6 +1371,7 @@ typedef union cdp_config_param_t { bool cdp_skip_bar_update; bool cdp_ipa_enabled; bool cdp_psoc_param_vdev_stats_hw_offload; + bool cdp_sawf_enabled; } cdp_config_param_type; /** @@ -1507,6 +1508,7 @@ enum cdp_psoc_param_type { CDP_CFG_PEER_EXT_STATS, CDP_IPA_ENABLE, CDP_SET_VDEV_STATS_HW_OFFLOAD, + CDP_SAWF_ENABLE, }; #define TXRX_FW_STATS_TXSTATS 1 diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index fe481e89c6..f42072cf37 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -9808,6 +9808,9 @@ dp_set_psoc_param(struct cdp_soc_t *cdp_soc, wlan_cfg_set_vdev_stats_hw_offload_config(wlan_cfg_ctx, val.cdp_psoc_param_vdev_stats_hw_offload); break; + case CDP_SAWF_ENABLE: + wlan_cfg_set_sawf_config(wlan_cfg_ctx, val.cdp_sawf_enabled); + break; default: break; } diff --git a/wlan_cfg/wlan_cfg.c b/wlan_cfg/wlan_cfg.c index 901d54f9d4..0fb84fa974 100644 --- a/wlan_cfg/wlan_cfg.c +++ b/wlan_cfg/wlan_cfg.c @@ -3339,6 +3339,27 @@ wlan_cfg_set_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg, {} #endif +#ifdef CONFIG_SAWF +bool wlan_cfg_get_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg) +{ + return cfg->sawf_enabled; +} + +void wlan_cfg_set_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg, bool val) +{ + cfg->sawf_enabled = val; +} +#else +bool wlan_cfg_get_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg) +{ + return false; +} + +void wlan_cfg_set_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg, bool val) +{ +} +#endif + #ifdef CONFIG_BERYLLIUM int wlan_cfg_get_host2txmon_ring_mask(struct wlan_cfg_dp_soc_ctxt *cfg, int context) diff --git a/wlan_cfg/wlan_cfg.h b/wlan_cfg/wlan_cfg.h index d7a7529018..14788493de 100644 --- a/wlan_cfg/wlan_cfg.h +++ b/wlan_cfg/wlan_cfg.h @@ -417,6 +417,9 @@ struct wlan_cfg_dp_soc_ctxt { #ifdef WLAN_TX_PKT_CAPTURE_ENH uint32_t tx_capt_max_mem_allowed; #endif +#ifdef CONFIG_SAWF + bool sawf_enabled; +#endif }; /** @@ -2030,6 +2033,25 @@ wlan_cfg_get_vdev_stats_hw_offload_config(struct wlan_cfg_dp_soc_ctxt *cfg); */ int wlan_cfg_get_vdev_stats_hw_offload_timer(struct wlan_cfg_dp_soc_ctxt *cfg); +/** + * wlan_cfg_set_sawf_config() - Set SAWF config enable/disable + * @cfg: config context + * @value: value to be set + * + * Return: none + */ +void +wlan_cfg_set_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg, bool value); + +/** + * wlan_cfg_get_sawf_config() - Get SAWF config enable/disable + * @cfg: config context + * + * Return: true or false + */ +bool +wlan_cfg_get_sawf_config(struct wlan_cfg_dp_soc_ctxt *cfg); + #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP) /** * wlan_cfg_mlo_rx_ring_map_get_by_chip_id() - get rx ring map