From 38efdc0db2131641cc18bc8983039ed4e24acb8e Mon Sep 17 00:00:00 2001 From: Ashish Date: Mon, 6 Jun 2022 19:31:01 +0530 Subject: [PATCH] qcacld-3.0: Set sar safety req resp event before unsolited work stop Currently when sar safety unsolited timer expires, driver schedules a work to send sar safety unsolited events to user space. When driver receives sar set command from user space it tries to stop this work with delayed work stop sync. This delayed work stop sync API waits for work to get complete and then it stops the work, because of this, work runs the complete for loop and sends extra sar safety unsolicited events even after receiving sar set command. To addrerss above issue, set the sar safety request response event before delayed work stop sync to complete the work. Change-Id: I3485e4b1ea600393ff2d9512a055de92d0a3d612 CRs-Fixed: 3213334 --- core/hdd/src/wlan_hdd_sar_limits.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_sar_limits.c b/core/hdd/src/wlan_hdd_sar_limits.c index e51ae8ac56ea..15f7d5b2fd6e 100644 --- a/core/hdd/src/wlan_hdd_sar_limits.c +++ b/core/hdd/src/wlan_hdd_sar_limits.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021, 2024 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -1082,10 +1082,11 @@ void wlan_hdd_sar_timers_reset(struct hdd_context *hdd_ctx) if (QDF_IS_STATUS_SUCCESS(status)) hdd_nofl_debug("sar safety timer started"); + qdf_event_set(&hdd_ctx->sar_safety_req_resp_event); + qdf_delayed_work_stop_sync(&hdd_ctx->sar_safety_unsolicited_work); hdd_nofl_debug("sar safety unsolicited work stopped"); - qdf_event_set(&hdd_ctx->sar_safety_req_resp_event); } void wlan_hdd_sar_timers_init(struct hdd_context *hdd_ctx)