From 7b7bb3f440594ba4f4602a856c463a3a49d400dc Mon Sep 17 00:00:00 2001 From: Rajeev Kumar Date: Thu, 20 Dec 2018 12:09:54 -0800 Subject: [PATCH] qcacld-3.0: Add option to disable psoc idle timer Add option to disable idle psoc timer by changing min value to 0 and when 0 value is set in INI file then do not start the psoc idle timer. Change-Id: I6593f8ef9a15e1817215021c694c20ddf1aaa252 CRs-Fixed: 2370954 --- core/hdd/inc/hdd_config.h | 6 ++++-- core/hdd/src/wlan_hdd_main.c | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/core/hdd/inc/hdd_config.h b/core/hdd/inc/hdd_config.h index 9b32943db3..2090ac1180 100644 --- a/core/hdd/inc/hdd_config.h +++ b/core/hdd/inc/hdd_config.h @@ -87,7 +87,7 @@ enum hdd_wext_control { /* * * gInterfaceChangeWait - Interface change wait - * @Min: 10, + * @Min: 0, * @Max: 500000 * @Default: 10000 * @@ -95,6 +95,8 @@ enum hdd_wext_control { * this timer expires all the cds modules shall be closed. * Time Units: ms * + * Value 0 can be used to disable idle module stop. + * * Related: None * * Supported Feature: All @@ -103,7 +105,7 @@ enum hdd_wext_control { */ #define CFG_INTERFACE_CHANGE_WAIT CFG_INI_UINT( \ "gInterfaceChangeWait", \ - 10, \ + 0, \ 500000, \ 10000, \ CFG_VALUE_OR_DEFAULT, \ diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 8342ae5473..ff4ee8df9c 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -9213,6 +9213,11 @@ void hdd_psoc_idle_timer_start(struct hdd_context *hdd_ctx) enum wake_lock_reason reason = WIFI_POWER_EVENT_WAKELOCK_IFACE_CHANGE_TIMER; + if (!timeout_ms) { + hdd_info("psoc idle timer is disabled"); + return; + } + hdd_debug("Starting psoc idle timer"); qdf_sched_delayed_work(&hdd_ctx->psoc_idle_timeout_work, timeout_ms); hdd_prevent_suspend_timeout(timeout_ms, reason);