diff --git a/core/mac/inc/ani_global.h b/core/mac/inc/ani_global.h index 8525c6e20b9f..e2274902cdd9 100644 --- a/core/mac/inc/ani_global.h +++ b/core/mac/inc/ani_global.h @@ -331,11 +331,6 @@ typedef struct sLimTimers { */ TX_TIMER gLimActiveToPassiveChannelTimer; TX_TIMER g_lim_periodic_auth_retry_timer; - /* - * This timer is used for delay between shared auth failure and - * open auth start - */ - TX_TIMER open_sys_auth_timer; /* ********************TIMER SECTION ENDS************************************************** */ /* ALL THE FIELDS BELOW THIS CAN BE ZEROED OUT in lim_initialize */ diff --git a/core/mac/src/pe/lim/lim_process_auth_frame.c b/core/mac/src/pe/lim/lim_process_auth_frame.c index 98e69f9c653d..0fdc1c119ea1 100644 --- a/core/mac/src/pe/lim/lim_process_auth_frame.c +++ b/core/mac/src/pe/lim/lim_process_auth_frame.c @@ -1018,43 +1018,6 @@ static void lim_process_auth_frame_type4(tpAniSirGlobal mac_ctx, } } -void lim_send_open_system_auth(void *ctx, uint32_t param) -{ - tLimMlmAuthReq *auth_req; - tpPESession session_entry; - tpAniSirGlobal mac_ctx = (tpAniSirGlobal)ctx; - uint8_t session_id; - - session_id = mac_ctx->lim.limTimers.open_sys_auth_timer.sessionId; - session_entry = pe_find_session_by_session_id(mac_ctx, session_id); - - if (!session_entry) - return; - /* Trigger MAC based Authentication */ - auth_req = qdf_mem_malloc(sizeof(tLimMlmAuthReq)); - if (!auth_req) { - pe_err("mlmAuthReq :Memory alloc failed"); - lim_handle_sme_join_result(mac_ctx, - eSIR_SME_AUTH_TIMEOUT_RESULT_CODE, - eSIR_MAC_AUTH_ALGO_NOT_SUPPORTED_STATUS, - session_entry); - tx_timer_deactivate(&mac_ctx->lim.limTimers. - open_sys_auth_timer); - return; - } - sir_copy_mac_addr(auth_req->peerMacAddr, session_entry->bssId); - auth_req->authType = eSIR_OPEN_SYSTEM; - /* Update PE session Id */ - auth_req->sessionId = session_id; - if (wlan_cfg_get_int(mac_ctx, WNI_CFG_AUTHENTICATE_FAILURE_TIMEOUT, - (uint32_t *) &auth_req->authFailureTimeout) != eSIR_SUCCESS) { - pe_err("Fail:retrieve AuthFailureTimeout"); - } - lim_post_mlm_message(mac_ctx, LIM_MLM_AUTH_REQ, (uint32_t *) auth_req); - tx_timer_deactivate(&mac_ctx->lim.limTimers.open_sys_auth_timer); - -} - /** * lim_process_auth_frame() - to process auth frame * @mac_ctx - Pointer to Global MAC structure 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 de3d40e17d9c..aaf4d55e81b2 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 @@ -474,7 +474,8 @@ void lim_pmf_comeback_timer_callback(void *context) */ void lim_process_mlm_auth_cnf(tpAniSirGlobal mac_ctx, uint32_t *msg) { - tAniAuthType auth_type; + tAniAuthType auth_type, auth_mode; + tLimMlmAuthReq *auth_req; tLimMlmAuthCnf *auth_cnf; tpPESession session_entry; @@ -544,18 +545,34 @@ void lim_process_mlm_auth_cnf(tpAniSirGlobal mac_ctx, uint32_t *msg) * When shared authentication fails with reason * code "13" and authType set to 'auto switch', * Try with open Authentication - * There is a possibility that AP does not receive - * ack and retries auth frame. The retry frame could be - * received at host after open sys auth is sent to firmware - * resulting in auth failure. So, to fix this issue, open system - * auth frame is sent to firmware after timer of 15msec expires. */ - mac_ctx->lim.limTimers.open_sys_auth_timer.sessionId = - auth_cnf->sessionId; - if (tx_timer_activate(&mac_ctx->lim.limTimers. - open_sys_auth_timer) != TX_SUCCESS) { - pe_err("failed to activate system Auth timer"); + auth_mode = eSIR_OPEN_SYSTEM; + /* Trigger MAC based Authentication */ + auth_req = qdf_mem_malloc(sizeof(tLimMlmAuthReq)); + if (NULL == auth_req) { + pe_err("mlmAuthReq :Memory alloc failed"); + return; } + if (session_entry->limSmeState == + eLIM_SME_WT_AUTH_STATE) { + sir_copy_mac_addr(auth_req->peerMacAddr, + session_entry->bssId); + } else { + qdf_mem_copy((uint8_t *)&auth_req->peerMacAddr, + (uint8_t *)&mac_ctx->lim.gLimPreAuthPeerAddr, + sizeof(tSirMacAddr)); + } + auth_req->authType = auth_mode; + /* Update PE session Id */ + auth_req->sessionId = auth_cnf->sessionId; + if (wlan_cfg_get_int(mac_ctx, + WNI_CFG_AUTHENTICATE_FAILURE_TIMEOUT, + (uint32_t *) &auth_req->authFailureTimeout) + != eSIR_SUCCESS) { + pe_err("Fail:retrieve AuthFailureTimeout"); + } + lim_post_mlm_message(mac_ctx, LIM_MLM_AUTH_REQ, + (uint32_t *) auth_req); return; } else { /* MAC based authentication failure */ diff --git a/core/mac/src/pe/lim/lim_timer_utils.c b/core/mac/src/pe/lim/lim_timer_utils.c index 9d75b9770962..39bf3e820576 100644 --- a/core/mac/src/pe/lim/lim_timer_utils.c +++ b/core/mac/src/pe/lim/lim_timer_utils.c @@ -133,13 +133,6 @@ static bool lim_create_non_ap_timers(tpAniSirGlobal pMac) return false; } - if (tx_timer_create(pMac, &pMac->lim.limTimers.open_sys_auth_timer, - "open system Auth timer", lim_send_open_system_auth, 0, - SYS_MS_TO_TICKS(15), 0, TX_NO_ACTIVATE) != TX_SUCCESS) { - pe_err("failed to create open system Auth timer"); - return false; - } - if (wlan_cfg_get_int(pMac, WNI_CFG_ASSOCIATION_FAILURE_TIMEOUT, &cfgValue) != eSIR_SUCCESS) pe_err("could not retrieve AssocFailureTimeout value"); @@ -386,7 +379,6 @@ err_timer: tx_timer_delete(&pMac->lim.limTimers.gLimProbeAfterHBTimer); tx_timer_delete(&pMac->lim.limTimers.gLimAuthFailureTimer); tx_timer_delete(&pMac->lim.limTimers.gLimAddtsRspTimer); - tx_timer_delete(&pMac->lim.limTimers.open_sys_auth_timer); tx_timer_delete(&pMac->lim.limTimers.gLimAssocFailureTimer); tx_timer_delete(&pMac->lim.limTimers.gLimJoinFailureTimer); tx_timer_delete(&pMac->lim.limTimers.gLimPeriodicJoinProbeReqTimer); diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index 0ca5c6371cba..b6af8deaa03a 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -612,9 +612,6 @@ void lim_deactivate_timers(tpAniSirGlobal mac_ctx) /* Deactivate Association failure timer. */ tx_timer_deactivate(&lim_timer->gLimAssocFailureTimer); - /* Deactivate Open system auth timer. */ - tx_timer_deactivate(&lim_timer->open_sys_auth_timer); - /* Deactivate Authentication failure timer. */ tx_timer_deactivate(&lim_timer->gLimAuthFailureTimer); @@ -700,9 +697,6 @@ void lim_cleanup_mlm(tpAniSirGlobal mac_ctx) /* Delete Association failure timer. */ tx_timer_delete(&lim_timer->gLimAssocFailureTimer); - /* Delete Open system auth timer. */ - tx_timer_delete(&lim_timer->open_sys_auth_timer); - /* Delete Authentication failure timer. */ tx_timer_delete(&lim_timer->gLimAuthFailureTimer); diff --git a/core/mac/src/pe/lim/lim_utils.h b/core/mac/src/pe/lim/lim_utils.h index b86044adb4f6..6114dc5af00e 100644 --- a/core/mac/src/pe/lim/lim_utils.h +++ b/core/mac/src/pe/lim/lim_utils.h @@ -104,18 +104,6 @@ void lim_print_sme_state(tpAniSirGlobal pMac, uint16_t logLevel, tLimSmeStates state); void lim_print_msg_name(tpAniSirGlobal pMac, uint16_t logLevel, uint32_t msgType); -/** - * lim_send_open_system_auth() - api to send open system auth frame - * @ctx: Pointer to global mac structure - * @session_id: session id - * - * This function is used to send open system auth when - * shared auth fails with reason-algo not supported - * - * Return: None - */ -void lim_send_open_system_auth(void *ctx, uint32_t param); - extern tSirRetStatus lim_send_set_max_tx_power_req(tpAniSirGlobal pMac, int8_t txPower, tpPESession pSessionEntry);