From 9cee77f3ec27920e4f5471467cfcdfe18e24290a Mon Sep 17 00:00:00 2001 From: "Selvaraj, Sridhar" Date: Wed, 22 Jun 2016 21:47:52 +0530 Subject: [PATCH] qcacld-3.0: Trigger Auth req(OPEN) when SHARED times out qcacld-2.0 to qcacld-3.0 propagation When the OPEN/SHARED WEP is configured, the current implementation will start Auth request with SHARED and if it fails, triggers Auth request with OPEN. This change will trigger the OPEN Auth requests when the timeout happens (no Auth response received for previous attempt i.e.AUTH req SHARED case). Some APs don't respond to Shared Auth if they support only Open. To interoperate with this kind of APs try Open Auth if Auth timeout happens with Shared Auth. Git-commit: 368b3a4eb4b4067bfff88d3dbd21371af3bb23a8 Change-Id: I28b9186b9dc238640fd7655c9ac73e8aa89aec54 CRs-Fixed: 984341 --- core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c index 6f61dce88657..9082aecadb68 100644 --- a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c +++ b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c @@ -531,7 +531,7 @@ void lim_process_mlm_auth_cnf(tpAniSirGlobal mac_ctx, uint32_t *msg) return; } - if (((tLimMlmAuthCnf *) msg)->resultCode == eSIR_SME_SUCCESS) { + if (auth_cnf->resultCode == eSIR_SME_SUCCESS) { if (session_entry->limSmeState == eLIM_SME_WT_AUTH_STATE) { lim_send_mlm_assoc_req(mac_ctx, session_entry); } else { @@ -568,9 +568,10 @@ void lim_process_mlm_auth_cnf(tpAniSirGlobal mac_ctx, uint32_t *msg) } if ((auth_type == eSIR_AUTO_SWITCH) && - (((tLimMlmAuthCnf *) msg)->authType == eSIR_SHARED_KEY) - && (eSIR_MAC_AUTH_ALGO_NOT_SUPPORTED_STATUS == - ((tLimMlmAuthCnf *) msg)->protStatusCode)) { + (auth_cnf->authType == eSIR_SHARED_KEY) && + ((eSIR_MAC_AUTH_ALGO_NOT_SUPPORTED_STATUS == + auth_cnf->protStatusCode) || + (auth_cnf->resultCode == eSIR_SME_AUTH_TIMEOUT_RESULT_CODE))) { /* * When shared authentication fails with reason * code "13" and authType set to 'auto switch', @@ -634,8 +635,8 @@ void lim_process_mlm_auth_cnf(tpAniSirGlobal mac_ctx, uint32_t *msg) * auth failure to Host. */ lim_handle_sme_join_result(mac_ctx, - ((tLimMlmAuthCnf *)msg)->resultCode, - ((tLimMlmAuthCnf *)msg)->protStatusCode, + auth_cnf->resultCode, + auth_cnf->protStatusCode, session_entry); } else { /*