Browse Source

qcacld-3.0: Fix the regression in join failure processing

Set the correct link state in join failure processing so that
WMA processes the request and sends the vdev stop when the join
failure happens.

Change-Id: I4e5ddcbd7e7b2b0141904410adb66f228dab0046
CRs-Fixed: 1020982
Kiran Kumar Lokere 9 years ago
parent
commit
92b1fcaab9

+ 1 - 0
core/mac/src/include/sir_params.h

@@ -109,6 +109,7 @@ typedef enum eSriLinkState {
 	eSIR_LINK_POSTASSOC_STATE = 2,
 	eSIR_LINK_AP_STATE = 3,
 	eSIR_LINK_IBSS_STATE = 4,
+	eSIR_LINK_DOWN_STATE = 5,
 } tSirLinkState;
 
 /* / Message queue structure used across Sirius project. */

+ 0 - 5
core/mac/src/pe/lim/lim_process_mlm_req_messages.c

@@ -2394,11 +2394,6 @@ static void lim_process_join_failure_timeout(tpAniSirGlobal mac_ctx)
 		session->limMlmState = eLIM_MLM_IDLE_STATE;
 		MTRACE(mac_trace(mac_ctx, TRACE_CODE_MLM_STATE,
 				 session->peSessionId, session->limMlmState));
-		if (lim_set_link_state(mac_ctx, eSIR_LINK_IDLE_STATE,
-				       session->bssId, session->selfMacAddr,
-				       NULL, NULL) != eSIR_SUCCESS)
-			lim_log(mac_ctx, LOGE,
-				("Failed to set the LinkState"));
 		/* Update PE session Id */
 		mlm_join_cnf.sessionId = session->peSessionId;
 		/* Freeup buffer allocated to join request */

+ 1 - 1
core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c

@@ -1436,7 +1436,7 @@ error:
 	/* Delete teh session if JOIN failure occurred. */
 	if (result_code != eSIR_SME_SUCCESS) {
 		if (lim_set_link_state
-			(mac_ctx, eSIR_LINK_IDLE_STATE,
+			(mac_ctx, eSIR_LINK_DOWN_STATE,
 			session_entry->bssId,
 			session_entry->selfMacAddr, NULL,
 			NULL) != eSIR_SUCCESS)

+ 2 - 1
core/wma/src/wma_data.c

@@ -1165,7 +1165,8 @@ void wma_set_linkstate(tp_wma_handle wma, tpLinkStateParams params)
 	params->status = true;
 	WMA_LOGD("%s: state %d selfmac %pM", __func__,
 		 params->state, params->selfMacAddr);
-	if (params->state != eSIR_LINK_PREASSOC_STATE) {
+	if ((params->state != eSIR_LINK_PREASSOC_STATE) &&
+	    (params->state != eSIR_LINK_DOWN_STATE)) {
 		WMA_LOGD("%s: unsupported link state %d",
 			 __func__, params->state);
 		goto out;