From 125eb5841d6676c9277944cfd4bb7b425cf80aa7 Mon Sep 17 00:00:00 2001 From: Sheenam Monga Date: Tue, 22 Aug 2023 01:10:27 -0700 Subject: [PATCH] qcacld-3.0: Don't stop uninitialized timer currenyly, hdd_medium_assess_stop_timer is invoked during stop_ap and congestion report disabled. but init is done during congestion report enable and based on timer flag. So, Assert will be caused if timer is destroyed due to congestion report disable then stop AP comes. Fix is to add timer enable check and based on it call the stop timer API. Change-Id: I192b94a08cd07b2be14b2c75b44b3c6a7634b91a CRs-Fixed: 3589172 --- core/hdd/src/wlan_hdd_medium_assess.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_medium_assess.c b/core/hdd/src/wlan_hdd_medium_assess.c index 519fdfb903..51dc723ac1 100644 --- a/core/hdd/src/wlan_hdd_medium_assess.c +++ b/core/hdd/src/wlan_hdd_medium_assess.c @@ -404,12 +404,14 @@ void hdd_medium_assess_stop_timer(uint8_t pdev_id, struct hdd_context *hdd_ctx) for (i = 0; i < WLAN_UMAC_MAX_RP_PID; i++) interval += medium_assess_info[i].config.interval; - if (!interval) { + if (!interval && timer_enable) { ucfg_mc_cp_stats_reset_pending_req(hdd_ctx->psoc, TYPE_CONGESTION_STATS, &info, &pending); qdf_mc_timer_stop(&hdd_medium_assess_timer); hdd_debug("medium assess atimer stop"); + } else { + hdd_debug("medium assess timer already disabled"); } }