qcacmn: Add TX global desc pool per arch type
As cookie format is different between LI and BE have different global descriptor pool for Lithium and Beryllium Change-Id: Idd222f4009c017a1bc4bc4b14043b36d927a9e27 CRs-Fixed: 3608792
This commit is contained in:

committed by
Rahul Choudhary

parent
e762867930
commit
31c9403303
@@ -6525,7 +6525,7 @@ static QDF_STATUS dp_tx_alloc_static_pools(struct dp_soc *soc, int num_pool,
|
||||
|
||||
/* Allocate software Tx descriptor pools */
|
||||
|
||||
if (dp_global->tx_desc_pool_alloc_cnt == 0) {
|
||||
if (dp_global->tx_desc_pool_alloc_cnt[soc->arch_id] == 0) {
|
||||
for (i = 0; i < num_pool; i++) {
|
||||
if (dp_tx_desc_pool_alloc(soc, i, num_desc, false)) {
|
||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR,
|
||||
@@ -6535,7 +6535,7 @@ static QDF_STATUS dp_tx_alloc_static_pools(struct dp_soc *soc, int num_pool,
|
||||
}
|
||||
}
|
||||
}
|
||||
dp_global->tx_desc_pool_alloc_cnt++;
|
||||
dp_global->tx_desc_pool_alloc_cnt[soc->arch_id]++;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
fail:
|
||||
@@ -6554,7 +6554,7 @@ static QDF_STATUS dp_tx_spcl_alloc_static_pools(struct dp_soc *soc,
|
||||
dp_global = wlan_objmgr_get_global_ctx();
|
||||
|
||||
/* Allocate software Tx descriptor pools */
|
||||
if (dp_global->spcl_tx_desc_pool_alloc_cnt == 0) {
|
||||
if (dp_global->spcl_tx_desc_pool_alloc_cnt[soc->arch_id] == 0) {
|
||||
for (j = 0; j < num_pool; j++) {
|
||||
if (dp_tx_desc_pool_alloc(soc, j, num_spcl_desc, true)) {
|
||||
QDF_TRACE(QDF_MODULE_ID_DP,
|
||||
@@ -6565,7 +6565,7 @@ static QDF_STATUS dp_tx_spcl_alloc_static_pools(struct dp_soc *soc,
|
||||
}
|
||||
}
|
||||
}
|
||||
dp_global->spcl_tx_desc_pool_alloc_cnt++;
|
||||
dp_global->spcl_tx_desc_pool_alloc_cnt[soc->arch_id]++;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
fail:
|
||||
@@ -6582,7 +6582,7 @@ static QDF_STATUS dp_tx_init_static_pools(struct dp_soc *soc, int num_pool,
|
||||
|
||||
dp_global = wlan_objmgr_get_global_ctx();
|
||||
|
||||
if (dp_global->tx_desc_pool_init_cnt == 0) {
|
||||
if (dp_global->tx_desc_pool_init_cnt[soc->arch_id] == 0) {
|
||||
for (i = 0; i < num_pool; i++) {
|
||||
if (dp_tx_desc_pool_init(soc, i, num_desc, false)) {
|
||||
QDF_TRACE(QDF_MODULE_ID_DP,
|
||||
@@ -6593,7 +6593,7 @@ static QDF_STATUS dp_tx_init_static_pools(struct dp_soc *soc, int num_pool,
|
||||
}
|
||||
}
|
||||
}
|
||||
dp_global->tx_desc_pool_init_cnt++;
|
||||
dp_global->tx_desc_pool_init_cnt[soc->arch_id]++;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -6605,7 +6605,7 @@ static QDF_STATUS dp_tx_spcl_init_static_pools(struct dp_soc *soc, int num_pool,
|
||||
|
||||
dp_global = wlan_objmgr_get_global_ctx();
|
||||
|
||||
if (dp_global->spcl_tx_desc_pool_init_cnt == 0) {
|
||||
if (dp_global->spcl_tx_desc_pool_init_cnt[soc->arch_id] == 0) {
|
||||
for (i = 0; i < num_pool; i++) {
|
||||
if (dp_tx_desc_pool_init(soc, i, num_spcl_desc, true)) {
|
||||
QDF_TRACE(QDF_MODULE_ID_DP,
|
||||
@@ -6616,7 +6616,7 @@ static QDF_STATUS dp_tx_spcl_init_static_pools(struct dp_soc *soc, int num_pool,
|
||||
}
|
||||
}
|
||||
}
|
||||
dp_global->spcl_tx_desc_pool_init_cnt++;
|
||||
dp_global->spcl_tx_desc_pool_init_cnt[soc->arch_id]++;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -6627,8 +6627,8 @@ static void dp_tx_deinit_static_pools(struct dp_soc *soc, int num_pool)
|
||||
|
||||
dp_global = wlan_objmgr_get_global_ctx();
|
||||
|
||||
dp_global->tx_desc_pool_init_cnt--;
|
||||
if (dp_global->tx_desc_pool_init_cnt == 0) {
|
||||
dp_global->tx_desc_pool_init_cnt[soc->arch_id]--;
|
||||
if (dp_global->tx_desc_pool_init_cnt[soc->arch_id] == 0) {
|
||||
for (i = 0; i < num_pool; i++)
|
||||
dp_tx_desc_pool_deinit(soc, i, false);
|
||||
}
|
||||
@@ -6641,8 +6641,8 @@ static void dp_tx_spcl_deinit_static_pools(struct dp_soc *soc, int num_pool)
|
||||
|
||||
dp_global = wlan_objmgr_get_global_ctx();
|
||||
|
||||
dp_global->spcl_tx_desc_pool_init_cnt--;
|
||||
if (dp_global->spcl_tx_desc_pool_init_cnt == 0) {
|
||||
dp_global->spcl_tx_desc_pool_init_cnt[soc->arch_id]--;
|
||||
if (dp_global->spcl_tx_desc_pool_init_cnt[soc->arch_id] == 0) {
|
||||
for (i = 0; i < num_pool; i++)
|
||||
dp_tx_desc_pool_deinit(soc, i, true);
|
||||
}
|
||||
@@ -6655,8 +6655,8 @@ static void dp_tx_delete_static_pools(struct dp_soc *soc, int num_pool)
|
||||
|
||||
dp_global = wlan_objmgr_get_global_ctx();
|
||||
|
||||
dp_global->tx_desc_pool_alloc_cnt--;
|
||||
if (dp_global->tx_desc_pool_alloc_cnt == 0) {
|
||||
dp_global->tx_desc_pool_alloc_cnt[soc->arch_id]--;
|
||||
if (dp_global->tx_desc_pool_alloc_cnt[soc->arch_id] == 0) {
|
||||
for (i = 0; i < num_pool; i++)
|
||||
dp_tx_desc_pool_free(soc, i, false);
|
||||
}
|
||||
@@ -6669,8 +6669,8 @@ static void dp_tx_spcl_delete_static_pools(struct dp_soc *soc, int num_pool)
|
||||
|
||||
dp_global = wlan_objmgr_get_global_ctx();
|
||||
|
||||
dp_global->spcl_tx_desc_pool_alloc_cnt--;
|
||||
if (dp_global->spcl_tx_desc_pool_alloc_cnt == 0) {
|
||||
dp_global->spcl_tx_desc_pool_alloc_cnt[soc->arch_id]--;
|
||||
if (dp_global->spcl_tx_desc_pool_alloc_cnt[soc->arch_id] == 0) {
|
||||
for (i = 0; i < num_pool; i++)
|
||||
dp_tx_desc_pool_free(soc, i, true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user