qcacmn: chages to save soc list in mlo setup

Changes to save SOC list in MLO setup

Change-Id: I185bf26b1dac6eced03931c213297564abe74747
Este commit está contenido en:
Chaithanya Garrepalli
2021-11-02 16:41:17 +05:30
cometido por Madan Koyyalamudi
padre c42af1f62f
commit 65137277e8
Se han modificado 4 ficheros con 28 adiciones y 7 borrados

Ver fichero

@@ -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,

Ver fichero

@@ -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;
};

Ver fichero

@@ -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

Ver fichero

@@ -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);