Merge "qcacmn: Avoid alloc and init of tx desc pool for NSS offload case"
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
3668c4e7a7
@@ -8956,6 +8956,7 @@ dp_set_psoc_param(struct cdp_soc_t *cdp_soc,
|
||||
wlan_cfg_set_num_tx_desc_pool(wlan_cfg_ctx, 0);
|
||||
wlan_cfg_set_num_tx_ext_desc_pool(wlan_cfg_ctx, 0);
|
||||
wlan_cfg_set_num_tx_desc(wlan_cfg_ctx, 0);
|
||||
wlan_cfg_set_num_tx_spl_desc(soc->wlan_cfg_ctx, 0);
|
||||
wlan_cfg_set_num_tx_ext_desc(wlan_cfg_ctx, 0);
|
||||
break;
|
||||
default:
|
||||
|
@@ -4184,6 +4184,7 @@ void dp_soc_cfg_attach(struct dp_soc *soc)
|
||||
wlan_cfg_set_num_tx_desc_pool(soc->wlan_cfg_ctx, 0);
|
||||
wlan_cfg_set_num_tx_ext_desc_pool(soc->wlan_cfg_ctx, 0);
|
||||
wlan_cfg_set_num_tx_desc(soc->wlan_cfg_ctx, 0);
|
||||
wlan_cfg_set_num_tx_spl_desc(soc->wlan_cfg_ctx, 0);
|
||||
wlan_cfg_set_num_tx_ext_desc(soc->wlan_cfg_ctx, 0);
|
||||
soc->init_tcl_cmd_cred_ring = false;
|
||||
soc->num_tcl_data_rings =
|
||||
|
@@ -7356,6 +7356,9 @@ void dp_soc_tx_desc_sw_pools_free(struct dp_soc *soc)
|
||||
{
|
||||
uint8_t num_pool, num_ext_pool;
|
||||
|
||||
if (wlan_cfg_get_dp_soc_nss_cfg(soc->wlan_cfg_ctx))
|
||||
return;
|
||||
|
||||
num_pool = wlan_cfg_get_num_tx_desc_pool(soc->wlan_cfg_ctx);
|
||||
num_ext_pool = dp_get_ext_tx_desc_pool_num(soc);
|
||||
|
||||
@@ -7369,6 +7372,9 @@ void dp_soc_tx_desc_sw_pools_deinit(struct dp_soc *soc)
|
||||
{
|
||||
uint8_t num_pool, num_ext_pool;
|
||||
|
||||
if (wlan_cfg_get_dp_soc_nss_cfg(soc->wlan_cfg_ctx))
|
||||
return;
|
||||
|
||||
num_pool = wlan_cfg_get_num_tx_desc_pool(soc->wlan_cfg_ctx);
|
||||
num_ext_pool = dp_get_ext_tx_desc_pool_num(soc);
|
||||
|
||||
@@ -7383,6 +7389,9 @@ void dp_soc_tx_desc_sw_pools_free(struct dp_soc *soc)
|
||||
{
|
||||
uint8_t num_pool;
|
||||
|
||||
if (wlan_cfg_get_dp_soc_nss_cfg(soc->wlan_cfg_ctx))
|
||||
return;
|
||||
|
||||
num_pool = wlan_cfg_get_num_tx_desc_pool(soc->wlan_cfg_ctx);
|
||||
|
||||
dp_tx_delete_static_pools(soc, num_pool);
|
||||
@@ -7393,6 +7402,9 @@ void dp_soc_tx_desc_sw_pools_deinit(struct dp_soc *soc)
|
||||
{
|
||||
uint8_t num_pool;
|
||||
|
||||
if (wlan_cfg_get_dp_soc_nss_cfg(soc->wlan_cfg_ctx))
|
||||
return;
|
||||
|
||||
num_pool = wlan_cfg_get_num_tx_desc_pool(soc->wlan_cfg_ctx);
|
||||
|
||||
dp_tx_flow_control_deinit(soc);
|
||||
@@ -7466,6 +7478,9 @@ QDF_STATUS dp_soc_tx_desc_sw_pools_alloc(struct dp_soc *soc)
|
||||
uint32_t num_spcl_desc;
|
||||
uint32_t num_ext_desc;
|
||||
|
||||
if (wlan_cfg_get_dp_soc_nss_cfg(soc->wlan_cfg_ctx))
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
num_pool = wlan_cfg_get_num_tx_desc_pool(soc->wlan_cfg_ctx);
|
||||
num_ext_pool = dp_get_ext_tx_desc_pool_num(soc);
|
||||
num_desc = wlan_cfg_get_num_tx_desc(soc->wlan_cfg_ctx);
|
||||
@@ -7514,6 +7529,9 @@ QDF_STATUS dp_soc_tx_desc_sw_pools_init(struct dp_soc *soc)
|
||||
uint32_t num_spcl_desc;
|
||||
uint32_t num_ext_desc;
|
||||
|
||||
if (wlan_cfg_get_dp_soc_nss_cfg(soc->wlan_cfg_ctx))
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
num_pool = wlan_cfg_get_num_tx_desc_pool(soc->wlan_cfg_ctx);
|
||||
num_ext_pool = dp_get_ext_tx_desc_pool_num(soc);
|
||||
num_desc = wlan_cfg_get_num_tx_desc(soc->wlan_cfg_ctx);
|
||||
@@ -7556,6 +7574,9 @@ QDF_STATUS dp_soc_tx_desc_sw_pools_alloc(struct dp_soc *soc)
|
||||
uint32_t num_desc;
|
||||
uint32_t num_spcl_desc;
|
||||
|
||||
if (wlan_cfg_get_dp_soc_nss_cfg(soc->wlan_cfg_ctx))
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
num_pool = wlan_cfg_get_num_tx_desc_pool(soc->wlan_cfg_ctx);
|
||||
num_desc = wlan_cfg_get_num_tx_desc(soc->wlan_cfg_ctx);
|
||||
num_spcl_desc = wlan_cfg_get_num_tx_spl_desc(soc->wlan_cfg_ctx);
|
||||
@@ -7588,6 +7609,9 @@ QDF_STATUS dp_soc_tx_desc_sw_pools_init(struct dp_soc *soc)
|
||||
uint32_t num_desc;
|
||||
uint32_t num_spcl_desc;
|
||||
|
||||
if (wlan_cfg_get_dp_soc_nss_cfg(soc->wlan_cfg_ctx))
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
num_pool = wlan_cfg_get_num_tx_desc_pool(soc->wlan_cfg_ctx);
|
||||
num_desc = wlan_cfg_get_num_tx_desc(soc->wlan_cfg_ctx);
|
||||
num_spcl_desc = wlan_cfg_get_num_tx_spl_desc(soc->wlan_cfg_ctx);
|
||||
|
@@ -4951,6 +4951,12 @@ int wlan_cfg_get_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
|
||||
return cfg->num_tx_desc;
|
||||
}
|
||||
|
||||
|
||||
void wlan_cfg_set_num_tx_spl_desc(struct wlan_cfg_dp_soc_ctxt *cfg, int num_desc)
|
||||
{
|
||||
cfg->num_tx_spl_desc = num_desc;
|
||||
}
|
||||
|
||||
int wlan_cfg_get_num_tx_spl_desc(struct wlan_cfg_dp_soc_ctxt *cfg)
|
||||
{
|
||||
return cfg->num_tx_spl_desc;
|
||||
|
@@ -1264,6 +1264,16 @@ int wlan_cfg_get_num_global_spcl_tx_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_c
|
||||
*/
|
||||
int wlan_cfg_get_num_tx_desc(struct wlan_cfg_dp_soc_ctxt *wlan_cfg_ctx);
|
||||
|
||||
/**
|
||||
* wlan_cfg_set_num_tx_spl_desc() - Set the number of special Tx Descriptors
|
||||
* per pool
|
||||
*
|
||||
* @cfg: Configuration Handle
|
||||
* @num_desc: Number of descriptor
|
||||
*/
|
||||
void wlan_cfg_set_num_tx_spl_desc(struct wlan_cfg_dp_soc_ctxt *cfg,
|
||||
int num_desc);
|
||||
|
||||
/**
|
||||
* wlan_cfg_get_num_tx_spl_desc() - Number of Tx Descriptors for special
|
||||
* frames per pool
|
||||
|
Reference in New Issue
Block a user