qcacmn: Add WMI service support for WSI stats info
This change adds service bit support for WSI stats to FW Change-Id: I06119c2196b951393e8bbbb82bd4a10436207d63 CRs-Fixed: 3601765
此提交包含在:
@@ -172,6 +172,7 @@ struct mlo_chip_info {
|
||||
* @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
|
||||
* @wsi_stats_info_support: WSI stats support at FW or not
|
||||
*/
|
||||
struct mlo_setup_info {
|
||||
uint8_t ml_grp_id;
|
||||
@@ -192,6 +193,7 @@ struct mlo_setup_info {
|
||||
struct cdp_mlo_ctxt *dp_handle;
|
||||
struct mlo_chip_info chip_info;
|
||||
bool tsf_sync_enabled;
|
||||
uint8_t wsi_stats_info_support;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -239,6 +239,27 @@ QDF_STATUS mlo_check_all_pdev_state(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t grp_id,
|
||||
enum MLO_LINK_STATE state);
|
||||
|
||||
/**
|
||||
* mlo_update_wsi_stats_info_support() - API to update WSI stats info
|
||||
* support
|
||||
* @psoc: Pointer to psoc object
|
||||
* @wsi_stats_info_support: Indicates WSI stats info is to be enabled or not
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void mlo_update_wsi_stats_info_support(struct wlan_objmgr_psoc *psoc,
|
||||
bool wsi_stats_info_support);
|
||||
|
||||
/**
|
||||
* mlo_get_wsi_stats_info_support() - API to get whether WSI stats info
|
||||
* support
|
||||
* @psoc: Pointer to psoc object
|
||||
*
|
||||
* Return: 1 enable
|
||||
* 0 disable
|
||||
*/
|
||||
uint8_t mlo_get_wsi_stats_info_support(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* mlo_update_tsf_sync_support() - API to update TSF sync support per MLO
|
||||
* group.
|
||||
@@ -291,6 +312,12 @@ bool mlo_psoc_get_grp_id(struct wlan_objmgr_psoc *psoc, uint8_t *grp_id)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline
|
||||
void init_deinit_pdev_wsi_stats_info_support(struct wlan_objmgr_psoc *psoc,
|
||||
bool wsi_stats_info_support)
|
||||
{
|
||||
}
|
||||
|
||||
static inline
|
||||
void mlo_update_tsf_sync_support(struct wlan_objmgr_psoc *psoc,
|
||||
bool tsf_sync_enab)
|
||||
|
@@ -2461,6 +2461,7 @@ wlan_mlo_peer_wsi_link_update(struct wlan_mlo_peer_context *ml_peer, bool add)
|
||||
uint32_t prim_psoc_ix_grp, sec_psoc_ix_grp;
|
||||
uint32_t i, j;
|
||||
struct mlo_wsi_psoc_grp *mlo_psoc_grp;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
|
||||
/* Check if ml_peer is valid */
|
||||
if (!ml_peer) {
|
||||
@@ -2501,6 +2502,13 @@ wlan_mlo_peer_wsi_link_update(struct wlan_mlo_peer_context *ml_peer, bool add)
|
||||
continue;
|
||||
}
|
||||
|
||||
psoc = wlan_peer_get_psoc(peer_entry->link_peer);
|
||||
if (!mlo_get_wsi_stats_info_support(psoc)) {
|
||||
mlo_info("WSI stats support is not enabled on psoc %d",
|
||||
wlan_psoc_get_id(psoc));
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Consider all non-primary peers as secondary links.
|
||||
* Additionally, consider all active peers as secondary link if
|
||||
|
@@ -476,6 +476,8 @@ void mlo_setup_init(uint8_t total_grp)
|
||||
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;
|
||||
mlo_ctx->setup_info[id].wsi_stats_info_support = 0xff;
|
||||
|
||||
if (qdf_event_create(&mlo_ctx->setup_info[id].event) !=
|
||||
QDF_STATUS_SUCCESS)
|
||||
mlo_err("Unable to create teardown event");
|
||||
@@ -1144,6 +1146,49 @@ QDF_STATUS mlo_link_teardown_link(struct wlan_objmgr_psoc *psoc,
|
||||
|
||||
qdf_export_symbol(mlo_link_teardown_link);
|
||||
|
||||
void mlo_update_wsi_stats_info_support(struct wlan_objmgr_psoc *psoc,
|
||||
bool wsi_stats_info_support)
|
||||
{
|
||||
uint8_t ml_grp_id;
|
||||
struct mlo_mgr_context *mlo_ctx = wlan_objmgr_get_mlo_ctx();
|
||||
struct mlo_setup_info *mlo_setup;
|
||||
|
||||
ml_grp_id = wlan_mlo_get_psoc_group_id(psoc);
|
||||
if ((ml_grp_id == WLAN_MLO_GROUP_INVALID) ||
|
||||
(ml_grp_id < 0)) {
|
||||
mlo_err("Invalid ML Grp ID %d", ml_grp_id);
|
||||
return;
|
||||
}
|
||||
|
||||
mlo_setup = &mlo_ctx->setup_info[ml_grp_id];
|
||||
if (mlo_setup->wsi_stats_info_support == 0xFF)
|
||||
mlo_setup->wsi_stats_info_support = wsi_stats_info_support;
|
||||
else
|
||||
mlo_setup->wsi_stats_info_support &= wsi_stats_info_support;
|
||||
}
|
||||
|
||||
qdf_export_symbol(mlo_update_wsi_stats_info_support);
|
||||
|
||||
uint8_t mlo_get_wsi_stats_info_support(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;
|
||||
|
||||
ml_grp_id = wlan_mlo_get_psoc_group_id(psoc);
|
||||
if ((ml_grp_id == WLAN_MLO_GROUP_INVALID) ||
|
||||
(ml_grp_id < 0)) {
|
||||
mlo_err("Invalid ML Grp ID %d", ml_grp_id);
|
||||
return 0;
|
||||
}
|
||||
|
||||
mlo_setup = &mlo_ctx->setup_info[ml_grp_id];
|
||||
if (mlo_setup->wsi_stats_info_support == 0xFF)
|
||||
return 0;
|
||||
|
||||
return mlo_setup->wsi_stats_info_support;
|
||||
}
|
||||
|
||||
void mlo_update_tsf_sync_support(struct wlan_objmgr_psoc *psoc,
|
||||
bool tsf_sync_enab)
|
||||
{
|
||||
|
新增問題並參考
封鎖使用者