From 8dca694d199b519d4cf0cccfcd40b7ae1fca1542 Mon Sep 17 00:00:00 2001 From: Karthik Kantamneni Date: Thu, 28 Oct 2021 12:38:50 +0530 Subject: [PATCH] qcacmn: Flush reg work instead of cancelling in deinit path Currently reg work is being cancelled in deinit path, cancel work will remove all the pending work items and wait for completion of current executing work. But in reg work case even pending work items has to be executed because we don't want to skip HP/TP values update. To avoid this make sure all the pending reg work items are flushed then disable the work for further queueing. Change-Id: I2ba1e26cf41fb3b0c33ec584c56525cbfac94d8f CRs-Fixed: 3065038 --- hal/wifi3.0/hal_srng.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hal/wifi3.0/hal_srng.c b/hal/wifi3.0/hal_srng.c index 7396981bd295..4a55cbb70cb8 100644 --- a/hal/wifi3.0/hal_srng.c +++ b/hal/wifi3.0/hal_srng.c @@ -739,8 +739,8 @@ static void hal_reg_write_work(void *arg) static void __hal_flush_reg_write_work(struct hal_soc *hal) { - qdf_cancel_work(&hal->reg_write_work); - + qdf_flush_work(&hal->reg_write_work); + qdf_disable_work(&hal->reg_write_work); } void hal_flush_reg_write_work(hal_soc_handle_t hal_handle)