Browse Source

qcacld-3.0: Refactor TIMEOUT cfgs

Refactor following cfg items
CFG_AUTH_FAILURE_TIMEOUT
CFG_AUTH_RSP_TIMEOUT
CFG_ASSOC_FAILURE_TIMEOUT
CFG_REASSOC_FAILURE_TIMEOUT
CFG_PROBE_AFTER_HB_FAIL_TIMEOUT
CFG_OLBC_DETECT_TIMEOUT
CFG_ADDTS_RSP_TIMEOUT
CFG_HEART_BEAT_THRESHOLD
CFG_AP_KEEP_ALIVE_TIMEOUT
CFG_AP_LINK_MONITOR_TIMEOUT
CFG_PS_DATA_INACTIVITY_TIMEOUT

Change-Id: I616b1671809c377d6ea738c899b31ec0d8f5adfc
CRs-Fixed: 2313427
Arif Hussain 6 years ago
parent
commit
8e0a384a0d

+ 24 - 2
mlme/core/src/wlan_mlme_main.c

@@ -321,8 +321,30 @@ static void mlme_init_edca_params(struct wlan_mlme_edca_params *edca_params)
 static void mlme_init_timeout_cfg(struct wlan_objmgr_psoc *psoc,
 				  struct wlan_mlme_timeout *timeouts)
 {
-	timeouts->join_failure_timeout = cfg_get(psoc,
-						 CFG_JOIN_FAILURE_TIMEOUT);
+	timeouts->join_failure_timeout =
+			cfg_get(psoc, CFG_JOIN_FAILURE_TIMEOUT);
+	timeouts->auth_failure_timeout =
+			cfg_get(psoc, CFG_AUTH_FAILURE_TIMEOUT);
+	timeouts->auth_rsp_timeout =
+			cfg_get(psoc, CFG_AUTH_RSP_TIMEOUT);
+	timeouts->assoc_failure_timeout =
+			cfg_get(psoc, CFG_ASSOC_FAILURE_TIMEOUT);
+	timeouts->reassoc_failure_timeout =
+			cfg_get(psoc, CFG_REASSOC_FAILURE_TIMEOUT);
+	timeouts->probe_after_hb_fail_timeout =
+			cfg_get(psoc, CFG_PROBE_AFTER_HB_FAIL_TIMEOUT);
+	timeouts->olbc_detect_timeout =
+			cfg_get(psoc, CFG_OLBC_DETECT_TIMEOUT);
+	timeouts->addts_rsp_timeout =
+			cfg_get(psoc, CFG_ADDTS_RSP_TIMEOUT);
+	timeouts->heart_beat_threshold =
+			cfg_get(psoc, CFG_HEART_BEAT_THRESHOLD);
+	timeouts->ap_keep_alive_timeout =
+			cfg_get(psoc, CFG_AP_KEEP_ALIVE_TIMEOUT);
+	timeouts->ap_link_monitor_timeout =
+			cfg_get(psoc, CFG_AP_LINK_MONITOR_TIMEOUT);
+	timeouts->ps_data_inactivity_timeout =
+			cfg_get(psoc, CFG_PS_DATA_INACTIVITY_TIMEOUT);
 }
 
 static void mlme_init_ht_cap_in_cfg(struct wlan_objmgr_psoc *psoc,

+ 253 - 1
mlme/dispatcher/inc/cfg_mlme_timeout.h

@@ -44,7 +44,259 @@
 		CFG_VALUE_OR_DEFAULT, \
 		"Join failure timeout")
 
+/*
+ * <ini>
+ * auth_failure_timeout - Auth failure timeout value
+ * @Min: 0
+ * @Max: 65535
+ * @Default: 1000
+ *
+ * This cfg is used to configure the auth failure timeout.
+ *
+ * Usage: Internal
+ *
+ * </ini>
+ */
+#define CFG_AUTH_FAILURE_TIMEOUT CFG_INI_UINT( \
+		"auth_failure_timeout", \
+		0, \
+		65535, \
+		1000, \
+		CFG_VALUE_OR_DEFAULT, \
+		"auth failure timeout")
+
+/*
+ * <ini>
+ * auth_rsp_timeout - Auth response timeout value
+ * @Min: 0
+ * @Max: 65535
+ * @Default: 1000
+ *
+ * This cfg is used to configure the auth response timeout.
+ *
+ * Usage: Internal
+ *
+ * </ini>
+ */
+#define CFG_AUTH_RSP_TIMEOUT CFG_INI_UINT( \
+		"auth_rsp_timeout", \
+		0, \
+		65535, \
+		1000, \
+		CFG_VALUE_OR_DEFAULT, \
+		"auth rsp timeout")
+
+/*
+ * <ini>
+ * assoc_failure_timeout - Assoc failure timeout value
+ * @Min: 0
+ * @Max: 65535
+ * @Default: 2000
+ *
+ * This cfg is used to configure the assoc failure timeout.
+ *
+ * Usage: Internal
+ *
+ * </ini>
+ */
+#define CFG_ASSOC_FAILURE_TIMEOUT CFG_INI_UINT( \
+		"assoc_failure_timeout", \
+		0, \
+		65535, \
+		2000, \
+		CFG_VALUE_OR_DEFAULT, \
+		"assoc failure timeout")
+
+/*
+ * <ini>
+ * reassoc_failure_timeout - Re-Assoc failure timeout value
+ * @Min: 0
+ * @Max: 65535
+ * @Default: 1000
+ *
+ * This cfg is used to configure the re-assoc failure timeout.
+ *
+ * Usage: Internal
+ *
+ * </ini>
+ */
+#define CFG_REASSOC_FAILURE_TIMEOUT CFG_INI_UINT( \
+		"reassoc_failure_timeout", \
+		0, \
+		65535, \
+		1000, \
+		CFG_VALUE_OR_DEFAULT, \
+		"reassoc failure timeout")
+
+/*
+ * <ini>
+ * probe_after_hb_fail_timeout - Probe after HB failure timeout value
+ * @Min: 10
+ * @Max: 10000
+ * @Default: 70
+ *
+ * This cfg is used to configure the Probe after HB failure timeout.
+ *
+ * Usage: Internal
+ *
+ * </ini>
+ */
+#define CFG_PROBE_AFTER_HB_FAIL_TIMEOUT CFG_INI_UINT( \
+		"probe_after_hb_fail_timeout", \
+		10, \
+		10000, \
+		70, \
+		CFG_VALUE_OR_DEFAULT, \
+		"probe after HB fail timeout")
+
+/*
+ * <ini>
+ * olbc_detect_timeout - olbc detect timeout value
+ * @Min: 1000
+ * @Max: 30000
+ * @Default: 10000
+ *
+ * This cfg is used to configure the olbc detect timeout.
+ *
+ * Usage: Internal
+ *
+ * </ini>
+ */
+#define CFG_OLBC_DETECT_TIMEOUT CFG_INI_UINT( \
+		"olbc_detect_timeout", \
+		1000, \
+		30000, \
+		10000, \
+		CFG_VALUE_OR_DEFAULT, \
+		"OLBC detect timeout")
+
+/*
+ * <ini>
+ * addts_rsp_timeout - addts response timeout value
+ * @Min: 0
+ * @Max: 65535
+ * @Default: 1000
+ *
+ * This cfg is used to configure the addts response timeout.
+ *
+ * Usage: Internal
+ *
+ * </ini>
+ */
+#define CFG_ADDTS_RSP_TIMEOUT CFG_INI_UINT( \
+		"addts_rsp_timeout", \
+		0, \
+		65535, \
+		1000, \
+		CFG_VALUE_OR_DEFAULT, \
+		"ADDTS RSP timeout")
+
+/*
+ * <ini>
+ * gHeartbeat24 - Heart beat threashold value
+ * @Min: 0
+ * @Max: 65535
+ * @Default: 40
+ *
+ * This cfg is used to configure the Heart beat threashold.
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_HEART_BEAT_THRESHOLD CFG_INI_UINT( \
+		"gHeartbeat24", \
+		0, \
+		65535, \
+		40, \
+		CFG_VALUE_OR_DEFAULT, \
+		"Heart beat threashold")
+
+/*
+ * <ini>
+ * gApKeepAlivePeriod - AP keep alive period
+ * @Min: 1
+ * @Max: 65535
+ * @Default: 20
+ *
+ * This ini is used to set keep alive period of AP
+ *
+ * Related: None.
+ *
+ * Supported Feature: SAP
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_AP_KEEP_ALIVE_TIMEOUT CFG_INI_UINT( \
+		"gApKeepAlivePeriod", \
+		1, \
+		65535, \
+		20, \
+		CFG_VALUE_OR_DEFAULT, \
+		"AP keep alive timeout")
+
+/*
+ * <ini>
+ * gApLinkMonitorPeriod - AP keep alive period
+ * @Min: 3
+ * @Max: 50
+ * @Default: 10
+ *
+ * This ini is used to configure AP link monitor timeout value
+ *
+ * Related: None.
+ *
+ * Supported Feature: SAP
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_AP_LINK_MONITOR_TIMEOUT CFG_INI_UINT( \
+		"gApLinkMonitorPeriod", \
+		3, \
+		50, \
+		10, \
+		CFG_VALUE_OR_DEFAULT, \
+		"AP link monitor timeout")
+
+/*
+ * <ini>
+ * gDataInactivityTimeout - Data activity timeout for non wow mode.
+ * @Min: 1
+ * @Max: 255
+ * @Default: 200
+ *
+ * This ini is used to set data inactivity timeout in non wow mode.
+ *
+ * Supported Feature: inactivity timeout in non wow mode
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_PS_DATA_INACTIVITY_TIMEOUT CFG_INI_UINT( \
+		"gDataInactivityTimeout", \
+		1, \
+		255, \
+		200, \
+		CFG_VALUE_OR_DEFAULT, \
+		"PS data inactivity timeout")
+
 #define CFG_TIMEOUT_ALL \
-	CFG(CFG_JOIN_FAILURE_TIMEOUT)
+	CFG(CFG_JOIN_FAILURE_TIMEOUT) \
+	CFG(CFG_AUTH_FAILURE_TIMEOUT) \
+	CFG(CFG_AUTH_RSP_TIMEOUT) \
+	CFG(CFG_ASSOC_FAILURE_TIMEOUT) \
+	CFG(CFG_REASSOC_FAILURE_TIMEOUT) \
+	CFG(CFG_PROBE_AFTER_HB_FAIL_TIMEOUT) \
+	CFG(CFG_OLBC_DETECT_TIMEOUT) \
+	CFG(CFG_ADDTS_RSP_TIMEOUT) \
+	CFG(CFG_HEART_BEAT_THRESHOLD) \
+	CFG(CFG_AP_KEEP_ALIVE_TIMEOUT) \
+	CFG(CFG_AP_LINK_MONITOR_TIMEOUT) \
+	CFG(CFG_PS_DATA_INACTIVITY_TIMEOUT)
 
 #endif /* __CFG_MLME_TIMEOUT_H */

+ 22 - 0
mlme/dispatcher/inc/wlan_mlme_public_struct.h

@@ -842,9 +842,31 @@ struct wlan_mlme_threshold {
 /*
  * struct wlan_mlme_timeout - mlme timeout related config items
  * @join_failure_timeout: join failure timeout
+ * @auth_failure_timeout: authenticate failure timeout
+ * @auth_rsp_timeout: authenticate response timeout
+ * @assoc_failure_timeout: assoc failure timeout
+ * @reassoc_failure_timeout: re-assoc failure timeout
+ * @probe_after_hb_fail_timeout: Probe after HB fail timeout
+ * @olbc_detect_timeout: OLBC detect timeout
+ * @addts_rsp_timeout: ADDTS rsp timeout value
+ * @heart_beat_threshold: Heart beat threshold
+ * @ap_keep_alive_timeout: AP keep alive timeout value
+ * @ap_link_monitor_timeout: AP link monitor timeout value
+ * @ps_data_inactivity_timeout: PS data inactivity timeout
  */
 struct wlan_mlme_timeout {
 	uint32_t join_failure_timeout;
+	uint32_t auth_failure_timeout;
+	uint32_t auth_rsp_timeout;
+	uint32_t assoc_failure_timeout;
+	uint32_t reassoc_failure_timeout;
+	uint32_t probe_after_hb_fail_timeout;
+	uint32_t olbc_detect_timeout;
+	uint32_t addts_rsp_timeout;
+	uint32_t heart_beat_threshold;
+	uint32_t ap_keep_alive_timeout;
+	uint32_t ap_link_monitor_timeout;
+	uint32_t ps_data_inactivity_timeout;
 };
 
 /**