Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d13a81e authored by Surya Prakash Sivaraj's avatar Surya Prakash Sivaraj Committed by Madan Koyyalamudi
Browse files

qcacld-3.0: Add an INI to configure SAE auth failure timeout

Currently, the SAE authentication request retry happens
after a fixed timeout of 1 second in a STA DUT.

To make this timeout user configurable, add an INI to
configure SAE auth failure timeout.

Change-Id: I3a3944ab14564a944e0c83cc31a92847b5e8c5e0
CRs-Fixed: 3011892
parent ece9151f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -680,6 +680,8 @@ static void mlme_init_timeout_cfg(struct wlan_objmgr_psoc *psoc,
			cfg_get(psoc, CFG_PS_DATA_INACTIVITY_TIMEOUT);
	timeouts->wmi_wq_watchdog_timeout =
			cfg_get(psoc, CFG_WMI_WQ_WATCHDOG);
	timeouts->sae_auth_failure_timeout =
			cfg_get(psoc, CFG_SAE_AUTH_FAILURE_TIMEOUT);
}

static void mlme_init_ht_cap_in_cfg(struct wlan_objmgr_psoc *psoc,
+23 −1
Original line number Diff line number Diff line
@@ -312,6 +312,27 @@
		CFG_VALUE_OR_DEFAULT, \
		"timeout period for wmi watchdog bite")

/*
 * <ini>
 * sae_auth_failure_timeout - SAE Auth failure timeout value in msec
 * @Min: 500
 * @Max: 1000
 * @Default: 1000
 *
 * This cfg is used to configure the SAE auth failure timeout.
 *
 * Usage: External
 *
 * </ini>
 */
#define CFG_SAE_AUTH_FAILURE_TIMEOUT CFG_INI_UINT( \
		"sae_auth_failure_timeout", \
		500, \
		1000, \
		1000, \
		CFG_VALUE_OR_DEFAULT, \
		"SAE auth failure timeout")

#define CFG_TIMEOUT_ALL \
	CFG(CFG_JOIN_FAILURE_TIMEOUT) \
	CFG(CFG_AUTH_FAILURE_TIMEOUT) \
@@ -325,6 +346,7 @@
	CFG(CFG_AP_KEEP_ALIVE_TIMEOUT) \
	CFG(CFG_AP_LINK_MONITOR_TIMEOUT) \
	CFG(CFG_WMI_WQ_WATCHDOG) \
	CFG(CFG_PS_DATA_INACTIVITY_TIMEOUT)
	CFG(CFG_PS_DATA_INACTIVITY_TIMEOUT)\
	CFG(CFG_SAE_AUTH_FAILURE_TIMEOUT)

#endif /* __CFG_MLME_TIMEOUT_H */
+2 −0
Original line number Diff line number Diff line
@@ -2131,6 +2131,7 @@ struct wlan_mlme_power {
 * @ap_link_monitor_timeout: AP link monitor timeout value
 * @ps_data_inactivity_timeout: PS data inactivity timeout
 * @wmi_wq_watchdog_timeout: timeout period for wmi watchdog bite
 * @sae_auth_failure_timeout: SAE authentication failure timeout
 */
struct wlan_mlme_timeout {
	uint32_t join_failure_timeout;
@@ -2146,6 +2147,7 @@ struct wlan_mlme_timeout {
	uint32_t ap_link_monitor_timeout;
	uint32_t ps_data_inactivity_timeout;
	uint32_t wmi_wq_watchdog_timeout;
	uint32_t sae_auth_failure_timeout;
};

/**
+5 −4
Original line number Diff line number Diff line
@@ -5677,8 +5677,6 @@ QDF_STATUS lim_send_delba_action_frame(struct mac_context *mac_ctx,
	return qdf_status;
}

#define WLAN_SAE_AUTH_TIMEOUT 1000

/**
 * lim_tx_mgmt_frame() - Transmits Auth mgmt frame
 * @mac_ctx Pointer to Global MAC structure
@@ -5738,6 +5736,7 @@ lim_handle_sae_auth_retry(struct mac_context *mac_ctx, uint8_t vdev_id,
	struct pe_session *session;
	struct sae_auth_retry *sae_retry;
	uint8_t retry_count = 0;
	uint32_t val = 0;

	session = pe_find_session_by_vdev_id(mac_ctx, vdev_id);
	if (!session) {
@@ -5774,16 +5773,18 @@ lim_handle_sae_auth_retry(struct mac_context *mac_ctx, uint8_t vdev_id,
		return;

	pe_debug("SAE auth frame queued vdev_id %d seq_num %d",
		 vdev_id, mac_ctx->mgmtSeqNum);
		 vdev_id, mac_ctx->mgmtSeqNum + 1);
	qdf_mem_copy(sae_retry->sae_auth.data, frame, frame_len);
	mac_ctx->lim.lim_timers.g_lim_periodic_auth_retry_timer.sessionId =
					session->peSessionId;
	sae_retry->sae_auth.len = frame_len;
	sae_retry->sae_auth_max_retry = retry_count;

	val = mac_ctx->mlme_cfg->timeouts.sae_auth_failure_timeout;

	tx_timer_change(
		&mac_ctx->lim.lim_timers.g_lim_periodic_auth_retry_timer,
		SYS_MS_TO_TICKS(WLAN_SAE_AUTH_TIMEOUT), 0);
		SYS_MS_TO_TICKS(val), 0);
	/* Activate Auth Retry timer */
	if (tx_timer_activate(
	    &mac_ctx->lim.lim_timers.g_lim_periodic_auth_retry_timer) !=