From a48556932aa225807ba9dd86966f20cecedb18ae Mon Sep 17 00:00:00 2001 From: Nachiket Kukade Date: Mon, 21 Aug 2017 21:19:09 +0530 Subject: [PATCH] qcacld-3.0: Start vendor ACS timer after the vendor event is sent Driver starts a vendor ACS timer which times out if vendor app doesn't respond with commands within stipulated time. But in do_acs this timer is started before all the channel list parsing, regulatory checks and buffer allocation code. In some cases this takes up enough time to expire the timer before sending the vendor event. Similar situation will arise if a buffer allocation fails in between. To avoid this start timer after the vendor event is sent. Change-Id: If9bea4643e03f0541ac8d8af2183c1e8d3a6cc40 CRs-Fixed: 2096246 --- core/hdd/src/wlan_hdd_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index c0c5921c4df1..f1a4c48aa8ec 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -7261,10 +7261,10 @@ int hdd_update_acs_timer_reason(hdd_adapter_t *adapter, uint8_t reason) timer_context = (struct hdd_external_acs_timer_context *) adapter->sessionCtx.ap.vendor_acs_timer.user_data; timer_context->reason = reason; - qdf_mc_timer_start(&adapter->sessionCtx.ap.vendor_acs_timer, - WLAN_VENDOR_ACS_WAIT_TIME); - /* Update config to application */ + /* Update config to application and start the timer */ hdd_cfg80211_update_acs_config(adapter, reason); + qdf_mc_timer_start(&adapter->sessionCtx.ap.vendor_acs_timer, + WLAN_VENDOR_ACS_WAIT_TIME); hdd_notice("Updated ACS config to nl with reason %d", reason); return 0;