|
@@ -1,5 +1,6 @@
|
|
|
/*
|
|
|
* Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
|
|
|
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
|
|
*
|
|
|
* Permission to use, copy, modify, and/or distribute this software for
|
|
|
* any purpose with or without fee is hereby granted, provided that the
|
|
@@ -432,7 +433,7 @@ static void lim_process_sae_auth_frame(struct mac_context *mac_ctx,
|
|
|
pe_session->limMlmState);
|
|
|
|
|
|
if (LIM_IS_AP_ROLE(pe_session)) {
|
|
|
- struct tLimPreAuthNode *sta_pre_auth_ctx;
|
|
|
+ struct tLimPreAuthNode *pre_auth_node;
|
|
|
|
|
|
rx_flags = RXMGMT_FLAG_EXTERNAL_AUTH;
|
|
|
/* Add preauth node when the first SAE authentication frame
|
|
@@ -442,12 +443,16 @@ static void lim_process_sae_auth_frame(struct mac_context *mac_ctx,
|
|
|
* SAE protocol optimizations.
|
|
|
*/
|
|
|
/* Extract pre-auth context for the STA, if any. */
|
|
|
- sta_pre_auth_ctx = lim_search_pre_auth_list(mac_ctx,
|
|
|
- mac_hdr->sa);
|
|
|
- if (!sta_pre_auth_ctx ||
|
|
|
- (sta_pre_auth_ctx->mlmState != eLIM_MLM_WT_SAE_AUTH_STATE &&
|
|
|
- sta_pre_auth_ctx->mlmState !=
|
|
|
- eLIM_MLM_AUTHENTICATED_STATE)) {
|
|
|
+ pre_auth_node = lim_search_pre_auth_list(mac_ctx, mac_hdr->sa);
|
|
|
+ if (!pre_auth_node ||
|
|
|
+ (pre_auth_node->mlmState != eLIM_MLM_WT_SAE_AUTH_STATE)) {
|
|
|
+ if (pre_auth_node) {
|
|
|
+ pe_debug("Delete existing preauth node for SAE peer in state: %u "
|
|
|
+ QDF_MAC_ADDR_FMT,
|
|
|
+ pre_auth_node->mlmState,
|
|
|
+ QDF_MAC_ADDR_REF(mac_hdr->sa));
|
|
|
+ lim_delete_pre_auth_node(mac_ctx, mac_hdr->sa);
|
|
|
+ }
|
|
|
lim_external_auth_add_pre_auth_node(mac_ctx, mac_hdr,
|
|
|
eLIM_MLM_WT_SAE_AUTH_STATE);
|
|
|
}
|