From 397ae4058fda2f3491b42329c859b638abcc0f02 Mon Sep 17 00:00:00 2001 From: Srinivas Dasari Date: Sat, 26 Jan 2019 13:46:28 +0530 Subject: [PATCH] qcacld-3.0: Do not create preauth node while sending SAE assoc reject Driver validates the authentication context and allows connection with SAE AKM in either of the below cases, 1. Successful SAE authentication 2. Open authentication with a valid PMKID Driver rejects association if none of these are met. Do not create preauth node while sending assoc reject in these cases as there is no need to maintain a preauth context. Stations initiate a fresh SAE authentication in both of these cases and a new node will be created. Change-Id: Ic446add47358d01bf4b316aa9ac5bf86c33bf812 CRs-Fixed: 2396379 --- core/mac/src/pe/lim/lim_process_sme_req_messages.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c index f9e1c40061da..ab81969d702e 100644 --- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c +++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c @@ -3112,6 +3112,7 @@ void __lim_process_sme_assoc_cnf_new(struct mac_context *mac_ctx, uint32_t msg_t session_entry); goto end; } else { + uint8_t add_pre_auth_context = true; /* * SME_ASSOC_CNF status is non-success, so STA is not allowed * to be associated since the HAL sta entry is created for @@ -3128,9 +3129,15 @@ void __lim_process_sme_assoc_cnf_new(struct mac_context *mac_ctx, uint32_t msg_t assoc_cnf.mac_status_code); if (assoc_cnf.mac_status_code) mac_status_code = assoc_cnf.mac_status_code; + if (assoc_cnf.mac_status_code == eSIR_MAC_INVALID_PMKID || + assoc_cnf.mac_status_code == + eSIR_MAC_AUTH_ALGO_NOT_SUPPORTED_STATUS) + add_pre_auth_context = false; + lim_reject_association(mac_ctx, sta_ds->staAddr, sta_ds->mlmStaContext.subType, - true, sta_ds->mlmStaContext.authType, + add_pre_auth_context, + sta_ds->mlmStaContext.authType, sta_ds->assocId, true, mac_status_code, session_entry);