Browse Source

qcacld-3.0: Fix command timeouts for VDEV stop and PEER assoc/delete

Command timeouts for VDEV stop and PEER assoc/delete is 2 sec, which
doesn't consider delays in scheduling.

To consider scheduling delays set these values to 4 sec and change
the serialization and HDD timeouts accordingly.

Change-Id: Ifc8ca857727a7e73bbae586c0728816024f1c687
CRs-Fixed: 2472122
Abhishek Singh 5 years ago
parent
commit
fc0c4245a4
3 changed files with 18 additions and 11 deletions
  1. 3 3
      core/mac/inc/sir_api.h
  2. 14 7
      core/sme/inc/sme_api.h
  3. 1 1
      core/sme/src/csr/csr_api_roam.c

+ 3 - 3
core/mac/inc/sir_api.h

@@ -76,10 +76,10 @@ typedef uint8_t tSirVersionString[SIR_VERSION_STRING_LEN];
 
 
 /* FW response timeout values in milli seconds */
-#define SIR_PEER_ASSOC_TIMEOUT (2000) /* 1 seconds */
-#define SIR_DELETE_STA_TIMEOUT (2000) /* 2 seconds */
+#define SIR_PEER_ASSOC_TIMEOUT (4000) /* 4 seconds */
+#define SIR_DELETE_STA_TIMEOUT (4000) /* 4 seconds */
 #define SIR_VDEV_START_REQUEST_TIMEOUT   (6000)
-#define SIR_VDEV_STOP_REQUEST_TIMEOUT    (2000)
+#define SIR_VDEV_STOP_REQUEST_TIMEOUT    (4000)
 #define SIR_VDEV_PLCY_MGR_TIMEOUT        (2000)
 
 /* This should not be greater than MAX_NUMBER_OF_CONC_CONNECTIONS */

+ 14 - 7
core/sme/inc/sme_api.h

@@ -106,20 +106,27 @@
 #define SME_ACTIVE_LIST_CMD_TIMEOUT_VALUE (30*1000)
 #define SME_CMD_TIMEOUT_VALUE (SME_ACTIVE_LIST_CMD_TIMEOUT_VALUE + 1000)
 
-#define SME_CMD_VDEV_DISCONNECT_TIMEOUT (SIR_VDEV_STOP_REQUEST_TIMEOUT + 4000)
+/* Disconnect timeout = vdev stop + bss peer delete + 1 sec */
+#define SME_CMD_VDEV_DISCONNECT_TIMEOUT (SIR_VDEV_STOP_REQUEST_TIMEOUT + \
+					 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)
 #define SME_CMD_START_BSS_TIMEOUT (SME_CMD_VDEV_START_BSS_TIMEOUT + 1000)
 
-/* SME timeout for Start/Stop BSS commands is set to 6 secs */
-#define SME_START_STOP_BSS_CMD_TIMEOUT (SIR_VDEV_STOP_REQUEST_TIMEOUT + 4000)
-#define SME_CMD_STOP_BSS_TIMEOUT (SME_START_STOP_BSS_CMD_TIMEOUT + 4000)
+/* AP stop timeout = vdev stop + self peer delete + 1 sec */
+#define SME_CMD_STOP_BSS_CMD_TIMEOUT (SIR_VDEV_STOP_REQUEST_TIMEOUT + \
+				      SIR_DELETE_STA_TIMEOUT + 1000)
+#define SME_CMD_STOP_BSS_TIMEOUT (SME_CMD_STOP_BSS_CMD_TIMEOUT + 1000)
 
-#define SME_CMD_PEER_DISCONNECT_TIMEOUT (SIR_DELETE_STA_TIMEOUT + 2000)
-#define SME_PEER_DISCONNECT_TIMEOUT (SME_START_STOP_BSS_CMD_TIMEOUT + 1000)
+/* Peer disconenct timeout = peer delete + 1 sec */
+#define SME_CMD_PEER_DISCONNECT_TIMEOUT (SIR_DELETE_STA_TIMEOUT + 1000)
+#define SME_PEER_DISCONNECT_TIMEOUT (SME_CMD_PEER_DISCONNECT_TIMEOUT + 1000)
 
-#define SME_CMD_ROAM_CMD_TIMEOUT (SIR_VDEV_START_REQUEST_TIMEOUT + 4000)
+/* Roam cmds timeout = vdev start + peer assoc + 1 sec */
+#define SME_CMD_ROAM_CMD_TIMEOUT (SIR_VDEV_START_REQUEST_TIMEOUT + \
+				  SIR_PEER_ASSOC_TIMEOUT + 1000)
 #define SME_CMD_ADD_DEL_TS_TIMEOUT (4 * 1000)
 
 /*

+ 1 - 1
core/sme/src/csr/csr_api_roam.c

@@ -20325,7 +20325,7 @@ static void csr_fill_cmd_timeout(struct wlan_serialization_command *cmd)
 		cmd->cmd_timeout_duration = SME_CMD_VDEV_START_BSS_TIMEOUT;
 		break;
 	case WLAN_SER_CMD_VDEV_STOP_BSS:
-		cmd->cmd_timeout_duration = SME_START_STOP_BSS_CMD_TIMEOUT;
+		cmd->cmd_timeout_duration = SME_CMD_STOP_BSS_CMD_TIMEOUT;
 		break;
 	case WLAN_SER_CMD_FORCE_DISASSOC_STA:
 	case WLAN_SER_CMD_FORCE_DEAUTH_STA: