diff --git a/target_if/init_deinit/src/init_event_handler.c b/target_if/init_deinit/src/init_event_handler.c index 96cc5b3a56..ebda652023 100644 --- a/target_if/init_deinit/src/init_event_handler.c +++ b/target_if/init_deinit/src/init_event_handler.c @@ -224,6 +224,33 @@ static inline void init_deinit_update_tdls_caps(struct wmi_unified *wmi_handle, {} #endif +#ifdef WLAN_MLO_MULTI_CHIP +static void init_deinit_mlo_tsf_sync_support(struct wmi_unified *wmi_handle, + struct wlan_objmgr_psoc *psoc) +{ + uint8_t ml_grp_id; + struct mlo_mgr_context *mlo_ctx = wlan_objmgr_get_mlo_ctx(); + struct mlo_setup_info *mlo_setup; + bool mlo_tsf_sync_enab = false; + + ml_grp_id = wlan_mlo_get_psoc_group_id(psoc); + if (ml_grp_id < 0) { + target_if_err("Invalid ML Grp ID"); + return; + } + + mlo_setup = &mlo_ctx->setup_info[ml_grp_id]; + if (wmi_service_enabled(wmi_handle, wmi_service_mlo_tsf_sync)) + mlo_tsf_sync_enab = true; + + mlo_setup->tsf_sync_enabled &= mlo_tsf_sync_enab; +} +#else +static void init_deinit_mlo_tsf_sync_support(struct wmi_unified *wmi_handle, + struct wlan_objmgr_psoc *psoc) +{} +#endif + static int init_deinit_service_ready_event_handler(ol_scn_t scn_handle, uint8_t *event, uint32_t data_len) @@ -380,6 +407,8 @@ static int init_deinit_service_ready_event_handler(ol_scn_t scn_handle, init_deinit_update_wifi_pos_caps(wmi_handle, psoc); init_deinit_update_tdls_caps(wmi_handle, psoc); + init_deinit_mlo_tsf_sync_support(wmi_handle, psoc); + /* override derived value, if it exceeds max peer count */ if ((wlan_psoc_get_max_peer_count(psoc) > tgt_hdl->info.wlan_res_cfg.num_active_peers) && diff --git a/umac/mlo_mgr/inc/wlan_mlo_mgr_public_structs.h b/umac/mlo_mgr/inc/wlan_mlo_mgr_public_structs.h index 7c80545ca2..3a2fef331c 100644 --- a/umac/mlo_mgr/inc/wlan_mlo_mgr_public_structs.h +++ b/umac/mlo_mgr/inc/wlan_mlo_mgr_public_structs.h @@ -147,6 +147,7 @@ struct mlo_chip_info { * @event: event for teardown completion * @dp_handle: pointer to DP ML context * @chip_info: chip specific info of the soc + * @tsf_sync_enabled: MLO TSF sync is enabled at FW or not */ struct mlo_setup_info { uint8_t ml_grp_id; @@ -164,6 +165,7 @@ struct mlo_setup_info { qdf_event_t event; struct cdp_mlo_ctxt *dp_handle; struct mlo_chip_info chip_info; + bool tsf_sync_enabled; }; /** diff --git a/umac/mlo_mgr/src/wlan_mlo_mgr_setup.c b/umac/mlo_mgr/src/wlan_mlo_mgr_setup.c index c153a53d20..c903edc2c6 100644 --- a/umac/mlo_mgr/src/wlan_mlo_mgr_setup.c +++ b/umac/mlo_mgr/src/wlan_mlo_mgr_setup.c @@ -434,6 +434,7 @@ void mlo_setup_init(uint8_t total_grp) mlo_ctx->setup_info = setup_info; mlo_ctx->setup_info[0].ml_grp_id = 0; for (id = 0; id < total_grp; id++) { + mlo_ctx->setup_info[id].tsf_sync_enabled = true; if (qdf_event_create(&mlo_ctx->setup_info[id].event) != QDF_STATUS_SUCCESS) mlo_err("Unable to create teardown event"); diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 9b24187854..f4aeb43440 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -6344,6 +6344,9 @@ typedef enum { wmi_service_pre_rx_timeout, #ifdef QCA_STANDALONE_SOUNDING_TRIGGER wmi_service_standalone_sound, +#endif +#ifdef WLAN_FEATURE_11BE_MLO + wmi_service_mlo_tsf_sync, #endif wmi_services_max, } wmi_conv_service_ids; diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index bba08220a7..5851f0b884 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -22203,6 +22203,9 @@ static void populate_tlv_service(uint32_t *wmi_service) wmi_service[wmi_service_standalone_sound] = WMI_SERVICE_STANDALONE_SOUND; #endif +#ifdef WLAN_FEATURE_11BE_MLO + wmi_service[wmi_service_mlo_tsf_sync] = WMI_SERVICE_MLO_TSF_SYNC; +#endif } /**