summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimanshu Agarwal <himanaga@codeaurora.org>2017-03-30 13:54:17 +0530
committerSandeep Puligilla <spuligil@codeaurora.org>2017-04-03 14:42:41 -0700
commit7f3d08adbb4285d1b94ee29a6a7abdec40166041 (patch)
tree544732bc30feb8b8d6b043b22091b2755db0f7cc
parent96792736ab5b2c53f44ab22eee1628bccf148b60 (diff)
qcacld-3.0: Sync pool status with netif queue status
When flow pool is created, pool status is set to FLOW_POOL_ACTIVE_UNPAUSED irrespective of whether netif queues are paused or not. Also, when descriptors are transferred from invalid pool to deficient pool, pool status is not checked. So, if deficient pool is paused, then even after receiving required descriptors from invalid pool, its status and netif queues will still remain paused due to which traffic will not be able to resume ever. Sync pool status with netif queue status by: 1) Unpausing netif queues as well when pool is created. 2) If deficient pool is paused and on receiving descriptors from invalid pool, no. of descriptors goes beyond start threshold, unpause the queues and set the pool status to FLOW_POOL_ACTIVE_UNPAUSED. Change-Id: I69390e40130892d218372e4a8a0ab4b0c7b94b7e CRs-Fixed: 2025759
-rw-r--r--core/dp/txrx/ol_txrx_flow_control.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/dp/txrx/ol_txrx_flow_control.c b/core/dp/txrx/ol_txrx_flow_control.c
index 57ce2d369c4e..7ce33d6e558e 100644
--- a/core/dp/txrx/ol_txrx_flow_control.c
+++ b/core/dp/txrx/ol_txrx_flow_control.c
@@ -312,7 +312,17 @@ ol_tx_distribute_descs_to_deficient_pools(struct ol_tx_flow_pool_t *src_pool)
desc_move_count = ol_tx_move_desc_n(src_pool,
dst_pool, desc_move_count);
desc_count -= desc_move_count;
+
qdf_spin_lock_bh(&dst_pool->flow_pool_lock);
+ if (dst_pool->status == FLOW_POOL_ACTIVE_PAUSED) {
+ if (dst_pool->avail_desc > dst_pool->start_th) {
+ pdev->pause_cb(dst_pool->member_flow_id,
+ WLAN_WAKE_ALL_NETIF_QUEUE,
+ WLAN_DATA_FLOW_CONTROL);
+ dst_pool->status =
+ FLOW_POOL_ACTIVE_UNPAUSED;
+ }
+ }
}
qdf_spin_unlock_bh(&dst_pool->flow_pool_lock);
if (desc_count == 0)
@@ -652,6 +662,11 @@ void ol_tx_flow_pool_map_handler(uint8_t flow_id, uint8_t flow_type,
case FLOW_TYPE_VDEV:
ol_tx_flow_pool_vdev_map(pool, flow_id);
+ qdf_spin_lock_bh(&pool->flow_pool_lock);
+ pdev->pause_cb(flow_id,
+ WLAN_WAKE_ALL_NETIF_QUEUE,
+ WLAN_DATA_FLOW_CONTROL);
+ qdf_spin_unlock_bh(&pool->flow_pool_lock);
break;
default:
if (pool_create)