diff --git a/target_if/core/inc/target_if.h b/target_if/core/inc/target_if.h index 045e62b80015..4573abdb01f4 100644 --- a/target_if/core/inc/target_if.h +++ b/target_if/core/inc/target_if.h @@ -2137,5 +2137,22 @@ static inline int32_t target_psoc_get_num_hw_modes return tgt_hdl->info.service_ext_param.num_hw_modes; } + +#ifdef WLAN_SUPPORT_TWT +static inline void target_if_set_twt_ap_pdev_count + (struct tgt_info *info, struct target_psoc_info *tgt_hdl) +{ + if (!tgt_hdl) + return; + + info->wlan_res_cfg.twt_ap_pdev_count = + target_psoc_get_num_radios(tgt_hdl); +} +#else +static inline void target_if_set_twt_ap_pdev_count + (struct tgt_info *info, struct target_psoc_info *tgt_hdl) +{ +} +#endif /* WLAN_SUPPORT_TWT */ #endif diff --git a/target_if/init_deinit/src/init_event_handler.c b/target_if/init_deinit/src/init_event_handler.c index 9fede2c7ac0a..c0e4205cb433 100644 --- a/target_if/init_deinit/src/init_event_handler.c +++ b/target_if/init_deinit/src/init_event_handler.c @@ -288,6 +288,8 @@ static int init_deinit_service_ext_ready_event_handler(ol_scn_t scn_handle, target_if_qwrap_cfg_enable(psoc, tgt_hdl, event); + target_if_set_twt_ap_pdev_count(info, tgt_hdl); + info->wlan_res_cfg.num_vdevs = (target_psoc_get_num_radios(tgt_hdl) * info->wlan_res_cfg.num_vdevs); info->wlan_res_cfg.beacon_tx_offload_max_vdev =