Kaynağa Gözat

Revert "qcacld-3.0: Add delay in sending open system auth frame"

This reverts Change-Id: I6bc7097ec7568fc65a379c7c31c96d5874f1e216

Change-Id: Ic63b451f507904b812b1874d9911f47f265aad23
CRs-Fixed: 2102402
Naveen Rawat 7 yıl önce
ebeveyn
işleme
7e7af3ca75

+ 0 - 5
core/mac/inc/ani_global.h

@@ -331,11 +331,6 @@ typedef struct sLimTimers {
 	 */
 	TX_TIMER gLimActiveToPassiveChannelTimer;
 	TX_TIMER g_lim_periodic_auth_retry_timer;
-	/*
-	 * This timer is used for delay between shared auth failure and
-	 * open auth start
-	 */
-	TX_TIMER open_sys_auth_timer;
 
 /* ********************TIMER SECTION ENDS************************************************** */
 /* ALL THE FIELDS BELOW THIS CAN BE ZEROED OUT in lim_initialize */

+ 0 - 37
core/mac/src/pe/lim/lim_process_auth_frame.c

@@ -1018,43 +1018,6 @@ static void lim_process_auth_frame_type4(tpAniSirGlobal mac_ctx,
 	}
 }
 
-void lim_send_open_system_auth(void *ctx, uint32_t param)
-{
-	tLimMlmAuthReq *auth_req;
-	tpPESession session_entry;
-	tpAniSirGlobal mac_ctx = (tpAniSirGlobal)ctx;
-	uint8_t session_id;
-
-	session_id = mac_ctx->lim.limTimers.open_sys_auth_timer.sessionId;
-	session_entry = pe_find_session_by_session_id(mac_ctx, session_id);
-
-	if (!session_entry)
-		return;
-	/* Trigger MAC based Authentication */
-	auth_req = qdf_mem_malloc(sizeof(tLimMlmAuthReq));
-	if (!auth_req) {
-		pe_err("mlmAuthReq :Memory alloc failed");
-		lim_handle_sme_join_result(mac_ctx,
-					eSIR_SME_AUTH_TIMEOUT_RESULT_CODE,
-					eSIR_MAC_AUTH_ALGO_NOT_SUPPORTED_STATUS,
-					session_entry);
-		tx_timer_deactivate(&mac_ctx->lim.limTimers.
-				    open_sys_auth_timer);
-		return;
-	}
-	sir_copy_mac_addr(auth_req->peerMacAddr, session_entry->bssId);
-	auth_req->authType = eSIR_OPEN_SYSTEM;
-	/* Update PE session Id */
-	auth_req->sessionId = session_id;
-	if (wlan_cfg_get_int(mac_ctx, WNI_CFG_AUTHENTICATE_FAILURE_TIMEOUT,
-	    (uint32_t *) &auth_req->authFailureTimeout) != eSIR_SUCCESS) {
-		pe_err("Fail:retrieve AuthFailureTimeout");
-	}
-	lim_post_mlm_message(mac_ctx, LIM_MLM_AUTH_REQ, (uint32_t *) auth_req);
-	tx_timer_deactivate(&mac_ctx->lim.limTimers.open_sys_auth_timer);
-
-}
-
 /**
  * lim_process_auth_frame() - to process auth frame
  * @mac_ctx - Pointer to Global MAC structure

+ 28 - 11
core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c

@@ -474,7 +474,8 @@ void lim_pmf_comeback_timer_callback(void *context)
  */
 void lim_process_mlm_auth_cnf(tpAniSirGlobal mac_ctx, uint32_t *msg)
 {
-	tAniAuthType auth_type;
+	tAniAuthType auth_type, auth_mode;
+	tLimMlmAuthReq *auth_req;
 	tLimMlmAuthCnf *auth_cnf;
 	tpPESession session_entry;
 
@@ -544,18 +545,34 @@ void lim_process_mlm_auth_cnf(tpAniSirGlobal mac_ctx, uint32_t *msg)
 		 * When shared authentication fails with reason
 		 * code "13" and authType set to 'auto switch',
 		 * Try with open Authentication
-		 * There is a possibility that AP does not receive
-		 * ack and retries auth frame. The retry frame could be
-		 * received at host after open sys auth is sent to firmware
-		 * resulting in auth failure. So, to fix this issue, open system
-		 * auth frame is sent to firmware after timer of 15msec expires.
 		 */
-		mac_ctx->lim.limTimers.open_sys_auth_timer.sessionId =
-							    auth_cnf->sessionId;
-		if (tx_timer_activate(&mac_ctx->lim.limTimers.
-				      open_sys_auth_timer) != TX_SUCCESS) {
-			pe_err("failed to activate system Auth timer");
+		auth_mode = eSIR_OPEN_SYSTEM;
+		/* Trigger MAC based Authentication */
+		auth_req = qdf_mem_malloc(sizeof(tLimMlmAuthReq));
+		if (NULL == auth_req) {
+			pe_err("mlmAuthReq :Memory alloc failed");
+			return;
+		}
+		if (session_entry->limSmeState ==
+			eLIM_SME_WT_AUTH_STATE) {
+			sir_copy_mac_addr(auth_req->peerMacAddr,
+				session_entry->bssId);
+		} else {
+			qdf_mem_copy((uint8_t *)&auth_req->peerMacAddr,
+			(uint8_t *)&mac_ctx->lim.gLimPreAuthPeerAddr,
+			sizeof(tSirMacAddr));
 		}
+		auth_req->authType = auth_mode;
+		/* Update PE session Id */
+		auth_req->sessionId = auth_cnf->sessionId;
+		if (wlan_cfg_get_int(mac_ctx,
+			WNI_CFG_AUTHENTICATE_FAILURE_TIMEOUT,
+			(uint32_t *) &auth_req->authFailureTimeout)
+			!= eSIR_SUCCESS) {
+			pe_err("Fail:retrieve AuthFailureTimeout");
+		}
+		lim_post_mlm_message(mac_ctx, LIM_MLM_AUTH_REQ,
+			(uint32_t *) auth_req);
 		return;
 	} else {
 		/* MAC based authentication failure */

+ 0 - 8
core/mac/src/pe/lim/lim_timer_utils.c

@@ -133,13 +133,6 @@ static bool lim_create_non_ap_timers(tpAniSirGlobal pMac)
 		return false;
 	}
 
-	if (tx_timer_create(pMac, &pMac->lim.limTimers.open_sys_auth_timer,
-			"open system Auth timer", lim_send_open_system_auth, 0,
-			SYS_MS_TO_TICKS(15), 0, TX_NO_ACTIVATE) != TX_SUCCESS) {
-		pe_err("failed to create open system Auth timer");
-		return false;
-	}
-
 	if (wlan_cfg_get_int(pMac, WNI_CFG_ASSOCIATION_FAILURE_TIMEOUT,
 			     &cfgValue) != eSIR_SUCCESS)
 		pe_err("could not retrieve AssocFailureTimeout value");
@@ -386,7 +379,6 @@ err_timer:
 	tx_timer_delete(&pMac->lim.limTimers.gLimProbeAfterHBTimer);
 	tx_timer_delete(&pMac->lim.limTimers.gLimAuthFailureTimer);
 	tx_timer_delete(&pMac->lim.limTimers.gLimAddtsRspTimer);
-	tx_timer_delete(&pMac->lim.limTimers.open_sys_auth_timer);
 	tx_timer_delete(&pMac->lim.limTimers.gLimAssocFailureTimer);
 	tx_timer_delete(&pMac->lim.limTimers.gLimJoinFailureTimer);
 	tx_timer_delete(&pMac->lim.limTimers.gLimPeriodicJoinProbeReqTimer);

+ 0 - 6
core/mac/src/pe/lim/lim_utils.c

@@ -612,9 +612,6 @@ void lim_deactivate_timers(tpAniSirGlobal mac_ctx)
 	/* Deactivate Association failure timer. */
 	tx_timer_deactivate(&lim_timer->gLimAssocFailureTimer);
 
-	/* Deactivate Open system auth timer. */
-	tx_timer_deactivate(&lim_timer->open_sys_auth_timer);
-
 	/* Deactivate Authentication failure timer. */
 	tx_timer_deactivate(&lim_timer->gLimAuthFailureTimer);
 
@@ -700,9 +697,6 @@ void lim_cleanup_mlm(tpAniSirGlobal mac_ctx)
 		/* Delete Association failure timer. */
 		tx_timer_delete(&lim_timer->gLimAssocFailureTimer);
 
-		/* Delete Open system auth timer. */
-		tx_timer_delete(&lim_timer->open_sys_auth_timer);
-
 		/* Delete Authentication failure timer. */
 		tx_timer_delete(&lim_timer->gLimAuthFailureTimer);
 

+ 0 - 12
core/mac/src/pe/lim/lim_utils.h

@@ -104,18 +104,6 @@ void lim_print_sme_state(tpAniSirGlobal pMac, uint16_t logLevel,
 		tLimSmeStates state);
 void lim_print_msg_name(tpAniSirGlobal pMac, uint16_t logLevel, uint32_t msgType);
 
-/**
- * lim_send_open_system_auth() - api to send open system auth frame
- * @ctx: Pointer to global mac structure
- * @session_id: session id
- *
- * This function is used to send open system auth when
- * shared auth fails with reason-algo not supported
- *
- * Return: None
- */
-void lim_send_open_system_auth(void *ctx, uint32_t param);
-
 extern tSirRetStatus lim_send_set_max_tx_power_req(tpAniSirGlobal pMac,
 		int8_t txPower,
 		tpPESession pSessionEntry);