qcacld-3.0: Change local variables to dynamic in lim_process_auth_frame

Propagation from qcacld-2.0 to qcacld-3.0.

Change local variables to dynamic in lim_process_auth_frame as stack frame
over 1024 bytes may cause build failure in 32 bit platforms.

Change-Id: I83cf5ab24693e0ce012894d808ac79bf37fa9a08
CRs-Fixed: 2147286
This commit is contained in:
Naveen Rawat 2017-11-15 09:58:31 -08:00 • committed by snandini
commit def4e79bc3

View file

@ -1060,7 +1060,7 @@ lim_process_auth_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
{
uint8_t *body_ptr, key_id, cfg_privacy_opt_imp;
uint8_t defaultkey[SIR_MAC_KEY_LENGTH];
uint8_t plainbody[LIM_ENCR_AUTH_BODY_LEN];
uint8_t *plainbody = NULL;
uint8_t decrypt_result;
uint16_t frame_len, curr_seq_num = 0;
uint32_t val, key_length = 8;
@ -1127,6 +1127,13 @@ lim_process_auth_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
goto free;
}
plainbody = qdf_mem_malloc(LIM_ENCR_AUTH_BODY_LEN);
if (!plainbody) {
pe_err("failed to allocate memory for plainbody");
goto free;
}
qdf_mem_zero(plainbody, LIM_ENCR_AUTH_BODY_LEN);
/*
* Determine if WEP bit is set in the FC or received MAC header
* Note: WEP bit is set in FC of MAC header.
@ -1403,6 +1410,8 @@ free:
qdf_mem_free(auth_frame);
if (rx_auth_frame)
qdf_mem_free(rx_auth_frame);
if (plainbody)
qdf_mem_free(plainbody);
}
/*----------------------------------------------------------------------