Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0ef14e0f authored by Surya Prakash Sivaraj's avatar Surya Prakash Sivaraj
Browse files

qcacld-3.0: Do not drop retry assoc req if RMF enabled

Upon reception of assoc request from an already associated
PMF-enabled STA, the SAP is expected to start SA-Query
mechanism.

On the other hand, host driver drops all the
retried assoc request frames if the STA is already in
connected state. This is valid as long as the original
assoc request is currently under processing(to prevent
duplicate processing). However, for reassoc attempt cases,
this assoc request with retry bit set could be the first
assoc request under processing.

Therefore, change the logic to drop only retry-bit set
assoc requests in non-PMF STA cases.

For PMF-enabled STA, drop the assoc requests only if
key installation is pending. Otherwise, send SA query.

Change-Id: I1f3a564864e70f4e11994698389be427ac202fa3
CRs-Fixed: 3446033
parent 86ed4615
Loading
Loading
Loading
Loading
+19 −13
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
 * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -2298,14 +2298,20 @@ void lim_process_assoc_req_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_in
	 */
	sta_ds = dph_lookup_hash_entry(mac_ctx, hdr->sa, &assoc_id,
				&session->dph.dphHashTable);
	if (sta_ds) {
	if (sta_ds && !sta_ds->rmfEnabled) {
		/**
		 * Drop only retries for non-PMF assoc requests.
		 * For PMF case:
		 * a) Before key installation - Drop assoc request
		 * b) After key installation - Send SA query
		 */
		if (hdr->fc.retry > 0) {
			pe_err("STA is initiating Assoc Req after ACK lost. Do not process sessionid: %d sys sub_type=%d for role=%d from: "
				QDF_MAC_ADDR_FMT, session->peSessionId,
			sub_type, GET_LIM_SYSTEM_ROLE(session),
			QDF_MAC_ADDR_REF(hdr->sa));
			return;
		} else if (!sta_ds->rmfEnabled && (sub_type == LIM_REASSOC)) {
		} else if (sub_type == LIM_REASSOC) {
			/*
			 * SAP should send reassoc response with reject code
			 * to avoid IOT issues. as per the specification SAP
@@ -2319,7 +2325,7 @@ void lim_process_assoc_req_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_in
				sub_type, sta_ds, session, false);
			pe_err("Rejecting reassoc req from STA");
			return;
		} else if (!sta_ds->rmfEnabled) {
		} else {
			/*
			 * Do this only for non PMF case.
			 * STA might have missed the assoc response, so it is
@@ -2336,7 +2342,8 @@ void lim_process_assoc_req_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_in
				session->limSystemRole,
				QDF_MAC_ADDR_REF(hdr->sa));
			return;
		} else if (sta_ds->rmfEnabled && !sta_ds->is_key_installed) {
		}
	} else if (sta_ds && sta_ds->rmfEnabled && !sta_ds->is_key_installed) {
		/* When PMF enabled, SA Query will be triggered
		 * unexpectly if duplicated assoc_req received -
		 * 1) after pre_auth node deleted and
@@ -2346,7 +2353,6 @@ void lim_process_assoc_req_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_in
		pe_err("Drop duplicate assoc_req before 4-way HS");
		return;
	}
	}

	status = lim_check_sta_in_pe_entries(mac_ctx, hdr, session->peSessionId,
					     &dup_entry);