Parcourir la source

qcacmn: Generate ML prb rsp from assoc rsp

For non-TxMBSSID ML AP ML probe req may not receive any response
from MBSSID AP and later partner link may fail to connect as
scan entry is not present.
Introduce new flag to suggest whether the partner link scan entry
is present or not in the scan DB. If flag is set to true, generate
scan entry for such links.

Introduce new APIs which will generate ML probe resp using
the per-STA profile of partner link from assoc resp frame.

Introduce API to get the current candidate scan entry from
connect request.

Change-Id: I1c33956b01eb468afa26be5b0bfba634ee3a0aee
CRs-Fixed: 3675830
Vinod Kumar Pirla il y a 1 an
Parent
commit
01e1c46c4e

+ 3 - 10
umac/mlme/connection_mgr/core/src/wlan_cm_bss_scoring.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2024 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 above
@@ -1728,15 +1728,8 @@ static inline int cm_calculate_emlsr_score(struct weight_cfg *weight_config)
 	return weight_config->emlsr_weightage * mlo_boost_pct[MLSR];
 }
 
-/**
- * cm_get_entry() - Get bss scan entry by link mac address
- * @scan_list: Scan entry list of bss candidates after filtering
- * @link_addr: link mac address
- *
- * Return: Pointer to bss scan entry
- */
-static struct scan_cache_entry *cm_get_entry(qdf_list_t *scan_list,
-					     struct qdf_mac_addr *link_addr)
+struct scan_cache_entry *cm_get_entry(qdf_list_t *scan_list,
+				      struct qdf_mac_addr *link_addr)
 {
 	qdf_list_node_t *cur_node = NULL, *next_node = NULL;
 	struct scan_cache_node *curr_entry = NULL;

+ 1 - 3
umac/mlme/connection_mgr/core/src/wlan_cm_connect.c

@@ -1974,9 +1974,7 @@ cm_connect_req_update_ml_partner_info(struct cnx_mgr *cm_ctx,
 				      &eht_capable);
 	if (!same_candidate_used && eht_capable &&
 	    cm_bss_peer_is_assoc_peer(conn_req)) {
-		cm_get_ml_partner_info(pdev,
-				       conn_req->cur_candidate->entry,
-				       &conn_req->req.ml_parnter_info);
+		cm_get_ml_partner_info(pdev, conn_req);
 		cm_modify_partner_info_based_on_dbs_or_sbs_mode(
 						cm_ctx->vdev, cm_req->cm_id,
 						conn_req->cur_candidate->entry,

+ 14 - 1
umac/mlme/connection_mgr/core/src/wlan_cm_main_api.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2012-2015, 2020-2021, The Linux Foundation. All rights reserved.
- * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2024 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 above
@@ -1488,6 +1488,19 @@ cm_get_active_connect_req_param(struct wlan_objmgr_vdev *vdev,
 QDF_STATUS cm_get_rnr(struct wlan_objmgr_vdev *vdev, wlan_cm_id cm_id,
 		      struct reduced_neighbor_report *rnr);
 
+/**
+ * cm_get_curr_candidate_entry() - Get the current candidate from cnx mgr
+ * @vdev: VDEV object manager.
+ * @cm_id: cnx mgr ID.
+ *
+ * Get current entry of connection from the cnx mgr list.
+ * Caller to free the returned scan entry if not NULL.
+ *
+ * Return: Scan entry
+ */
+struct scan_cache_entry *
+cm_get_curr_candidate_entry(struct wlan_objmgr_vdev *vdev, wlan_cm_id cm_id);
+
 /**
  * cm_free_connect_rsp_ies() - Function to free all connection IEs.
  * @connect_rsp: pointer to connect rsp

+ 42 - 1
umac/mlme/connection_mgr/core/src/wlan_cm_util.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2012-2015, 2020-2021, The Linux Foundation. All rights reserved.
- * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2024 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 above
@@ -1845,6 +1845,47 @@ QDF_STATUS cm_get_rnr(struct wlan_objmgr_vdev *vdev, wlan_cm_id cm_id,
 	return QDF_STATUS_E_FAILURE;
 }
 
+struct scan_cache_entry *
+cm_get_curr_candidate_entry(struct wlan_objmgr_vdev *vdev,
+			    wlan_cm_id cm_id)
+{
+	qdf_list_node_t *cur_node = NULL, *next_node = NULL;
+	struct cm_req *cm_req;
+	uint32_t prefix = CM_ID_GET_PREFIX(cm_id);
+	struct cnx_mgr *cm_ctx;
+	struct scan_cache_entry *cur_entry, *entry = NULL;
+
+	if (prefix != CONNECT_REQ_PREFIX)
+		return NULL;
+
+	cm_ctx = cm_get_cm_ctx(vdev);
+	if (!cm_ctx)
+		return NULL;
+
+	cm_req_lock_acquire(cm_ctx);
+	qdf_list_peek_front(&cm_ctx->req_list, &cur_node);
+	while (cur_node) {
+		qdf_list_peek_next(&cm_ctx->req_list, cur_node, &next_node);
+		cm_req = qdf_container_of(cur_node, struct cm_req, node);
+
+		if (cm_req->cm_id != cm_id) {
+			cur_node = next_node;
+			next_node = NULL;
+			continue;
+		}
+
+		if (!cm_req->connect_req.cur_candidate)
+			break;
+
+		cur_entry = cm_req->connect_req.cur_candidate->entry;
+		entry = util_scan_copy_cache_entry(cur_entry);
+		break;
+	}
+	cm_req_lock_release(cm_ctx);
+
+	return entry;
+}
+
 #ifdef WLAN_POLICY_MGR_ENABLE
 static void
 cm_get_pcl_chan_weigtage_for_sta(struct wlan_objmgr_pdev *pdev,

+ 14 - 1
umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_api.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2020-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2024 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 above
@@ -590,6 +590,19 @@ void wlan_cm_set_candidate_custom_sort_cb(
 QDF_STATUS wlan_cm_get_rnr(struct wlan_objmgr_vdev *vdev, wlan_cm_id cm_id,
 			   struct reduced_neighbor_report *rnr);
 
+/**
+ * wlan_cm_get_curr_candidate_entry() - Get current candidate from cnx mgr
+ * @vdev: VDEV object manager
+ * @cm_id: cnx mgr ID
+ *
+ * Get the current candidate for connection from cnx mgr.
+ *
+ * Return: Scan entry
+ */
+struct scan_cache_entry *
+wlan_cm_get_curr_candidate_entry(struct wlan_objmgr_vdev *vdev,
+				 wlan_cm_id cm_id);
+
 /**
  * wlan_cm_disc_cont_after_rso_stop() - Continue disconnect after RSO stop
  * @vdev: Objmgr vdev

+ 11 - 1
umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_bss_score_param.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
- * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2024 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 above
@@ -573,4 +573,14 @@ void wlan_cm_set_check_assoc_disallowed(struct wlan_objmgr_psoc *psoc,
 void wlan_cm_get_check_assoc_disallowed(struct wlan_objmgr_psoc *psoc,
 					bool *value);
 #endif
+
+/**
+ * cm_get_entry() - Get bss scan entry by link mac address
+ * @scan_list: Scan entry list of bss candidates after filtering
+ * @link_addr: link mac address
+ *
+ * Return: Pointer to bss scan entry
+ */
+struct scan_cache_entry *cm_get_entry(qdf_list_t *scan_list,
+				      struct qdf_mac_addr *link_addr);
 #endif

+ 8 - 1
umac/mlme/connection_mgr/dispatcher/src/wlan_cm_api.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2012-2015, 2020-2021, The Linux Foundation. All rights reserved.
- * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2024 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 above
@@ -430,6 +430,13 @@ QDF_STATUS wlan_cm_get_rnr(struct wlan_objmgr_vdev *vdev, wlan_cm_id cm_id,
 	return cm_get_rnr(vdev, cm_id, rnr);
 }
 
+struct scan_cache_entry *
+wlan_cm_get_curr_candidate_entry(struct wlan_objmgr_vdev *vdev,
+				 wlan_cm_id cm_id)
+{
+	return cm_get_curr_candidate_entry(vdev, cm_id);
+}
+
 void
 wlan_cm_connect_resp_fill_mld_addr_from_cm_id(struct wlan_objmgr_vdev *vdev,
 					     wlan_cm_id cm_id,

+ 55 - 1
umac/mlo_mgr/inc/utils_mlo.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2021, The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2024 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 above
@@ -106,6 +106,47 @@ util_gen_link_assoc_rsp(uint8_t *frame, qdf_size_t frame_len, bool isreassoc,
 			qdf_size_t link_frame_maxsize,
 			qdf_size_t *link_frame_len);
 
+/**
+ * util_gen_link_probe_rsp_from_assoc_rsp() - Generate link specific
+ * probe response from assoc response.
+ * @frame: Pointer to original association response. This should not contain the
+ * 802.11 header, and must start from the fixed fields in the association
+ * response. This is required due to some caller semantics built into the end to
+ * end design.
+ * @frame_len: Length of original association response
+ * @link_id: Link ID for secondary links
+ * @link_addr: Secondary link's MAC address
+ * @link_frame: Generated secondary link specific association response. Note
+ * that this will start from the 802.11 header (unlike the original association
+ * response). This should be ignored in the case of failure.
+ * @link_frame_maxsize: Maximum size of generated secondary link specific
+ * association response
+ * @link_frame_len: Pointer to location where populated length of generated
+ * secondary link specific association response should be written. This should
+ * be ignored in the case of failure.
+ * @bcn_prb_ptr: Pointer to probe response of the current link on which assoc
+ * response is received, This should not contain the 802.11 header, and must
+ * start from the fixed fields in the probe response.
+ * @bcn_prb_len: Length of probe response of @bcn_prb_ptr.
+ *
+ * Generate a link specific logically equivalent probe response for the
+ * secondary link from the original association response containing a Multi-Link
+ * element.
+ * Currently, only two link MLO is supported.
+ *
+ * Return: QDF_STATUS_SUCCESS in the case of success, QDF_STATUS value giving
+ * the reason for error in the case of failure.
+ */
+QDF_STATUS
+util_gen_link_probe_rsp_from_assoc_rsp(uint8_t *frame, qdf_size_t frame_len,
+				       uint8_t link_id,
+				       struct qdf_mac_addr link_addr,
+				       uint8_t *link_frame,
+				       qdf_size_t link_frame_maxsize,
+				       qdf_size_t *link_frame_len,
+				       uint8_t *bcn_prb_ptr,
+				       qdf_size_t bcn_prb_len);
+
 /**
  * util_gen_link_probe_rsp() - Generate link specific probe response
  * @frame: Pointer to original probe response. This should not contain the
@@ -598,6 +639,19 @@ util_gen_link_assoc_rsp(uint8_t *frame, qdf_size_t frame_len, bool isreassoc,
 	return QDF_STATUS_E_NOSUPPORT;
 }
 
+static inline QDF_STATUS
+util_gen_link_probe_rsp_from_assoc_rsp(uint8_t *frame, qdf_size_t frame_len,
+				       uint8_t link_id,
+				       struct qdf_mac_addr link_addr,
+				       uint8_t *link_frame,
+				       qdf_size_t link_frame_maxsize,
+				       qdf_size_t *link_frame_len,
+				       uint8_t *bcn_prb_ptr,
+				       qdf_size_t bcn_prb_len)
+{
+	return QDF_STATUS_E_NOSUPPORT;
+}
+
 static inline QDF_STATUS
 util_find_mlie(uint8_t *buf, qdf_size_t buflen, uint8_t **mlieseq,
 	       qdf_size_t *mlieseqlen)

Fichier diff supprimé car celui-ci est trop grand
+ 973 - 8
umac/mlo_mgr/src/utils_mlo.c


+ 4 - 1
umac/scan/dispatcher/inc/wlan_scan_public_structs.h

@@ -529,6 +529,8 @@ struct reduced_neighbor_report {
  * @ecsa_ie: Pointer to eCSA IE
  * @max_cst_ie: Pointer to Max Channel Switch Time IE
  * @is_valid_link: The partner link can be used if true
+ * @is_scan_entry_not_found: If set to true, the partner link scan entry is
+ * not present in scan DB (currently using for non-TxMBSSID MLO AP)
  * @op_class: Operating class
  */
 struct partner_link_info {
@@ -539,7 +541,8 @@ struct partner_link_info {
 	const uint8_t *csa_ie;
 	const uint8_t *ecsa_ie;
 	const uint8_t *max_cst_ie;
-	uint8_t  is_valid_link;
+	bool is_valid_link;
+	bool is_scan_entry_not_found;
 	uint8_t op_class;
 };
 

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff