From d167e9b4857ad4aa604ecb6773c9edeb727572c0 Mon Sep 17 00:00:00 2001 From: Houston Hoffman Date: Wed, 14 Dec 2016 11:09:34 -0800 Subject: qcacld-3.0: reduce spinlock time in htt_rx_hash_init 12ms is too long to hold a spinlock bh. Change-Id: I498fc89c6bbaffeda988db9a37f0099767016c7e CRs-Fixed: 1100552 --- core/dp/htt/htt_rx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/dp/htt/htt_rx.c b/core/dp/htt/htt_rx.c index 7b4ffa665988..617becb5e1db 100644 --- a/core/dp/htt/htt_rx.c +++ b/core/dp/htt/htt_rx.c @@ -3009,6 +3009,7 @@ static int htt_rx_hash_init(struct htt_pdev_t *pdev) { int i, j; int rc = 0; + void *allocation; HTT_ASSERT2(QDF_IS_PWR2(RX_NUM_HASH_BUCKETS)); @@ -3027,10 +3028,13 @@ static int htt_rx_hash_init(struct htt_pdev_t *pdev) for (i = 0; i < RX_NUM_HASH_BUCKETS; i++) { + qdf_spin_unlock_bh(&(pdev->rx_ring.rx_hash_lock)); /* pre-allocate bucket and pool of entries for this bucket */ - pdev->rx_ring.hash_table[i] = qdf_mem_malloc( - (sizeof(struct htt_rx_hash_bucket) + + allocation = qdf_mem_malloc((sizeof(struct htt_rx_hash_bucket) + (RX_ENTRIES_SIZE * sizeof(struct htt_rx_hash_entry)))); + qdf_spin_lock_bh(&(pdev->rx_ring.rx_hash_lock)); + pdev->rx_ring.hash_table[i] = allocation; + HTT_RX_HASH_COUNT_RESET(pdev->rx_ring.hash_table[i]); -- cgit v1.2.3