qcacmn: HOST Memory Optimizations (in NSS offload mode)

Number of DP rings used in HOST mode and NSS offload mode differ
and in current scenario the rings are allocated unconditionally.

Allocate only required number of rings based on the HOST mode and
NSS Wi-Fi offload mode and based on the number of radios supported
per SOC.

CRs-Fixed: 2790504
Change-Id: I20ce1908da47c197ea3b406f8704b964f3d8f7d1
This commit is contained in:
phadiman
2020-10-29 11:52:33 +05:30
committed by snandini
parent b130521bd3
commit 95b9a6e63a
5 changed files with 126 additions and 48 deletions

View File

@@ -485,10 +485,14 @@ wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
wlan_cfg_ctx->max_clients = cfg_get(psoc, CFG_DP_MAX_CLIENTS);
wlan_cfg_ctx->max_alloc_size = cfg_get(psoc, CFG_DP_MAX_ALLOC_SIZE);
wlan_cfg_ctx->per_pdev_tx_ring = cfg_get(psoc, CFG_DP_PDEV_TX_RING);
wlan_cfg_ctx->num_reo_dest_rings = cfg_get(psoc, CFG_DP_REO_DEST_RINGS);
wlan_cfg_ctx->num_tcl_data_rings = cfg_get(psoc, CFG_DP_TCL_DATA_RINGS);
wlan_cfg_ctx->num_nss_reo_dest_rings =
cfg_get(psoc, CFG_DP_NSS_REO_DEST_RINGS);
wlan_cfg_ctx->num_nss_tcl_data_rings =
cfg_get(psoc, CFG_DP_NSS_TCL_DATA_RINGS);
wlan_cfg_ctx->per_pdev_rx_ring = cfg_get(psoc, CFG_DP_PDEV_RX_RING);
wlan_cfg_ctx->per_pdev_lmac_ring = cfg_get(psoc, CFG_DP_PDEV_LMAC_RING);
wlan_cfg_ctx->num_reo_dest_rings = cfg_get(psoc, CFG_DP_REO_DEST_RINGS);
wlan_cfg_ctx->num_tx_desc_pool = MAX_TXDESC_POOLS;
wlan_cfg_ctx->num_tx_ext_desc_pool = cfg_get(psoc,
CFG_DP_TX_EXT_DESC_POOLS);
@@ -927,11 +931,24 @@ int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
{
return 1;
}
int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
{
return 1;
}
#else
int wlan_cfg_num_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
{
return cfg->num_tcl_data_rings;
}
int wlan_cfg_num_nss_tcl_data_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
{
return cfg->num_nss_tcl_data_rings;
}
#endif
int wlan_cfg_tx_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
@@ -954,6 +971,11 @@ int wlan_cfg_num_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
return cfg->num_reo_dest_rings;
}
int wlan_cfg_num_nss_reo_dest_rings(struct wlan_cfg_dp_soc_ctxt *cfg)
{
return cfg->num_nss_reo_dest_rings;
}
int wlan_cfg_pkt_type(struct wlan_cfg_dp_soc_ctxt *cfg)
{
return cfg->htt_packet_type; /*htt_pkt_type_ethernet*/