From 36fc55eac54becf4dafee722ff61073833bb3b0f Mon Sep 17 00:00:00 2001 From: Aravind Kishore Sukla Date: Mon, 19 Dec 2022 14:18:47 +0530 Subject: [PATCH] qcacld-3.0: Handle timer de-init if eSAP_START_BSS_EVENT fails In current scenario, if eSAP_START_BSS_EVENT fails then host is not de-initializing the timer hdd_medium_assess_init. To address this issue, instead of de-init timer only for eSAP_STOP_BSS_EVENT, host needs to de-init timer from a common place. Change-Id: I3b1304df2481d8276aeeec480b0ac3c1e35e5753 CRs-Fixed: 3363793 --- core/hdd/src/wlan_hdd_hostapd.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 92f4e12459..cf80f07acd 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -2255,15 +2255,6 @@ QDF_STATUS hdd_hostapd_sap_event_cb(struct sap_event *sap_event, hdd_nofl_info("Ap stopped vid %d reason=%d", adapter->vdev_id, ap_ctx->bss_stop_reason); - qdf_status = - policy_mgr_get_mac_id_by_session_id(hdd_ctx->psoc, - adapter->vdev_id, - &pdev_id); - if (QDF_IS_STATUS_SUCCESS(qdf_status)) - hdd_medium_assess_stop_timer(pdev_id, hdd_ctx); - - hdd_medium_assess_deinit(); - /* clear the reason code in case BSS is stopped * in another place */ @@ -3030,6 +3021,15 @@ stopbss: sap_event->sapevt.sapStopBssCompleteEvent.status ? "eSAP_STATUS_FAILURE" : "eSAP_STATUS_SUCCESS"); + qdf_status = + policy_mgr_get_mac_id_by_session_id(hdd_ctx->psoc, + adapter->vdev_id, + &pdev_id); + if (QDF_IS_STATUS_SUCCESS(qdf_status)) + hdd_medium_assess_stop_timer(pdev_id, hdd_ctx); + + hdd_medium_assess_deinit(); + /* Change the BSS state now since, as we are shutting * things down, we don't want interfaces to become * re-enabled