diff options
| author | Service qcabuildsw <qcabuildsw@localhost> | 2016-12-27 12:00:35 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-12-27 12:00:35 -0800 |
| commit | c134c66ce677787faa79447ba662a050ebc437bd (patch) | |
| tree | 455fb844e64527ff20b4e691d90787029049753e | |
| parent | 4c7e159d62724f775b899c75ae6369192a90b255 (diff) | |
| parent | 190ce643dcdded626a1b9a8b6393c28d2f7c7313 (diff) | |
Merge "qcacld-3.0: reduce spinlock time in htt_rx_hash_deinit" into wlan-cld3.driver.lnx.1.1-dev
| -rw-r--r-- | core/dp/htt/htt_rx.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/core/dp/htt/htt_rx.c b/core/dp/htt/htt_rx.c index 3d9ae783639c..7b4ffa665988 100644 --- a/core/dp/htt/htt_rx.c +++ b/core/dp/htt/htt_rx.c @@ -124,17 +124,21 @@ static void htt_rx_hash_deinit(struct htt_pdev_t *pdev) uint32_t i; struct htt_rx_hash_entry *hash_entry; + struct htt_rx_hash_bucket **hash_table; struct htt_list_node *list_iter = NULL; if (NULL == pdev->rx_ring.hash_table) return; qdf_spin_lock_bh(&(pdev->rx_ring.rx_hash_lock)); + hash_table = pdev->rx_ring.hash_table; + pdev->rx_ring.hash_table = NULL; + qdf_spin_unlock_bh(&(pdev->rx_ring.rx_hash_lock)); for (i = 0; i < RX_NUM_HASH_BUCKETS; i++) { /* Free the hash entries in hash bucket i */ - list_iter = pdev->rx_ring.hash_table[i]->listhead.next; - while (list_iter != &pdev->rx_ring.hash_table[i]->listhead) { + list_iter = hash_table[i]->listhead.next; + while (list_iter != &hash_table[i]->listhead) { hash_entry = (struct htt_rx_hash_entry *)((char *)list_iter - pdev->rx_ring. @@ -156,13 +160,11 @@ static void htt_rx_hash_deinit(struct htt_pdev_t *pdev) qdf_mem_free(hash_entry); } - qdf_mem_free(pdev->rx_ring.hash_table[i]); + qdf_mem_free(hash_table[i]); } - qdf_mem_free(pdev->rx_ring.hash_table); - pdev->rx_ring.hash_table = NULL; + qdf_mem_free(hash_table); - qdf_spin_unlock_bh(&(pdev->rx_ring.rx_hash_lock)); qdf_spinlock_destroy(&(pdev->rx_ring.rx_hash_lock)); } |
