Просмотр исходного кода

qcacmn: Add support for handling MLO TSF sync capability

Add APIs to init the TSF sync capability based on
WMI_SERVICE_MLO_TSF_SYNC service bit sent from FW,
per ML group.

Change-Id: Ie8ca48f8f6065f02eefaea85ad967e32d09787fc
CRs-Fixed: 3470139
Jhalak Naik 2 лет назад
Родитель
Сommit
7acca67784

+ 29 - 0
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) &&

+ 2 - 0
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;
 };
 
 /**

+ 1 - 0
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");

+ 3 - 0
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;

+ 3 - 0
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
 }
 
 /**