From 723599dcc406457ac0455ffa98b23935842e8d73 Mon Sep 17 00:00:00 2001 From: Abhishek Ambure Date: Fri, 11 Oct 2019 12:12:32 +0530 Subject: [PATCH] qcacld-3.0: Fix multiple start of opportunistic timer In a connect request if there are multiple BSSID, opportunistic timer is started for each failed BSSID. If connection to a BSSID takes more than opportunistic time, driver may end up starting opportunistic timer and queueing SMM request multiple times. To avoid this unnecessary multiple start of opportunistic timer, start it only once after final connect failure. Change-Id: I351cb631fe832239e5f5539f00c306f90192880b CRs-Fixed: 2543631 --- core/hdd/src/wlan_hdd_assoc.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index 8f2177b59ee3..744fcadc9cc1 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -3513,8 +3513,6 @@ hdd_association_completion_handler(struct hdd_adapter *adapter, hdd_ctx->psoc); } else { bool connect_timeout = false; - /* do we need to change the HW mode */ - policy_mgr_check_n_start_opportunistic_timer(hdd_ctx->psoc); if (roam_info && roam_info->is_fils_connection && eCSR_ROAM_RESULT_SCAN_FOR_SSID_FAILURE == roam_result) qdf_copy_macaddr(&roam_info->bssid, @@ -3663,12 +3661,13 @@ hdd_association_completion_handler(struct hdd_adapter *adapter, timeout_reason); } - /* Check to change TDLS state in FW - * as connection failed. - */ if (roam_status == eCSR_ROAM_ASSOCIATION_FAILURE || roam_status == eCSR_ROAM_CANCELLED) { + /* notify connect faiilure on final failure */ ucfg_tdls_notify_connect_failure(hdd_ctx->psoc); + /* do we need to change the HW mode on final failure */ + policy_mgr_check_n_start_opportunistic_timer( + hdd_ctx->psoc); } /*