qcacld-3.0: Handle set key response failure
If roaming is happening and then a set key response is generated from WMA to PE, then there is a possibility of not finding the PE session as the roaming happened and new session is established. In such cases, return failure from PE to SME so that the set key command is released and the command queue is not stuck Change-Id: Ieba8ea76a2a53322f2e392e6b0bf30360b1e8f8a CRs-Fixed: 2150731
This commit is contained in:

committed by
snandini

parent
08b9f2903b
commit
371404beda
@@ -337,6 +337,7 @@ typedef enum eSirResultCodes {
|
||||
eSIR_SME_SEND_ACTION_FAIL,
|
||||
eSIR_SME_DEAUTH_STATUS,
|
||||
eSIR_PNO_SCAN_SUCCESS,
|
||||
eSIR_SME_INVALID_SESSION,
|
||||
eSIR_DONOT_USE_RESULT_CODE = SIR_MAX_ENUM_SIZE
|
||||
} tSirResultCodes;
|
||||
|
||||
|
@@ -2724,8 +2724,9 @@ void lim_process_mlm_set_sta_key_rsp(tpAniSirGlobal mac_ctx,
|
||||
struct scheduler_msg *msg)
|
||||
{
|
||||
uint8_t resp_reqd = 1;
|
||||
tLimMlmSetKeysCnf mlm_set_key_cnf;
|
||||
struct sLimMlmSetKeysCnf mlm_set_key_cnf;
|
||||
uint8_t session_id = 0;
|
||||
uint8_t sme_session_id;
|
||||
tpPESession session_entry;
|
||||
uint16_t key_len;
|
||||
uint16_t result_status;
|
||||
@@ -2737,11 +2738,16 @@ void lim_process_mlm_set_sta_key_rsp(tpAniSirGlobal mac_ctx,
|
||||
return;
|
||||
}
|
||||
session_id = ((tpSetStaKeyParams) msg->bodyptr)->sessionId;
|
||||
sme_session_id = ((tpSetBssKeyParams) msg->bodyptr)->smesessionId;
|
||||
session_entry = pe_find_session_by_session_id(mac_ctx, session_id);
|
||||
if (session_entry == NULL) {
|
||||
pe_err("session does not exist for given session_id");
|
||||
qdf_mem_free(msg->bodyptr);
|
||||
msg->bodyptr = NULL;
|
||||
lim_send_sme_set_context_rsp(mac_ctx,
|
||||
mlm_set_key_cnf.peer_macaddr,
|
||||
0, eSIR_SME_INVALID_SESSION, NULL,
|
||||
sme_session_id, 0);
|
||||
return;
|
||||
}
|
||||
if (eLIM_MLM_WT_SET_STA_KEY_STATE != session_entry->limMlmState) {
|
||||
@@ -2802,9 +2808,10 @@ void lim_process_mlm_set_sta_key_rsp(tpAniSirGlobal mac_ctx,
|
||||
void lim_process_mlm_set_bss_key_rsp(tpAniSirGlobal mac_ctx,
|
||||
struct scheduler_msg *msg)
|
||||
{
|
||||
tLimMlmSetKeysCnf set_key_cnf;
|
||||
struct sLimMlmSetKeysCnf set_key_cnf;
|
||||
uint16_t result_status;
|
||||
uint8_t session_id = 0;
|
||||
uint8_t sme_session_id;
|
||||
tpPESession session_entry;
|
||||
tpLimMlmSetKeysReq set_key_req;
|
||||
uint16_t key_len;
|
||||
@@ -2816,12 +2823,16 @@ void lim_process_mlm_set_bss_key_rsp(tpAniSirGlobal mac_ctx,
|
||||
return;
|
||||
}
|
||||
session_id = ((tpSetBssKeyParams) msg->bodyptr)->sessionId;
|
||||
sme_session_id = ((tpSetBssKeyParams) msg->bodyptr)->smesessionId;
|
||||
session_entry = pe_find_session_by_session_id(mac_ctx, session_id);
|
||||
if (session_entry == NULL) {
|
||||
pe_err("session does not exist for given sessionId [%d]",
|
||||
session_id);
|
||||
qdf_mem_free(msg->bodyptr);
|
||||
msg->bodyptr = NULL;
|
||||
lim_send_sme_set_context_rsp(mac_ctx, set_key_cnf.peer_macaddr,
|
||||
0, eSIR_SME_INVALID_SESSION, NULL,
|
||||
sme_session_id, 0);
|
||||
return;
|
||||
}
|
||||
if (eLIM_MLM_WT_SET_BSS_KEY_STATE == session_entry->limMlmState) {
|
||||
|
Reference in New Issue
Block a user