qcacld-3.0: Do not attempt to delete peer when it is not created

In preassoc state, if the set link state has failed to create the
peer, then send back a failure status to the upper layers and
ensure that the set link state for failure is not called again
because this will eventually call vdev stop and lead to a vdev
stop response and then lead to a peer delete attempt which is
really not needed since the peer has not been created at all.

Change-Id: I265726000204bab51c429a2d00cdd599d8064170
CRs-Fixed: 2286684
This commit is contained in:
Varun Reddy Yeturu 2018-08-07 14:45:31 -07:00 • committed by nshrivas
commit a47f08f3dc
3 changed files with 10 additions and 3 deletions

View file

@ -278,6 +278,7 @@ typedef enum eSirResultCodes {
eSIR_SME_DEAUTH_STATUS,
eSIR_PNO_SCAN_SUCCESS,
eSIR_SME_INVALID_SESSION,
eSIR_SME_PEER_CREATE_FAILED,
eSIR_DONOT_USE_RESULT_CODE = SIR_MAX_ENUM_SIZE
} tSirResultCodes;

View file

@ -774,7 +774,7 @@ failure:
MTRACE(mac_trace(mac, TRACE_CODE_MLM_STATE, session_entry->peSessionId,
session_entry->limMlmState));
session_entry->limMlmState = eLIM_MLM_IDLE_STATE;
mlm_join_cnf.resultCode = eSIR_SME_RESOURCES_UNAVAILABLE;
mlm_join_cnf.resultCode = eSIR_SME_PEER_CREATE_FAILED;
mlm_join_cnf.sessionId = session_entry->peSessionId;
mlm_join_cnf.protStatusCode = eSIR_MAC_UNSPEC_FAILURE_STATUS;
lim_post_sme_message(mac, LIM_MLM_JOIN_CNF, (uint32_t *) &mlm_join_cnf);

View file

@ -1367,8 +1367,14 @@ void lim_handle_sme_join_result(tpAniSirGlobal mac_ctx,
session_entry->pLimJoinReq = NULL;
}
error:
/* Delete the session if JOIN failure occurred. */
if (result_code != eSIR_SME_SUCCESS) {
/* Delete the session if JOIN failure occurred.
* if the peer is not created, then there is no
* need to send down the set link state which will
* try to delete the peer. Instead a join response
* failure should be sent to the upper layers.
*/
if (result_code != eSIR_SME_SUCCESS &&
result_code != eSIR_SME_PEER_CREATE_FAILED) {
param = qdf_mem_malloc(sizeof(join_params));
if (param != NULL) {
param->result_code = result_code;