summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrinivas Dasari <dasaris@codeaurora.org>2020-11-09 23:37:48 +0530
committerHsiu Chang Chen <hsiuchangchen@google.com>2020-12-15 19:38:05 +0000
commit0d827cb6dc087593bb2472487e792c8ac7a59838 (patch)
tree9b50a727a31037b9f95102608172fd77628af27e
parent0ef8ab38ecc6fa74a99d65bfb1a3b6433f825e38 (diff)
downloadqcacld-0d827cb6dc087593bb2472487e792c8ac7a59838.tar.gz
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. Bug: 172309980 Change-Id: I194adc9e0f90d074aef50340d2cd6c7b138cc9b5 CRs-Fixed: 2815784 Signed-off-by: Hsiu-Chang Chen <hsiuchangchen@google.com>
-rw-r--r--core/mac/src/pe/include/lim_session.h4
-rw-r--r--core/mac/src/pe/lim/lim_process_auth_frame.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/core/mac/src/pe/include/lim_session.h b/core/mac/src/pe/include/lim_session.h
index 8a23237823..33039ada4e 100644
--- a/core/mac/src/pe/include/lim_session.h
+++ b/core/mac/src/pe/include/lim_session.h
@@ -136,6 +136,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 */
@@ -561,6 +564,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;
diff --git a/core/mac/src/pe/lim/lim_process_auth_frame.c b/core/mac/src/pe/lim/lim_process_auth_frame.c
index 570d899427..5b25cb5044 100644
--- a/core/mac/src/pe/lim/lim_process_auth_frame.c
+++ b/core/mac/src/pe/lim/lim_process_auth_frame.c
@@ -1257,14 +1257,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);