浏览代码

qcacld-3.0: Don't check the partner link security before ML probe response

Currently, before ML probe rsp in cm_get_ml_partner_info()
API, driver tries to get the partner link scan entry
and validate below cases:

1. Whether partner link scan_entry is found or not.
2. And based on the security, reject the particular partner
   link.

But in the ML connection, during scan, driver may not receive
the beacon/probe response frame for the partner link. But
later, will generate it from ML probe response.

Due to scan_entry not found, driver may connect with only
1 or 2 link connection.

To fix it, driver should check the partner link security
only after getting the complete partner link info in ML
probe response frame and added in the scan db.

CRs-Fixed: 3615946
Change-Id: Icb7f4e9e41d0da4a34799f535a2a0a1fe3b99f58
Deeksha Gupta 1 年之前
父节点
当前提交
8de8c22dab
共有 2 个文件被更改,包括 22 次插入38 次删除
  1. 1 33
      components/umac/mlme/connection_mgr/core/src/wlan_cm_vdev_connect.c
  2. 21 5
      core/mac/src/pe/lim/lim_api.c

+ 1 - 33
components/umac/mlme/connection_mgr/core/src/wlan_cm_vdev_connect.c

@@ -1149,9 +1149,6 @@ cm_get_ml_partner_info(struct wlan_objmgr_pdev *pdev,
 	uint8_t i, j = 0;
 	uint8_t mlo_support_link_num;
 	struct wlan_objmgr_psoc *psoc;
-	struct scan_cache_entry *part_scan_entry = NULL;
-	bool is_security_allowed;
-	struct qdf_mac_addr *link_mac;
 
 	/* If ML IE is not present then return failure*/
 	if (!scan_entry->ie_list.multi_link_bv)
@@ -1188,35 +1185,6 @@ cm_get_ml_partner_info(struct wlan_objmgr_pdev *pdev,
 			break;
 
 		if (scan_entry->ml_info.link_info[i].is_valid_link) {
-			link_mac = &scan_entry->ml_info.link_info[i].link_addr;
-			part_scan_entry = wlan_scan_get_scan_entry_by_mac_freq(
-					pdev,
-					link_mac,
-					scan_entry->ml_info.link_info[i].freq);
-			if (!part_scan_entry) {
-				scm_debug("scan entry not found for link addr: "
-					  QDF_MAC_ADDR_FMT,
-					  QDF_MAC_ADDR_REF(link_mac->bytes));
-				continue;
-			}
-
-			/*
-			 * Reject the partner link that doesn’t pass the
-			 * security check and validate the next available
-			 * partner link. If none of the partner link passes
-			 * the security check, proceed connection with
-			 * single link.
-			 */
-			is_security_allowed =
-				wlan_cm_is_eht_allowed_for_current_security(
-							psoc,
-							part_scan_entry);
-			util_scan_free_cache_entry(part_scan_entry);
-			if (!is_security_allowed) {
-				mlme_debug("current security is not valid for partner link");
-				continue;
-			}
-
 			partner_info->partner_link_info[j].link_addr =
 				scan_entry->ml_info.link_info[i].link_addr;
 			partner_info->partner_link_info[j].link_id =
@@ -1231,7 +1199,7 @@ cm_get_ml_partner_info(struct wlan_objmgr_pdev *pdev,
 	}
 
 	partner_info->num_partner_links = j;
-	mlme_debug("sta and ap integrate link num: %d", j);
+	mlme_debug("sta and ap intersect num of partner link: %d", j);
 
 	return QDF_STATUS_SUCCESS;
 }

+ 21 - 5
core/mac/src/pe/lim/lim_api.c

@@ -3892,6 +3892,9 @@ lim_clear_ml_partner_info(struct pe_session *session_entry)
 	}
 	pe_debug_rl("Clear Partner Link/s information");
 	for (idx = 0; idx < partner_info->num_partner_links; idx++) {
+		mlo_mgr_clear_ap_link_info(session_entry->vdev,
+			partner_info->partner_link_info[idx].link_addr.bytes);
+
 		partner_info->partner_link_info[idx].link_id = 0;
 		qdf_zero_macaddr(
 			&partner_info->partner_link_info[idx].link_addr);
@@ -4028,6 +4031,7 @@ QDF_STATUS lim_update_mlo_mgr_info(struct mac_context *mac_ctx,
 	struct wlan_objmgr_pdev *pdev;
 	struct scan_cache_entry *cache_entry;
 	struct wlan_channel channel;
+	bool is_security_allowed;
 
 	pdev = mac_ctx->pdev;
 	if (!pdev) {
@@ -4040,6 +4044,22 @@ QDF_STATUS lim_update_mlo_mgr_info(struct mac_context *mac_ctx,
 	if (!cache_entry)
 		return QDF_STATUS_E_FAILURE;
 
+	/**
+	 * Reject all the partner link if any partner link  doesn’t pass the
+	 * security check and proceed connection with single link.
+	 */
+	is_security_allowed =
+		wlan_cm_is_eht_allowed_for_current_security(
+					wlan_pdev_get_psoc(mac_ctx->pdev),
+					cache_entry);
+
+	if (!is_security_allowed) {
+		mlme_debug("current security is not valid for partner link link_addr:" QDF_MAC_ADDR_FMT,
+			   QDF_MAC_ADDR_REF(link_addr->bytes));
+		util_scan_free_cache_entry(cache_entry);
+		return QDF_STATUS_E_FAILURE;
+	}
+
 	channel.ch_freq = cache_entry->channel.chan_freq;
 	channel.ch_ieee = wlan_reg_freq_to_chan(pdev, channel.ch_freq);
 	channel.ch_phymode = cache_entry->phy_mode;
@@ -4235,11 +4255,7 @@ lim_gen_link_specific_probe_rsp(struct mac_context *mac_ctx,
 							 link_info->chan_freq);
 			if (QDF_IS_STATUS_ERROR(status)) {
 				pe_err("failed to update mlo_mgr %d", status);
-				status =
-				   lim_check_scan_db_for_join_req_partner_info(
-					session_entry, mac_ctx);
-				if (QDF_IS_STATUS_ERROR(status))
-					lim_clear_ml_partner_info(session_entry);
+				lim_clear_ml_partner_info(session_entry);
 
 				goto end;
 			}