From 682cf6f843c45fae5976e9e2f0e93412c298c321 Mon Sep 17 00:00:00 2001 From: Abhishek Singh Date: Mon, 19 Aug 2019 11:45:00 +0530 Subject: [PATCH] qcacld-3.0: Fix WMI timeout for runtime PM For runtime PM if the bus is suspended driver need to consider extra 6 sec time for bus resume. Thus add 6 sec extra in WMI timeouts if runtime PM is supported. Change-Id: I5515cc889a0315382bac11a33ea6f901b7af1c46 CRs-Fixed: 2507029 --- components/ipa/core/src/wlan_ipa_core.c | 1 + components/nan/core/inc/wlan_nan_api.h | 3 +-- .../inc/wlan_pmo_common_public_struct.h | 4 ---- .../tdls/core/src/wlan_tdls_cmds_process.c | 2 +- .../dispatcher/inc/wlan_tdls_public_structs.h | 22 +++++++++++++------ core/cds/inc/cds_config.h | 2 ++ core/mac/inc/sir_api.h | 12 +++++++++- core/mac/src/include/utils_api.h | 1 + core/sap/src/sap_internal.h | 1 + core/sme/inc/sme_api.h | 11 +++++----- 10 files changed, 39 insertions(+), 20 deletions(-) diff --git a/components/ipa/core/src/wlan_ipa_core.c b/components/ipa/core/src/wlan_ipa_core.c index e11ed6c8a1a9..6a2a2521523e 100644 --- a/components/ipa/core/src/wlan_ipa_core.c +++ b/components/ipa/core/src/wlan_ipa_core.c @@ -25,6 +25,7 @@ #include "qdf_str.h" #include "sir_api.h" #include "host_diag_core_event.h" +#include "wlan_objmgr_vdev_obj.h" static struct wlan_ipa_priv *gp_ipa; diff --git a/components/nan/core/inc/wlan_nan_api.h b/components/nan/core/inc/wlan_nan_api.h index 81e12bd66ba6..d87b938b366d 100644 --- a/components/nan/core/inc/wlan_nan_api.h +++ b/components/nan/core/inc/wlan_nan_api.h @@ -23,8 +23,7 @@ #ifndef _WLAN_NAN_API_H_ #define _WLAN_NAN_API_H_ -#include "wlan_objmgr_vdev_obj.h" -#include "wlan_objmgr_psoc_obj.h" +#include "wlan_objmgr_peer_obj.h" #include "wlan_policy_mgr_public_struct.h" #include "qdf_status.h" diff --git a/components/pmo/dispatcher/inc/wlan_pmo_common_public_struct.h b/components/pmo/dispatcher/inc/wlan_pmo_common_public_struct.h index 4a533c33de52..7bcf941bd271 100644 --- a/components/pmo/dispatcher/inc/wlan_pmo_common_public_struct.h +++ b/components/pmo/dispatcher/inc/wlan_pmo_common_public_struct.h @@ -29,10 +29,6 @@ #include "wlan_cmn.h" #include "wlan_objmgr_cmn.h" #include "wlan_objmgr_global_obj.h" -#include "wlan_objmgr_psoc_obj.h" -#include "wlan_objmgr_pdev_obj.h" -#include "wlan_objmgr_vdev_obj.h" -#include "wlan_objmgr_peer_obj.h" #include "wmi_unified.h" #include "qdf_status.h" #include "qdf_lock.h" diff --git a/components/tdls/core/src/wlan_tdls_cmds_process.c b/components/tdls/core/src/wlan_tdls_cmds_process.c index 30ebe2a575ab..edba6dbf86a1 100644 --- a/components/tdls/core/src/wlan_tdls_cmds_process.c +++ b/components/tdls/core/src/wlan_tdls_cmds_process.c @@ -1181,7 +1181,7 @@ QDF_STATUS tdls_process_del_peer(struct tdls_oper_request *req) cmd.umac_cmd = req; cmd.source = WLAN_UMAC_COMP_TDLS; cmd.is_high_priority = false; - cmd.cmd_timeout_duration = TDLS_DEFAULT_SERIALIZE_CMD_TIMEOUT; + cmd.cmd_timeout_duration = TDLS_DELETE_PEER_CMD_TIMEOUT; cmd.vdev = vdev; cmd.is_blocking = true; diff --git a/components/tdls/dispatcher/inc/wlan_tdls_public_structs.h b/components/tdls/dispatcher/inc/wlan_tdls_public_structs.h index f167ab0a1f0c..ba473ce7d4dd 100644 --- a/components/tdls/dispatcher/inc/wlan_tdls_public_structs.h +++ b/components/tdls/dispatcher/inc/wlan_tdls_public_structs.h @@ -29,8 +29,9 @@ #include #include #include - -struct wlan_objmgr_psoc; +#ifdef FEATURE_RUNTIME_PM +#include +#endif #define WLAN_TDLS_STA_MAX_NUM 8 #define WLAN_TDLS_STA_P_UAPSD_OFFCHAN_MAX_NUM 1 @@ -51,15 +52,22 @@ struct wlan_objmgr_psoc; #define AC_PRIORITY_NUM 4 -/* default tdls serialize timeout is set to 4 secs */ -#define TDLS_DEFAULT_SERIALIZE_CMD_TIMEOUT 4000 +/* Default tdls serialize timeout is set to 4 (peer delete) + 1 secs */ +#ifdef FEATURE_RUNTIME_PM +/* Add extra PMO_RESUME_TIMEOUT for runtime PM resume timeout */ +#define TDLS_DELETE_PEER_CMD_TIMEOUT (4000 + 1000 + PMO_RESUME_TIMEOUT) +#else +#define TDLS_DELETE_PEER_CMD_TIMEOUT (4000 + 1000) +#endif + +/** Maximum time(ms) to wait for tdls del sta to complete **/ +#define WAIT_TIME_TDLS_DEL_STA (TDLS_DELETE_PEER_CMD_TIMEOUT + 1000) + +#define TDLS_DEFAULT_SERIALIZE_CMD_TIMEOUT (4000) /** Maximum time(ms) to wait for tdls add sta to complete **/ #define WAIT_TIME_TDLS_ADD_STA (TDLS_DEFAULT_SERIALIZE_CMD_TIMEOUT + 1000) -/** Maximum time(ms) to wait for tdls del sta to complete **/ -#define WAIT_TIME_TDLS_DEL_STA (TDLS_DEFAULT_SERIALIZE_CMD_TIMEOUT + 1000) - /** Maximum time(ms) to wait for Link Establish Req to complete **/ #define WAIT_TIME_TDLS_LINK_ESTABLISH_REQ 1500 diff --git a/core/cds/inc/cds_config.h b/core/cds/inc/cds_config.h index 2c46ca7e934c..75b30bce1c66 100644 --- a/core/cds/inc/cds_config.h +++ b/core/cds/inc/cds_config.h @@ -29,6 +29,8 @@ #include "osdep.h" #include "cdp_txrx_mob_def.h" +#include "wlan_cmn.h" +#include "wlan_cmn_ieee80211.h" #include "wlan_pmo_common_public_struct.h" #include "qca_vendor.h" diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index 66d0e40a6459..ad0695a05936 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -75,13 +75,23 @@ typedef uint8_t tSirVersionString[SIR_VERSION_STRING_LEN]; #define PERIODIC_TX_PTRN_MAX_SIZE 1536 #define MAXNUM_PERIODIC_TX_PTRNS 6 - /* FW response timeout values in milli seconds */ #define SIR_PEER_ASSOC_TIMEOUT (4000) /* 4 seconds */ +#ifdef FEATURE_RUNTIME_PM +/* Add extra PMO_RESUME_TIMEOUT for runtime PM resume timeout */ +#define SIR_DELETE_STA_TIMEOUT (4000 + PMO_RESUME_TIMEOUT) +#define SIR_VDEV_START_REQUEST_TIMEOUT (6000 + PMO_RESUME_TIMEOUT) +#define SIR_VDEV_STOP_REQUEST_TIMEOUT (4000 + PMO_RESUME_TIMEOUT) +#define SIR_VDEV_DELETE_REQUEST_TIMEOUT (4000 + PMO_RESUME_TIMEOUT) +#define SIR_VDEV_PLCY_MGR_TIMEOUT (2000 + PMO_RESUME_TIMEOUT) +#else #define SIR_DELETE_STA_TIMEOUT (4000) /* 4 seconds */ #define SIR_VDEV_START_REQUEST_TIMEOUT (6000) #define SIR_VDEV_STOP_REQUEST_TIMEOUT (4000) #define SIR_VDEV_PLCY_MGR_TIMEOUT (2000) +#define SIR_VDEV_DELETE_REQUEST_TIMEOUT (4000) +#endif + /* This should not be greater than MAX_NUMBER_OF_CONC_CONNECTIONS */ #define MAX_VDEV_SUPPORTED 4 diff --git a/core/mac/src/include/utils_api.h b/core/mac/src/include/utils_api.h index 2b237fad29fd..e2f8ce26163b 100644 --- a/core/mac/src/include/utils_api.h +++ b/core/mac/src/include/utils_api.h @@ -23,6 +23,7 @@ #include #include "ani_global.h" #include "sys_wrapper.h" +#include "wlan_vdev_mlme_main.h" #include "wlan_vdev_mlme_api.h" /** diff --git a/core/sap/src/sap_internal.h b/core/sap/src/sap_internal.h index 51153d4c2807..6e1b13d18433 100644 --- a/core/sap/src/sap_internal.h +++ b/core/sap/src/sap_internal.h @@ -34,6 +34,7 @@ #include "sap_ch_select.h" #include #include +#include "wlan_vdev_mlme_main.h" #include "wlan_vdev_mlme_api.h" /* DFS Non Occupancy Period =30 minutes, in microseconds */ diff --git a/core/sme/inc/sme_api.h b/core/sme/inc/sme_api.h index b142cbd5b445..0ce451cc4631 100644 --- a/core/sme/inc/sme_api.h +++ b/core/sme/inc/sme_api.h @@ -107,8 +107,8 @@ SIR_DELETE_STA_TIMEOUT + 1000) #define SME_DISCONNECT_TIMEOUT (SME_CMD_VDEV_DISCONNECT_TIMEOUT + 1000) -/* AP start timeout = vdev start + 4 sec */ -#define SME_CMD_VDEV_START_BSS_TIMEOUT (SIR_VDEV_START_REQUEST_TIMEOUT + 4000) +/* AP start timeout = vdev start + 2 sec */ +#define SME_CMD_VDEV_START_BSS_TIMEOUT (SIR_VDEV_START_REQUEST_TIMEOUT + 2000) #define SME_CMD_START_BSS_TIMEOUT (SME_CMD_VDEV_START_BSS_TIMEOUT + 1000) /* AP stop timeout = vdev stop + self peer delete + 1 sec */ @@ -130,11 +130,12 @@ * if SME_CMD_POLICY_MGR_CMD_TIMEOUT is changed change * POLICY_MGR_SER_CMD_TIMEOUT as well. */ -#define SME_CMD_POLICY_MGR_CMD_TIMEOUT (SIR_VDEV_PLCY_MGR_TIMEOUT + 2000) +#define SME_CMD_POLICY_MGR_CMD_TIMEOUT (SIR_VDEV_PLCY_MGR_TIMEOUT + 1000) #define SME_POLICY_MGR_CMD_TIMEOUT (SME_CMD_POLICY_MGR_CMD_TIMEOUT + 1000) -#define SME_VDEV_DELETE_CMD_TIMEOUT (6 * 1000) -#define SME_CMD_VDEV_CREATE_DELETE_TIMEOUT (SME_VDEV_DELETE_CMD_TIMEOUT + 4000) +#define SME_VDEV_DELETE_CMD_TIMEOUT (SIR_VDEV_DELETE_REQUEST_TIMEOUT + 2000) +#define SME_CMD_VDEV_CREATE_DELETE_TIMEOUT QDF_MAX(13000, \ + SME_VDEV_DELETE_CMD_TIMEOUT + 1) /*-------------------------------------------------------------------------- Type declarations