Browse Source

Revert "qcacld-3.0: Save previous auth algo in pe session"

This reverts commit 7cf307e148d2ed065b73a6aec4f0a6139c8cb499
as the check to drop auth frame if previous sequence number
and auth algo match with current sequence number and auth
algo returns true instead of false in a correct scenario.

Change-Id: I8dee272f535acaadb9dfff69ee9ce68ddea4eec1
CRs-Fixed: 2166125
Yeshwanth Sriram Guntuka 7 years ago
parent
commit
72a2fb2513

+ 1 - 3
core/mac/src/pe/include/lim_session.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -528,8 +528,6 @@ typedef struct sPESession       /* Added to Support BT-AMP */
 #endif
 	/* previous auth frame's sequence number */
 	uint16_t prev_auth_seq_num;
-	/* previous auth algo */
-	uint16_t prev_auth_algo;
 } tPESession, *tpPESession;
 
 /*-------------------------------------------------------------------------

+ 10 - 13
core/mac/src/pe/lim/lim_process_auth_frame.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -1096,6 +1096,15 @@ lim_process_auth_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
 		pe_session->limMlmState, MAC_ADDR_ARRAY(mac_hdr->bssId),
 		(uint) abs((int8_t) WMA_GET_RX_RSSI_NORMALIZED(rx_pkt_info)));
 
+	if (pe_session->prev_auth_seq_num == curr_seq_num) {
+		pe_err("auth frame, seq num: %d is already processed, drop it",
+			curr_seq_num);
+		return;
+	}
+
+	/* save seq number in pe_session */
+	pe_session->prev_auth_seq_num = curr_seq_num;
+
 	body_ptr = WMA_GET_RX_MPDU_DATA(rx_pkt_info);
 
 	/* Restore default failure timeout */
@@ -1335,18 +1344,6 @@ lim_process_auth_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
 			goto free;
 	}
 
-	if (pe_session->prev_auth_seq_num == curr_seq_num &&
-	    pe_session->prev_auth_algo == rx_auth_frame->authAlgoNumber) {
-		pe_err("auth frame, seq num: %d is already processed, drop it",
-			curr_seq_num);
-		goto free;
-	}
-
-	/* save seq number in pe_session */
-	pe_session->prev_auth_seq_num = curr_seq_num;
-
-	pe_session->prev_auth_algo = rx_auth_frame->authAlgoNumber;
-
 	rx_auth_frm_body = rx_auth_frame;
 
 	pe_debug("Received Auth frame with type: %d seqnum: %d status: %d %d",

+ 1 - 2
core/mac/src/pe/lim/lim_session.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -541,7 +541,6 @@ pe_create_session(tpAniSirGlobal pMac, uint8_t *bssid, uint8_t *sessionId,
 	session_ptr->ht_client_cnt = 0;
 	/* following is invalid value since seq number is 12 bit */
 	session_ptr->prev_auth_seq_num = 0xFFFF;
-	session_ptr->prev_auth_algo = 0xFFFF;
 
 	return &pMac->lim.gpSession[i];
 }