summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimanshu Agarwal <himanaga@codeaurora.org>2016-11-30 19:07:46 +0530
committerqcabuildsw <qcabuildsw@localhost>2016-12-05 04:20:01 -0800
commitf0647c54e02d9747e0d411ce4d8f0a3254cae1fe (patch)
tree4b8c22a098fc7de7a01cf4afbc6c375bf47af533
parentd1598df727c3f58fcd5623fa9f03c19f2d9abcc6 (diff)
qcacld-3.0: Move TXRX_PRINT outside peer_map_unmap_lock spinlock
In some cases, this TXRX_PRINT is taking more time to process as some other printks' are already in progress. As this printk is inside spinlock, so when some other core is also competiting for this spinlock, that core keeps iterating in a loop. After some time spinlock bug is triggered as it is suspected that this core is locked on this spinlock. This fix moves the TXRX_PRINT outside spinlock so that the other core don't have to wait to acquire spinlock due to this printk. Change-Id: Ie0fa7addd4f2a1272a4d5e287635b6a0f016ba97 CRs-Fixed: 1095406
-rw-r--r--core/dp/txrx/ol_txrx_peer_find.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/dp/txrx/ol_txrx_peer_find.c b/core/dp/txrx/ol_txrx_peer_find.c
index dfd7da2a40a4..e39b18f1393c 100644
--- a/core/dp/txrx/ol_txrx_peer_find.c
+++ b/core/dp/txrx/ol_txrx_peer_find.c
@@ -550,12 +550,12 @@ void ol_rx_peer_unmap_handler(ol_txrx_pdev_handle pdev, uint16_t peer_id)
/* This peer_id belongs to a peer already deleted */
qdf_atomic_dec(&pdev->peer_id_to_obj_map[peer_id].
del_peer_id_ref_cnt);
+ qdf_spin_unlock_bh(&pdev->peer_map_unmap_lock);
TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
"%s: Remove the ID %d reference to deleted peer. del_peer_id_ref_cnt %d",
__func__, peer_id,
qdf_atomic_read(&pdev->peer_id_to_obj_map[peer_id].
del_peer_id_ref_cnt));
- qdf_spin_unlock_bh(&pdev->peer_map_unmap_lock);
return;
}
peer = pdev->peer_id_to_obj_map[peer_id].peer;
@@ -566,10 +566,10 @@ void ol_rx_peer_unmap_handler(ol_txrx_pdev_handle pdev, uint16_t peer_id)
* If the peer ID is for a vdev, then the peer pointer stored
* in peer_id_to_obj_map will be NULL.
*/
+ qdf_spin_unlock_bh(&pdev->peer_map_unmap_lock);
TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
"%s: peer not found for peer_id %d",
__func__, peer_id);
- qdf_spin_unlock_bh(&pdev->peer_map_unmap_lock);
return;
}