diff options
| author | Varun Reddy Yeturu <varunreddy.yeturu@codeaurora.org> | 2017-11-30 15:31:35 -0800 |
|---|---|---|
| committer | snandini <snandini@codeaurora.org> | 2017-11-30 20:36:51 -0800 |
| commit | 9e41cd3de5d915358da337821bf2cc387eb8eb0f (patch) | |
| tree | dbec0b68dfd5863cc49343fa98c682ce2d5765d3 | |
| parent | ff9df6d17b8ac75fa7079488c9f28cbac780857d (diff) | |
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
| -rw-r--r-- | core/mac/inc/sir_api.h | 1 | ||||
| -rw-r--r-- | core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c | 15 |
2 files changed, 14 insertions, 2 deletions
diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index 3072ee0ff560..55f5d96cda10 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -344,6 +344,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; 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 e6e5f482facf..32b666d73b79 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 @@ -2716,8 +2716,9 @@ void lim_process_mlm_set_sta_key_rsp(tpAniSirGlobal mac_ctx, tpSirMsgQ 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; @@ -2729,11 +2730,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) { @@ -2794,9 +2800,10 @@ void lim_process_mlm_set_sta_key_rsp(tpAniSirGlobal mac_ctx, void lim_process_mlm_set_bss_key_rsp(tpAniSirGlobal mac_ctx, tpSirMsgQ 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; @@ -2808,12 +2815,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) { |
