From 7f3d08adbb4285d1b94ee29a6a7abdec40166041 Mon Sep 17 00:00:00 2001 From: Himanshu Agarwal Date: Thu, 30 Mar 2017 13:54:17 +0530 Subject: 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 --- core/dp/txrx/ol_txrx_flow_control.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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) -- cgit v1.2.3