Selaa lähdekoodia

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
Abhishek Singh 5 vuotta sitten
vanhempi
sitoutus
682cf6f843

+ 1 - 0
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;
 

+ 1 - 2
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"
 

+ 0 - 4
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"

+ 1 - 1
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;
 

+ 15 - 7
components/tdls/dispatcher/inc/wlan_tdls_public_structs.h

@@ -29,8 +29,9 @@
 #include <qdf_mc_timer.h>
 #include <wlan_cmn.h>
 #include <wlan_cmn_ieee80211.h>
-
-struct wlan_objmgr_psoc;
+#ifdef FEATURE_RUNTIME_PM
+#include <wlan_pmo_common_public_struct.h>
+#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
 

+ 2 - 0
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"
 

+ 11 - 1
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

+ 1 - 0
core/mac/src/include/utils_api.h

@@ -23,6 +23,7 @@
 #include <sir_common.h>
 #include "ani_global.h"
 #include "sys_wrapper.h"
+#include "wlan_vdev_mlme_main.h"
 #include "wlan_vdev_mlme_api.h"
 
 /**

+ 1 - 0
core/sap/src/sap_internal.h

@@ -34,6 +34,7 @@
 #include "sap_ch_select.h"
 #include <wlan_scan_public_structs.h>
 #include <wlan_objmgr_pdev_obj.h>
+#include "wlan_vdev_mlme_main.h"
 #include "wlan_vdev_mlme_api.h"
 
 /* DFS Non Occupancy Period =30 minutes, in microseconds */

+ 6 - 5
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