diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c index 723c7a54a918..066adc52400f 100644 --- a/components/mlme/core/src/wlan_mlme_main.c +++ b/components/mlme/core/src/wlan_mlme_main.c @@ -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, diff --git a/components/mlme/dispatcher/inc/cfg_mlme_timeout.h b/components/mlme/dispatcher/inc/cfg_mlme_timeout.h index cab06f33f3bc..91d39a391873 100644 --- a/components/mlme/dispatcher/inc/cfg_mlme_timeout.h +++ b/components/mlme/dispatcher/inc/cfg_mlme_timeout.h @@ -312,6 +312,27 @@ CFG_VALUE_OR_DEFAULT, \ "timeout period for wmi watchdog bite") +/* + * + * 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 + * + * + */ +#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 */ diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h index 71cb7266aa7d..f96673fd7b42 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h @@ -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; }; /** diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c index 05a79e447834..5ad4e594ae6f 100644 --- a/core/mac/src/pe/lim/lim_send_management_frames.c +++ b/core/mac/src/pe/lim/lim_send_management_frames.c @@ -5677,8 +5677,6 @@ error_delba: 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) !=