qcacmn: Deinit tx desc pool before freeing the pool
Currently when the last tx descriptor in any descriptor pool is freed, it will also free that particular tx descriptor pool. But before freeing the tx descriptor pool, the pool is not marked as inactive. Due to this, the next time when the tx descriptor pool is tried to be allocated, since its not inactive, the same pool is reattached, but without any memory allocated. Deinitialize the tx desc pool before freeing it, to make sure that the tx descriptor pool status is marked as inactive when the decriptor pool memory is freed. Change-Id: I52d792d115d215561c72f203abef6d327d126c01 CRs-Fixed: 2680397
This commit is contained in:
@@ -357,6 +357,7 @@ dp_tx_desc_free(struct dp_soc *soc, struct dp_tx_desc_s *tx_desc,
|
||||
break;
|
||||
case FLOW_POOL_INVALID:
|
||||
if (pool->avail_desc == pool->pool_size) {
|
||||
dp_tx_desc_pool_deinit(soc, desc_pool_id);
|
||||
dp_tx_desc_pool_free(soc, desc_pool_id);
|
||||
qdf_spin_unlock_bh(&pool->flow_pool_lock);
|
||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR,
|
||||
@@ -476,6 +477,7 @@ dp_tx_desc_free(struct dp_soc *soc, struct dp_tx_desc_s *tx_desc,
|
||||
break;
|
||||
case FLOW_POOL_INVALID:
|
||||
if (pool->avail_desc == pool->pool_size) {
|
||||
dp_tx_desc_pool_deinit(soc, desc_pool_id);
|
||||
dp_tx_desc_pool_free(soc, desc_pool_id);
|
||||
qdf_spin_unlock_bh(&pool->flow_pool_lock);
|
||||
qdf_print("%s %d pool is freed!!",
|
||||
|
Reference in New Issue
Block a user