diff options
author | Balamurugan Mahalingam <bmahalin@codeaurora.org> | 2018-01-31 16:17:24 +0530 |
---|---|---|
committer | snandini <snandini@codeaurora.org> | 2018-02-23 06:06:03 -0800 |
commit | f6d3035ec6f3cd838b969ac6d3dce6d3059f0005 (patch) | |
tree | d2415620e7212963d3e0d7becd96874a6a609627 /hif | |
parent | 3ab3633184d4c8a378f72efd5a1622c1f113e09c (diff) | |
download | qca-wfi-host-cmn-f6d3035ec6f3cd838b969ac6d3dce6d3059f0005.tar.gz |
qcacmn: Fix race while stopping the ce poll timer
Set the timer_inited flag to false bit earlier to
stop ce_poll_timeout function from processing
CRs-Fixed: 2182979
Change-Id: I91dd257c6beb21e379a4c51e651d835a35ca76ed
Diffstat (limited to 'hif')
-rw-r--r-- | hif/src/ce/ce_main.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/hif/src/ce/ce_main.c b/hif/src/ce/ce_main.c index 483ddf19b..713bb8c74 100644 --- a/hif/src/ce/ce_main.c +++ b/hif/src/ce/ce_main.c @@ -1461,9 +1461,11 @@ void ce_fini(struct CE_handle *copyeng) struct hif_softc *scn = CE_state->scn; uint32_t desc_size; + bool inited = CE_state->timer_inited; CE_state->state = CE_UNUSED; scn->ce_id_to_state[CE_id] = NULL; - + /* Set the flag to false first to stop processing in ce_poll_timeout */ + CE_state->timer_inited = false; qdf_lro_deinit(CE_state->lro_data); if (CE_state->src_ring) { @@ -1503,8 +1505,7 @@ void ce_fini(struct CE_handle *copyeng) qdf_mem_free(CE_state->dest_ring); /* epping */ - if (CE_state->timer_inited) { - CE_state->timer_inited = false; + if (inited) { qdf_timer_free(&CE_state->poll_timer); } } |