diff options
| author | CNSS_WLAN Service <cnssbldsw@qualcomm.com> | 2017-08-17 00:26:09 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-08-17 00:26:09 -0700 |
| commit | 68a7d060e3736766341bc2fbca0ea4949a0b8cb3 (patch) | |
| tree | 4a0dcf28b3602bf850003b0cd09f48b6193a426e | |
| parent | a618cb4f1bc95dd0cbc2385cbf6b31b35fc75048 (diff) | |
| parent | 51e28fdb76b0fee71eded82bf7e3409e56a39973 (diff) | |
Merge "qcacld-3.0: Protect tx descritpor states during allocation" into wlan-cld3.driver.lnx.1.1
| -rw-r--r-- | core/dp/txrx/ol_tx_desc.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/core/dp/txrx/ol_tx_desc.c b/core/dp/txrx/ol_tx_desc.c index 24b2f7127587..af869f24eb0d 100644 --- a/core/dp/txrx/ol_tx_desc.c +++ b/core/dp/txrx/ol_tx_desc.c @@ -144,19 +144,18 @@ struct ol_tx_desc_t *ol_tx_desc_alloc(struct ol_txrx_pdev_t *pdev, qdf_spin_lock_bh(&pdev->tx_mutex); if (pdev->tx_desc.freelist) { tx_desc = ol_tx_get_desc_global_pool(pdev); + if (!tx_desc) { + qdf_spin_unlock_bh(&pdev->tx_mutex); + return NULL; + } ol_tx_desc_dup_detect_set(pdev, tx_desc); ol_tx_desc_sanity_checks(pdev, tx_desc); ol_tx_desc_compute_delay(tx_desc); + ol_tx_desc_vdev_update(tx_desc, vdev); + ol_tx_desc_count_inc(vdev); + qdf_atomic_inc(&tx_desc->ref_cnt); } qdf_spin_unlock_bh(&pdev->tx_mutex); - - if (!tx_desc) - return NULL; - - ol_tx_desc_vdev_update(tx_desc, vdev); - ol_tx_desc_count_inc(vdev); - qdf_atomic_inc(&tx_desc->ref_cnt); - return tx_desc; } |
