ソースを参照

qcacld-3.0: Consider peer mac addr also for duplicate frame detection

Currently, sequence number of the authentication frame is cached
to detect if the same frame is received again. But in SAP case,
it's possible to get authentication frame from two different
clients with the same sequence number. Host driver drops auth
frame from the second station as it is considered as a
duplicate frame. Though the driver drops the frame only if it's
a retry, it's possible to get auth frame from second client with
same sequence number and retry bit set.
Cache the client mac address along with sequence number to
avoid this.

Change-Id: I194adc9e0f90d074aef50340d2cd6c7b138cc9b5
CRs-Fixed: 2815784
Srinivas Dasari 4 年 前
コミット
b1768cdccf

+ 4 - 0
core/mac/src/pe/include/lim_session.h

@@ -137,6 +137,9 @@ struct obss_detection_cfg {
  * @ap_ecsa_wakelock: wakelock to complete CSA operation.
  * @ap_ecsa_runtime_lock: runtime lock to complete SAP CSA operation.
  * to Adaptive 11R network
+ * @prev_auth_seq_num: Sequence number of previously received auth frame to
+ * detect duplicate frames.
+ * @prev_auth_mac_addr: mac_addr of the sta correspond to @prev_auth_seq_num
  */
 struct pe_session {
 	/* To check session table is in use or free */
@@ -552,6 +555,7 @@ struct pe_session {
 #endif
 	/* previous auth frame's sequence number */
 	uint16_t prev_auth_seq_num;
+	tSirMacAddr prev_auth_mac_addr;
 	struct obss_detection_cfg obss_offload_cfg;
 	struct obss_detection_cfg current_obss_detection;
 	bool is_session_obss_offload_enabled;

+ 4 - 1
core/mac/src/pe/lim/lim_process_auth_frame.c

@@ -1319,14 +1319,17 @@ lim_process_auth_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_info,
 		(mac_hdr->seqControl.seqNumLo);
 
 	if (pe_session->prev_auth_seq_num == curr_seq_num &&
+	    !qdf_mem_cmp(pe_session->prev_auth_mac_addr, &mac_hdr->sa,
+			 ETH_ALEN) &&
 	    mac_hdr->fc.retry) {
 		pe_debug("auth frame, seq num: %d is already processed, drop it",
 			 curr_seq_num);
 		return;
 	}
 
-	/* save seq number in pe_session */
+	/* save seq number and mac_addr in pe_session */
 	pe_session->prev_auth_seq_num = curr_seq_num;
+	qdf_mem_copy(pe_session->prev_auth_mac_addr, mac_hdr->sa, ETH_ALEN);
 
 	body_ptr = WMA_GET_RX_MPDU_DATA(rx_pkt_info);