Browse Source

qcacmn: TID to Link IE scan db changes

Change done to parse TID to Link IE in scan database.

Change-Id: I391c2f9939b43fd6bb21cd713e323ddb04e4bb79
CRs-Fixed: 3344664
Amruta Kulkarni 2 năm trước cách đây
mục cha
commit
52bd685515

+ 23 - 0
umac/mlme/connection_mgr/core/src/wlan_cm_connect.c

@@ -31,6 +31,8 @@
 #include "wlan_dlm_api.h"
 #include "wlan_cm_roam_api.h"
 #include "wlan_tdls_api.h"
+#include "wlan_mlo_t2lm.h"
+#include "wlan_t2lm_api.h"
 #endif
 #include <wlan_utility.h>
 #include <wlan_mlo_mgr_sta.h>
@@ -627,11 +629,28 @@ static void cm_create_bss_peer(struct cnx_mgr *cm_ctx,
 	}
 }
 
+#if defined(CONN_MGR_ADV_FEATURE) && defined(WLAN_FEATURE_11BE_MLO)
+static QDF_STATUS
+cm_t2lm_validate_candidate(struct cnx_mgr *cm_ctx,
+			   struct scan_cache_entry *scan_entry)
+{
+	return wlan_t2lm_validate_candidate(cm_ctx, scan_entry);
+}
+#else
+static inline QDF_STATUS
+cm_t2lm_validate_candidate(struct cnx_mgr *cm_ctx,
+			   struct scan_cache_entry *scan_entry)
+{
+	return QDF_STATUS_SUCCESS;
+}
+#endif
+
 static
 QDF_STATUS cm_if_mgr_validate_candidate(struct cnx_mgr *cm_ctx,
 					struct scan_cache_entry *scan_entry)
 {
 	struct if_mgr_event_data event_data = {0};
+	QDF_STATUS status = QDF_STATUS_SUCCESS;
 
 	event_data.validate_bss_info.chan_freq = scan_entry->channel.chan_freq;
 	event_data.validate_bss_info.beacon_interval = scan_entry->bcn_int;
@@ -639,6 +658,10 @@ QDF_STATUS cm_if_mgr_validate_candidate(struct cnx_mgr *cm_ctx,
 			 &scan_entry->bssid);
 	cm_candidate_mlo_update(scan_entry, &event_data.validate_bss_info);
 
+	status = cm_t2lm_validate_candidate(cm_ctx, scan_entry);
+	if (QDF_IS_STATUS_ERROR(status))
+		return status;
+
 	return if_mgr_deliver_event(cm_ctx->vdev,
 				    WLAN_IF_MGR_EV_VALIDATE_CANDIDATE,
 				    &event_data);

+ 5 - 0
umac/scan/dispatcher/inc/wlan_scan_public_structs.h

@@ -30,6 +30,9 @@
 #include <wlan_cmn_ieee80211.h>
 #include <wlan_mgmt_txrx_utils_api.h>
 #include <reg_services_public_struct.h>
+#ifdef WLAN_FEATURE_11BE_MLO
+#include "wlan_mlo_mgr_public_structs.h"
+#endif
 
 typedef uint16_t wlan_scan_requester;
 typedef uint32_t wlan_scan_id;
@@ -202,6 +205,7 @@ struct channel_info {
  * @rsnxe: Pointer to rsnxe IE
  * @ehtcap: pointer to ehtcap ie
  * @ehtop: pointer to eht op ie
+ * @t2lm: array of pointers to t2lm op ie
  * @multi_link_bv: pointer to multi link basic variant IE
  * @bwnss_map: pointer to NSS map IE
  * @secchanoff: pointer to secondary chan IE
@@ -270,6 +274,7 @@ struct ie_list {
 #endif
 #ifdef WLAN_FEATURE_11BE_MLO
 	uint8_t *multi_link_bv;
+	uint8_t *t2lm[WLAN_MAX_T2LM_IE];
 #endif
 	uint8_t *qcn;
 

+ 16 - 0
umac/scan/dispatcher/inc/wlan_scan_utils_api.h

@@ -742,6 +742,8 @@ util_scan_copy_beacon_data(struct scan_cache_entry *new_entry,
 #ifdef WLAN_FEATURE_11BE_MLO
 	ie_lst->multi_link_bv =
 			conv_ptr(ie_lst->multi_link_bv, old_ptr, new_ptr);
+	for (i = 0; i < WLAN_MAX_T2LM_IE; i++)
+		ie_lst->t2lm[i] = conv_ptr(ie_lst->t2lm[i], old_ptr, new_ptr);
 #endif
 	ie_lst->qcn = conv_ptr(ie_lst->qcn, old_ptr, new_ptr);
 
@@ -1591,6 +1593,20 @@ util_scan_entry_ehtcap(struct scan_cache_entry *scan_entry)
 }
 #endif
 
+#ifdef WLAN_FEATURE_11BE_MLO
+static inline uint8_t*
+util_scan_entry_t2lm(struct scan_cache_entry *scan_entry)
+{
+	return scan_entry->ie_list.t2lm[0];
+}
+#else
+static inline uint8_t*
+util_scan_entry_t2lm(struct scan_cache_entry *scan_entry)
+{
+	return NULL;
+}
+#endif
+
 /**
  * util_scan_entry_tpe() - function to read tpe ie
  * @scan_entry: scan entry

+ 20 - 0
umac/scan/dispatcher/src/wlan_scan_utils_api.c

@@ -32,6 +32,7 @@
 #endif
 #ifdef WLAN_FEATURE_11BE_MLO
 #include <wlan_utility.h>
+#include "wlan_mlo_mgr_public_structs.h"
 #endif
 #include "wlan_psoc_mlme_api.h"
 #include "reg_services_public_struct.h"
@@ -1149,6 +1150,24 @@ util_scan_parse_rnr_ie(struct scan_cache_entry *scan_entry,
 	return QDF_STATUS_SUCCESS;
 }
 
+#ifdef WLAN_FEATURE_11BE_MLO
+static void
+util_scan_parse_t2lm_ie(struct scan_cache_entry *scan_params,
+			struct extn_ie_header *extn_ie)
+{
+	uint8_t t2lm_idx = 0;
+
+	if (extn_ie->ie_extn_id == WLAN_EXTN_ELEMID_T2LM)
+		for (t2lm_idx = 0; t2lm_idx < WLAN_MAX_T2LM_IE; t2lm_idx++) {
+			if (!scan_params->ie_list.t2lm[t2lm_idx]) {
+				scan_params->ie_list.t2lm[t2lm_idx] =
+					(uint8_t *)extn_ie;
+				return;
+		}
+	}
+}
+#endif
+
 #ifdef WLAN_FEATURE_11BE
 #ifdef WLAN_FEATURE_11BE_MLO
 static void util_scan_parse_ml_ie(struct scan_cache_entry *scan_params,
@@ -1178,6 +1197,7 @@ static void util_scan_parse_eht_ie(struct scan_cache_entry *scan_params,
 	}
 
 	util_scan_parse_ml_ie(scan_params, extn_ie);
+	util_scan_parse_t2lm_ie(scan_params, extn_ie);
 }
 #else
 static void util_scan_parse_eht_ie(struct scan_cache_entry *scan_params,