소스 검색

qcacmn: chages to save soc list in mlo setup

Changes to save SOC list in MLO setup

Change-Id: I185bf26b1dac6eced03931c213297564abe74747
Chaithanya Garrepalli 3 년 전
부모
커밋
65137277e8

+ 1 - 1
target_if/init_deinit/src/init_event_handler.c

@@ -538,7 +538,7 @@ static int init_deinit_service_available_handler(ol_scn_t scn_handle,
 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
 static void init_deinit_mlo_update_soc_ready(struct wlan_objmgr_psoc *psoc)
 {
-	mlo_setup_update_soc_ready(wlan_psoc_get_id(psoc));
+	mlo_setup_update_soc_ready(psoc);
 }
 
 static void init_deinit_send_ml_link_ready(struct wlan_objmgr_psoc *psoc,

+ 3 - 0
umac/mlo_mgr/inc/wlan_mlo_mgr_public_structs.h

@@ -82,10 +82,12 @@ enum MLO_LINK_STATE {
  * @tot_links: Total links in ML group
  * @num_links: Number of links probed in ML group
  * @pdev_list[MAX_MLO_LINKS]: pdev pointers belonging to this group
+ * @soc_list[MAX_MLO_CHIPS]: psoc pointers belonging to this group
  * @state[MAX_MLO_LINKS]: MLO link state
  * @state_lock: lock to protect access to link state
  */
 #define MAX_MLO_LINKS 6
+#define MAX_MLO_CHIPS 3
 struct mlo_setup_info {
 	uint8_t ml_grp_id;
 	uint8_t tot_socs;
@@ -93,6 +95,7 @@ struct mlo_setup_info {
 	uint8_t tot_links;
 	uint8_t num_links;
 	struct wlan_objmgr_pdev *pdev_list[MAX_MLO_LINKS];
+	struct wlan_objmgr_psoc *soc_list[MAX_MLO_CHIPS];
 	enum MLO_LINK_STATE state[MAX_MLO_LINKS];
 	qdf_spinlock_t state_lock;
 };

+ 5 - 4
umac/mlo_mgr/inc/wlan_mlo_mgr_setup.h

@@ -28,20 +28,21 @@ void mlo_setup_update_total_socs(uint8_t tot_socs);
 
 /**
  * mlo_setup_update_num_links() - API to update num links in soc for mlo
- * @soc_id: soc id of SoC corresponding to num_link
+ * @soc_id: soc object of SoC corresponding to num_link
  * @num_links: Number of links in that soc
  *
  * Return: None.
  */
-void mlo_setup_update_num_links(uint8_t soc_id, uint8_t num_links);
+void mlo_setup_update_num_links(struct wlan_objmgr_psoc *psoc,
+				uint8_t num_links);
 
 /**
  * mlo_setup_update_soc_ready() - API to notify when FW init done
- * @soc_id: soc id of SoC ready
+ * @psoc: soc object of SoC ready
  *
  * Return: None.
  */
-void mlo_setup_update_soc_ready(uint8_t soc_id);
+void mlo_setup_update_soc_ready(struct wlan_objmgr_psoc *psoc);
 
 /**
  * mlo_setup_link_ready() - API to notify link ready

+ 19 - 2
umac/mlo_mgr/src/wlan_mlo_mgr_setup.c

@@ -20,6 +20,7 @@
 #include "wlan_mlo_mgr_main.h"
 #ifdef WLAN_MLO_MULTI_CHIP
 #include "wlan_lmac_if_def.h"
+#include <cdp_txrx_mlo.h>
 #endif
 
 #ifdef WLAN_MLO_MULTI_CHIP
@@ -35,7 +36,8 @@ void mlo_setup_update_total_socs(uint8_t tot_socs)
 
 qdf_export_symbol(mlo_setup_update_total_socs);
 
-void mlo_setup_update_num_links(uint8_t soc_id, uint8_t num_links)
+void mlo_setup_update_num_links(struct wlan_objmgr_psoc *psoc,
+				uint8_t num_links)
 {
 	struct mlo_mgr_context *mlo_ctx = wlan_objmgr_get_mlo_ctx();
 
@@ -47,14 +49,29 @@ void mlo_setup_update_num_links(uint8_t soc_id, uint8_t num_links)
 
 qdf_export_symbol(mlo_setup_update_num_links);
 
-void mlo_setup_update_soc_ready(uint8_t soc_id)
+void mlo_setup_update_soc_ready(struct wlan_objmgr_psoc *psoc)
 {
 	struct mlo_mgr_context *mlo_ctx = wlan_objmgr_get_mlo_ctx();
+	uint8_t chip_idx;
 
 	if (!mlo_ctx)
 		return;
 
+	chip_idx = mlo_ctx->setup_info.num_soc;
+	mlo_ctx->setup_info.soc_list[chip_idx] = psoc;
 	mlo_ctx->setup_info.num_soc++;
+
+	if (mlo_ctx->setup_info.num_soc != mlo_ctx->setup_info.tot_socs)
+		return;
+
+	for (chip_idx = 0; chip_idx < mlo_ctx->setup_info.num_soc;
+			chip_idx++) {
+		struct wlan_objmgr_psoc *tmp_soc =
+			mlo_ctx->setup_info.soc_list[chip_idx];
+
+		cdp_soc_mlo_soc_setup(wlan_psoc_get_dp_handle(tmp_soc),
+				      mlo_ctx->dp_handle);
+	}
 }
 
 qdf_export_symbol(mlo_setup_update_soc_ready);