summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHouston Hoffman <hhoffman@codeaurora.org>2016-12-14 11:09:34 -0800
committerqcabuildsw <qcabuildsw@localhost>2016-12-24 16:00:19 -0800
commitd167e9b4857ad4aa604ecb6773c9edeb727572c0 (patch)
treef6ab82122d1fd7044d0cb1dc553c59879513431c
parent190ce643dcdded626a1b9a8b6393c28d2f7c7313 (diff)
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
-rw-r--r--core/dp/htt/htt_rx.c8
1 files 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]);