瀏覽代碼

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
Rakesh Pillai 5 年之前
父節點
當前提交
0f5a52c0f6
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      dp/wifi3.0/dp_tx_desc.h

+ 2 - 0
dp/wifi3.0/dp_tx_desc.h

@@ -357,6 +357,7 @@ dp_tx_desc_free(struct dp_soc *soc, struct dp_tx_desc_s *tx_desc,
 		break;
 		break;
 	case FLOW_POOL_INVALID:
 	case FLOW_POOL_INVALID:
 		if (pool->avail_desc == pool->pool_size) {
 		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);
 			dp_tx_desc_pool_free(soc, desc_pool_id);
 			qdf_spin_unlock_bh(&pool->flow_pool_lock);
 			qdf_spin_unlock_bh(&pool->flow_pool_lock);
 			QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR,
 			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;
 		break;
 	case FLOW_POOL_INVALID:
 	case FLOW_POOL_INVALID:
 		if (pool->avail_desc == pool->pool_size) {
 		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);
 			dp_tx_desc_pool_free(soc, desc_pool_id);
 			qdf_spin_unlock_bh(&pool->flow_pool_lock);
 			qdf_spin_unlock_bh(&pool->flow_pool_lock);
 			qdf_print("%s %d pool is freed!!",
 			qdf_print("%s %d pool is freed!!",