qcacld-3.0: Deactivate timers before loop in pe_shutdown_notifier_cb

In pe_shutdown_notifier_cb, lim timers are deactivated
inside the loop. Fix is to invoke lim_deactivate_timers
before the for loop. Move Open system auth api to
lim_process_auth_frame.c

Change-Id: I0f3cc58b5e73d73ae1a2a28ea0ce042e6c926207
CRs-Fixed: 2094532
This commit is contained in:
yeshwanth sriram guntuka 2017-08-17 19:52:11 +05:30 • committed by Anjaneedevi Kapparapu
commit fde0d52e5c
3 changed files with 39 additions and 38 deletions

View file

@ -754,6 +754,7 @@ static void pe_shutdown_notifier_cb(void *ctx)
tpPESession session;
uint8_t i;
lim_deactivate_timers(mac_ctx);
for (i = 0; i < mac_ctx->lim.maxBssId; i++) {
session = &mac_ctx->lim.gpSession[i];
if (session->valid == true) {
@ -763,7 +764,6 @@ static void pe_shutdown_notifier_cb(void *ctx)
#ifdef WLAN_FEATURE_11W
qdf_mc_timer_stop(&session->pmfComebackTimer);
#endif
lim_deactivate_timers(mac_ctx);
}
}
}

View file

@ -50,6 +50,7 @@
#include "lim_ser_des_utils.h"
#include "lim_ft.h"
#include "cds_utils.h"
#include "lim_send_messages.h"
/**
* is_auth_valid
@ -1009,6 +1010,43 @@ 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

View file

@ -515,43 +515,6 @@ void lim_print_msg_name(tpAniSirGlobal pMac, uint16_t logLevel, uint32_t msgType
pe_debug("Msg: %s", lim_msg_str(msgType));
}
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_init_mlm() - This function is called by limProcessSmeMessages() to
* initialize MLM state machine on STA