summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJingxiang Ge <jge@codeaurora.org>2018-08-15 16:32:57 +0800
committernshrivas <nshrivas@codeaurora.org>2018-08-20 02:18:28 -0700
commit61251d31642b2faff2b467db5aeb5ebcb7cca4d1 (patch)
treef3f1052bf8b9fc10e78b0c5e3650cc1f52ea4b0e
parent77e40710c6f6ac59126c52e59fff786fb55c5a52 (diff)
qcacld-3.0: Fix tx queue is paused forever
Put flow control setting in the flow_pool_lock, which can avoid race condition between ol_tx_desc_free and ol_tx_desc_alloc. This is a refine based on Ib60139fd94a4fb88c92a7f8aaf886ae9d3ca4c75. Change-Id: I8d89323b5631039d7ff5a141775cc5825389c18b CRs-Fixed: 2297190
-rw-r--r--core/dp/txrx/ol_tx_desc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/dp/txrx/ol_tx_desc.c b/core/dp/txrx/ol_tx_desc.c
index 0232296e745d..0f94e7f27152 100644
--- a/core/dp/txrx/ol_tx_desc.c
+++ b/core/dp/txrx/ol_tx_desc.c
@@ -190,7 +190,6 @@ struct ol_tx_desc_t *ol_tx_desc_alloc(struct ol_txrx_pdev_t *pdev,
if (qdf_unlikely(pool->avail_desc < pool->stop_th)
&& (pool->status != FLOW_POOL_ACTIVE_PAUSED)) {
pool->status = FLOW_POOL_ACTIVE_PAUSED;
- qdf_spin_unlock_bh(&pool->flow_pool_lock);
/* pause network queues */
pdev->pause_cb(vdev->vdev_id,
WLAN_STOP_ALL_NETIF_QUEUE,
@@ -199,13 +198,14 @@ struct ol_tx_desc_t *ol_tx_desc_alloc(struct ol_txrx_pdev_t *pdev,
pdev->pause_cb(vdev->vdev_id,
WLAN_NETIF_PRIORITY_QUEUE_ON,
WLAN_DATA_FLOW_CONTROL_PRIORITY);
+ qdf_spin_unlock_bh(&pool->flow_pool_lock);
} else if (qdf_unlikely(pool->avail_desc <
pool->stop_priority_th)) {
- qdf_spin_unlock_bh(&pool->flow_pool_lock);
/* pause priority queue */
pdev->pause_cb(vdev->vdev_id,
WLAN_NETIF_PRIORITY_QUEUE_OFF,
WLAN_DATA_FLOW_CONTROL_PRIORITY);
+ qdf_spin_unlock_bh(&pool->flow_pool_lock);
} else {
qdf_spin_unlock_bh(&pool->flow_pool_lock);
}