diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 5a9c3f263f..2beeb0a102 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -6059,6 +6059,9 @@ struct wmi_host_fw_abi_ver { * @use_pdev_id: * @max_num_dbs_scan_duty_cycle: max dbs can duty cycle value * @cce_disable: disable cce component + * @twt_ap_pdev_count: Number of MAC on which AP TWT feature is supported + * @twt_ap_sta_count: Max no of STA with which TWT sessions can be formed + * by the AP */ typedef struct { uint32_t num_vdevs; @@ -6131,6 +6134,8 @@ typedef struct { uint32_t use_pdev_id; uint32_t max_num_dbs_scan_duty_cycle; bool cce_disable; + uint32_t twt_ap_pdev_count; + uint32_t twt_ap_sta_count; } target_resource_config; /** diff --git a/wmi/inc/wmi_unified_twt_api.h b/wmi/inc/wmi_unified_twt_api.h index 3f3b8fb9bb..a7211d7546 100644 --- a/wmi/inc/wmi_unified_twt_api.h +++ b/wmi/inc/wmi_unified_twt_api.h @@ -20,7 +20,7 @@ * DOC: Implement API's specific to TWT component. */ -#ifdef _WMI_UNIFIED_TWT_API_H_ +#ifndef _WMI_UNIFIED_TWT_API_H_ #define _WMI_UNIFIED_TWT_API_H_ #include "wmi_unified_twt_param.h" diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index c001dfe05a..0ebf73de35 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -13237,6 +13237,23 @@ send_coex_config_cmd_tlv(wmi_unified_t wmi_handle, return ret; } + +#ifdef WLAN_SUPPORT_TWT +static void wmi_copy_twt_resource_config(wmi_resource_config *resource_cfg, + target_resource_config *tgt_res_cfg) +{ + resource_cfg->twt_ap_pdev_count = tgt_res_cfg->twt_ap_pdev_count; + resource_cfg->twt_ap_sta_count = tgt_res_cfg->twt_ap_sta_count; +} +#else +static void wmi_copy_twt_resource_config(wmi_resource_config *resource_cfg, + target_resource_config *tgt_res_cfg) +{ + resource_cfg->twt_ap_pdev_count = 0; + resource_cfg->twt_ap_sta_count = 0; +} +#endif + static void wmi_copy_resource_config(wmi_resource_config *resource_cfg, target_resource_config *tgt_res_cfg) @@ -13322,6 +13339,8 @@ void wmi_copy_resource_config(wmi_resource_config *resource_cfg, resource_cfg->flag1, 1); if (tgt_res_cfg->cce_disable) WMI_RSRC_CFG_FLAG_TCL_CCE_DISABLE_SET(resource_cfg->flag1, 1); + + wmi_copy_twt_resource_config(resource_cfg, tgt_res_cfg); } /* copy_hw_mode_id_in_init_cmd() - Helper routine to copy hw_mode in init cmd