From 7a9dc17c655c4345edc4b226ac1df0c12fee9663 Mon Sep 17 00:00:00 2001 From: Rhythm Patwa Date: Thu, 19 Aug 2021 11:28:44 -0700 Subject: [PATCH] qcacmn: Add support for AFC Host service flags Add support for AFC specific Host service flags to switch between LPI only and SP+LPI, disable AFC timer and request ID checks in target. Change-Id: I34d6adcad6e4a2cd6383c941ed07b98059daeed0 --- wmi/inc/wmi_unified_param.h | 7 +++++++ wmi/src/wmi_unified_tlv.c | 12 ++++++++++++ 2 files changed, 19 insertions(+) diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index aa26601091..3e58f98187 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -5444,6 +5444,10 @@ struct wmi_host_fw_abi_ver { * @is_sap_connected_d3wow_enabled: is sap d3wow with connected client supported * @is_go_connected_d3wow_enabled: is go d3wow with connected client supported * @dynamic_pcie_gen_speed_change: is dynamic pcie gen speed change enabled + * @lpi_only_mode: Indicates whether AP is capable of operating in LPI only + * mode or both LPI/SP mode + * @afc_timer_check_disable: Disables AFC Timer related checks in FW + * @afc_req_id_check_disable: Disables AFC Request ID check in FW */ typedef struct { uint32_t num_vdevs; @@ -5557,6 +5561,9 @@ typedef struct { bool twt_ack_support_cap; uint32_t ema_init_config; uint32_t target_cap_flags; + bool lpi_only_mode; + bool afc_timer_check_disable; + bool afc_req_id_check_disable; } target_resource_config; /** diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 4a245aadf0..a4ef8d8983 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -7586,6 +7586,18 @@ void wmi_copy_resource_config(wmi_resource_config *resource_cfg, resource_cfg->host_service_flags, tgt_res_cfg->is_reg_cc_ext_event_supported); + WMI_RSRC_CFG_HOST_SERVICE_FLAG_LPI_SP_MODE_SUPPORT_SET( + resource_cfg->host_service_flags, + tgt_res_cfg->lpi_only_mode); + + WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_AFC_TIMER_CHECK_SET( + resource_cfg->host_service_flags, + tgt_res_cfg->afc_timer_check_disable); + + WMI_RSRC_CFG_HOST_SERVICE_FLAG_REG_DISCARD_AFC_REQ_ID_CHECK_SET( + resource_cfg->host_service_flags, + tgt_res_cfg->afc_req_id_check_disable); + wmi_set_nan_channel_support(resource_cfg); wmi_info("Enable dynamic PCIe gen speed: %d",