Эх сурвалжийг харах

qcacld-3.0: Use only partner links with valid scan entry

If the scan entries for a non-tx profile MBSSID partner links
are not present at the time of candidate selection, then
host driver generates the scan entry for the missing partner
link from the assoc response.

The assoc response from the AP has PMKID in the RSN(some APs
do not include RSN IE in assoc resp).In this case, the RSN
along with PMKID gets inherited into the scan cache of the
missing partner and this leads to mismatch between M3 and
scan entry RSN causing disconnection.

To fix this, mark all the MBSSID partners without scan entries
as invalid links at the time of candidate shortlisting. Score
and connect to only non-tx candidates with valid scan entries.

Remove the probe response generation from assoc response logic.

Change-Id: I3b90ca1f1d81f2de7cc629576714c72975b11ae9
CRs-Fixed: 3738606
Surya Prakash Sivaraj 1 жил өмнө
parent
commit
44e92cc76a

+ 0 - 41
components/umac/mlme/connection_mgr/core/src/wlan_cm_vdev_connect.c

@@ -1161,46 +1161,6 @@ set_partner_info_for_2link_sap(struct scan_cache_entry *scan_entry,
 }
 #endif
 
-static void
-cm_check_ml_missing_partner_entries(struct cm_connect_req *conn_req)
-{
-	uint8_t idx;
-	struct scan_cache_entry *entry, *partner_entry;
-	qdf_list_t *candidate_list = conn_req->candidate_list;
-	struct qdf_mac_addr *mld_addr;
-	struct partner_link_info *partner_info;
-
-	entry = conn_req->cur_candidate->entry;
-	mld_addr = util_scan_entry_mldaddr(entry);
-
-	/*
-	 * If the entry is not one of following, return gracefully:
-	 *   -AP is not ML type
-	 *   -AP is SLO
-	 */
-	if (!mld_addr || !entry->ml_info.num_links)
-		return;
-
-	for (idx = 0; idx < entry->ml_info.num_links; idx++) {
-		if (!entry->ml_info.link_info[idx].is_valid_link)
-			continue;
-
-		partner_info = &entry->ml_info.link_info[idx];
-		partner_entry = cm_get_entry(candidate_list,
-					     &partner_info->link_addr);
-		/*
-		 * If partner entry is not found in candidate list or if
-		 * the MLD address of the entry is not equal to current
-		 * candidate MLD address, treat it as entry not found.
-		 */
-		if (!partner_entry ||
-		    !qdf_is_macaddr_equal(mld_addr,
-					  &partner_entry->ml_info.mld_mac_addr)) {
-			partner_info->is_scan_entry_not_found = true;
-		}
-	}
-}
-
 QDF_STATUS
 cm_get_ml_partner_info(struct wlan_objmgr_pdev *pdev,
 		       struct cm_connect_req *conn_req)
@@ -1264,7 +1224,6 @@ cm_get_ml_partner_info(struct wlan_objmgr_pdev *pdev,
 	mlme_debug("sta and ap intersect num of partner link: %d", j);
 
 	set_partner_info_for_2link_sap(scan_entry, partner_info);
-	cm_check_ml_missing_partner_entries(conn_req);
 
 	return QDF_STATUS_SUCCESS;
 }

+ 0 - 150
core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c

@@ -47,8 +47,6 @@
 #include "wlan_mlme_ucfg_api.h"
 #include "wlan_connectivity_logging.h"
 #include <lim_mlo.h>
-#include <utils_mlo.h>
-#include <wlan_cm_roam_api.h>
 #include "parser_api.h"
 #include "wlan_twt_cfg_ext_api.h"
 #include "wlan_mlo_mgr_roam.h"
@@ -1096,133 +1094,6 @@ void lim_send_join_fail_on_vdev(struct mac_context *mac_ctx,
 			session_entry);
 }
 
-#ifdef WLAN_FEATURE_11BE_MLO
-static QDF_STATUS
-lim_gen_link_specific_probe_resp_from_assoc_resp(struct mac_context *mac_ctx,
-						 uint8_t *rx_pkt_info,
-						 uint32_t frame_len,
-						 struct pe_session *session)
-{
-	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	struct bss_description *bss;
-	struct scan_cache_entry *scan_entry;
-	struct mlo_partner_info *lim_partner_info;
-	struct partner_link_info *scan_partner_info;
-	struct mlo_link_info *link_info;
-	uint8_t link_id, idx, idx2;
-	struct qdf_mac_addr link_addr;
-	struct element_info link_probe_rsp, probe_rsp;
-	uint8_t *frame = WMA_GET_RX_MPDU_DATA(rx_pkt_info);
-	int8_t rssi = WMA_GET_RX_RSSI_NORMALIZED(rx_pkt_info);
-
-	if (!session->lim_join_req) {
-		pe_debug("Session join req invalid");
-		return QDF_STATUS_E_INVAL;
-	}
-
-	bss = &session->lim_join_req->bssDescription;
-	lim_partner_info = &session->lim_join_req->partner_info;
-
-	/*
-	 * For link VDEV no need to generate again, as during assoc VDEv
-	 * it is already generated.
-	 */
-	if (!bss->mbssid_info.profile_num ||
-	    !lim_partner_info->num_partner_links ||
-	    wlan_vdev_mlme_is_mlo_link_vdev(session->vdev)) {
-		return QDF_STATUS_SUCCESS;
-	}
-
-	link_probe_rsp.ptr = qdf_mem_malloc(MAX_MGMT_MPDU_LEN);
-	if (!link_probe_rsp.ptr) {
-		pe_err("mallloc failed for %u bytes", MAX_MGMT_MPDU_LEN);
-		return QDF_STATUS_E_NOMEM;
-	}
-
-	scan_entry = wlan_cm_get_curr_candidate_entry(session->vdev,
-						      session->cm_id);
-	if (!scan_entry) {
-		pe_err("Curr scan entry NULL");
-		qdf_mem_free(link_probe_rsp.ptr);
-		return QDF_STATUS_E_INVAL;
-	}
-
-	probe_rsp.ptr =
-		util_scan_entry_frame_ptr(scan_entry) + WLAN_MAC_HDR_LEN_3A;
-	probe_rsp.len =
-		util_scan_entry_frame_len(scan_entry) - WLAN_MAC_HDR_LEN_3A;
-
-	qdf_mem_copy(&link_addr, session->self_mac_addr, QDF_MAC_ADDR_SIZE);
-
-	/*
-	 * For each partner entry, check if the corresponding partner link
-	 * is found or not to generate probe resp for the missing link.
-	 */
-	for (idx2 = 0; idx2 < lim_partner_info->num_partner_links; idx2++) {
-		link_info = &lim_partner_info->partner_link_info[idx2];
-		for (idx = 0; idx < scan_entry->ml_info.num_links; idx++) {
-			scan_partner_info = &scan_entry->ml_info.link_info[idx];
-			if (!scan_partner_info->is_scan_entry_not_found)
-				continue;
-
-			if (link_info->link_id != scan_partner_info->link_id)
-				continue;
-
-			link_id = link_info->link_id;
-			link_probe_rsp.len = 0;
-			status = util_gen_link_probe_rsp_from_assoc_rsp(frame,
-									frame_len,
-									link_id,
-									link_addr,
-									link_probe_rsp.ptr,
-									(qdf_size_t)MAX_MGMT_MPDU_LEN,
-									(qdf_size_t *)&link_probe_rsp.len,
-									probe_rsp.ptr,
-									probe_rsp.len);
-
-			if (QDF_IS_STATUS_ERROR(status))
-				goto mem_free;
-
-			status = lim_add_bcn_probe(session->vdev,
-						   link_probe_rsp.ptr,
-						   link_probe_rsp.len,
-						   link_info->chan_freq, rssi);
-			if (QDF_IS_STATUS_ERROR(status)) {
-				pe_debug("Scan entry add failed for %d",
-					 link_id);
-				goto mem_free;
-			}
-		}
-
-		status = lim_update_mlo_mgr_info(mac_ctx,
-						 session->vdev,
-						 &link_info->link_addr,
-						 link_info->link_id,
-						 link_info->chan_freq);
-		if (QDF_IS_STATUS_ERROR(status)) {
-			pe_debug("failed to update mlo_mgr %d for link_id: %d",
-				 status, link_info->link_id);
-			goto mem_free;
-		}
-	}
-
-mem_free:
-	qdf_mem_free(link_probe_rsp.ptr);
-	util_scan_free_cache_entry(scan_entry);
-
-	return status;
-}
-#else /* WLAN_FEATURE_11BE_MLO */
-static inline QDF_STATUS
-lim_gen_link_specific_probe_resp_from_assoc_resp(struct mac_context *mac_ctx,
-						 uint8_t *rx_pkt_info,
-						 uint32_t frame_len,
-						 struct pe_session *session)
-{
-	return QDF_STATUS_SUCCESS;
-}
-#endif /* WLAN_FEATURE_11BE_MLO */
-
 /**
  * lim_process_assoc_rsp_frame() - Processes assoc response
  * @mac_ctx: Pointer to Global MAC structure
@@ -1880,27 +1751,6 @@ lim_process_assoc_rsp_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_info,
 #endif
 	lim_update_stads_ext_cap(mac_ctx, session_entry, assoc_rsp, sta_ds);
 
-	/* Try to generate link probe resp from assoc resp for MBSSID AP
-	 * as ML probe is not sent for MBSSID AP.
-	 *
-	 * Any failure during partner link probe resp generation, treat
-	 * it as connect failure and send deauth to AP.
-	 */
-	status = lim_gen_link_specific_probe_resp_from_assoc_resp(mac_ctx,
-								  rx_pkt_info,
-								  frame_body_len,
-								  session_entry);
-	if (QDF_IS_STATUS_ERROR(status)) {
-		assoc_cnf.resultCode = eSIR_SME_RESOURCES_UNAVAILABLE;
-		assoc_cnf.protStatusCode = STATUS_UNSPECIFIED_FAILURE;
-		/* Send advisory Disassociation frame to AP */
-		lim_send_disassoc_mgmt_frame(mac_ctx,
-					     REASON_UNSPEC_FAILURE,
-					     hdr->sa, session_entry,
-					     false);
-		goto assocReject;
-	}
-
 	/* Update the BSS Entry, this entry was added during preassoc. */
 	if (QDF_STATUS_SUCCESS ==
 	    lim_sta_send_add_bss(mac_ctx, assoc_rsp, beacon,