summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPoddar, Siddarth <siddpodd@codeaurora.org>2017-01-19 21:48:29 +0530
committerqcabuildsw <qcabuildsw@localhost>2017-01-24 07:39:47 -0800
commit57c95e0b4da78a9b29e880c8484615c0026dca12 (patch)
tree661a03c50e3d3f9ccdb8edcb9dcc201dda2167e7
parent556109f7f7f21340e265e3218f475bf66d8378f3 (diff)
qcacld-3.0: Avoid deinit of TSO Seg lists if not initialized during pdev attach
Fix to avoid deinit of tso seg list and tso num seg list during pdev detach if the lists are not initialized during pdev post attach. Currently, if htt_attach() fails as part of ol_txrx_post_pdev_attach(), then it immediately returns from the function and not initializes tso seg lists and during pdev_detach(), host tries to de-initialize tso seg list and end up in a crash. CRs-Fixed: 1113347 Change-Id: I91e077496a15a69edb9d41574f846bc3d1b73b31
-rw-r--r--core/dp/txrx/ol_tx.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/dp/txrx/ol_tx.c b/core/dp/txrx/ol_tx.c
index e7d1743db9c6..db0e2a8aa096 100644
--- a/core/dp/txrx/ol_tx.c
+++ b/core/dp/txrx/ol_tx.c
@@ -1990,6 +1990,11 @@ void ol_tso_seg_list_deinit(struct ol_txrx_pdev_t *pdev)
struct qdf_tso_seg_elem_t *c_element;
struct qdf_tso_seg_elem_t *temp;
+ /* pool size 0 implies that tso seg list is not initialised*/
+ if (pdev->tso_seg_pool.freelist == NULL &&
+ pdev->tso_seg_pool.pool_size == 0)
+ return;
+
qdf_spin_lock_bh(&pdev->tso_seg_pool.tso_mutex);
c_element = pdev->tso_seg_pool.freelist;
i = pdev->tso_seg_pool.pool_size;
@@ -2070,6 +2075,11 @@ void ol_tso_num_seg_list_deinit(struct ol_txrx_pdev_t *pdev)
struct qdf_tso_num_seg_elem_t *c_element;
struct qdf_tso_num_seg_elem_t *temp;
+ /* pool size 0 implies that tso num seg list is not initialised*/
+ if (pdev->tso_num_seg_pool.freelist == NULL &&
+ pdev->tso_num_seg_pool.num_seg_pool_size == 0)
+ return;
+
qdf_spin_lock_bh(&pdev->tso_num_seg_pool.tso_num_seg_mutex);
c_element = pdev->tso_num_seg_pool.freelist;
i = pdev->tso_num_seg_pool.num_seg_pool_size;