Przeglądaj źródła

qcacmn: Make cm_bss_mlo_type a public API

Make cm_bss_mlo_type() public so that other components can use it.

Change-Id: I18f130eb147b859f8827bacbfd3d134121caabf1
CRs-Fixed: 3601362
Srinivas Dasari 1 rok temu
rodzic
commit
26d8aab401

+ 5 - 18
umac/mlme/connection_mgr/core/src/wlan_cm_bss_scoring.c

@@ -33,6 +33,8 @@
 #include "wlan_mlme_api.h"
 #include "wlan_wfa_tgt_if_tx_api.h"
 #endif
+#include "wlan_cm_main_api.h"
+#include "wlan_cm_public_struct.h"
 
 #define CM_PCL_RSSI_THRESHOLD -75
 
@@ -131,14 +133,6 @@ SNR_DB_TO_BIT_PER_TONE_LUT[DB_NUM] = {0, 171, 212, 262, 323, 396, 484,
 586, 706, 844, 1000, 1176, 1370, 1583, 1812, 2058, 2317, 2588, 2870, 3161};
 #endif
 
-/* MLO link types */
-enum MLO_TYPE {
-	SLO,
-	MLSR,
-	MLMR,
-	MLO_TYPE_MAX
-};
-
 static bool cm_is_better_bss(struct scan_cache_entry *bss1,
 			     struct scan_cache_entry *bss2)
 {
@@ -1763,9 +1757,9 @@ static inline bool is_freq_dbs_or_sbs(struct wlan_objmgr_psoc *psoc,
  *
  * Return: MLO AP type: SLO, MLMR or EMLSR.
  */
-static enum MLO_TYPE  cm_bss_mlo_type(struct wlan_objmgr_psoc *psoc,
-				      struct scan_cache_entry *entry,
-				      qdf_list_t *scan_list)
+enum MLO_TYPE cm_bss_mlo_type(struct wlan_objmgr_psoc *psoc,
+			      struct scan_cache_entry *entry,
+			      qdf_list_t *scan_list)
 {
 	uint8_t mlo_link_num;
 	uint8_t i;
@@ -2091,13 +2085,6 @@ static inline int cm_calculate_emlsr_score(struct weight_cfg *weight_config)
 	return 0;
 }
 
-static enum MLO_TYPE cm_bss_mlo_type(struct wlan_objmgr_psoc *psoc,
-				     struct scan_cache_entry *entry,
-				     qdf_list_t *scan_list)
-{
-	return SLO;
-}
-
 static int cm_calculate_mlo_bss_score(struct wlan_objmgr_psoc *psoc,
 				      struct scan_cache_entry *entry,
 				      struct scoring_cfg *score_params,

+ 22 - 0
umac/mlme/connection_mgr/core/src/wlan_cm_main_api.h

@@ -1443,4 +1443,26 @@ void cm_store_n_send_failed_candidate(struct cnx_mgr *cm_ctx, wlan_cm_id cm_id)
 {
 }
 #endif /* CONN_MGR_ADV_FEATURE */
+
+#ifdef WLAN_FEATURE_11BE_MLO
+/**
+ * cm_bss_mlo_type() - Check if the scan entry is of MLO type
+ * @psoc: Pointer to psoc
+ * @entry: scan cache entry
+ * @scan_list: list of scan entries to look for if @entry is of ML type
+ *
+ * Return: MLO AP type: SLO, MLMR or EMLSR.
+ */
+enum MLO_TYPE cm_bss_mlo_type(struct wlan_objmgr_psoc *psoc,
+			      struct scan_cache_entry *entry,
+			      qdf_list_t *scan_list);
+#else
+static inline enum MLO_TYPE
+cm_bss_mlo_type(struct wlan_objmgr_psoc *psoc,
+		struct scan_cache_entry *entry,
+		qdf_list_t *scan_list)
+{
+	return SLO;
+}
+#endif
 #endif /* __WLAN_CM_MAIN_API_H__ */

+ 13 - 0
umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_api.h

@@ -609,4 +609,17 @@ wlan_cm_check_mlo_roam_auth_status(struct wlan_objmgr_vdev *vdev)
 	return false;
 }
 #endif
+
+/**
+ * wlan_cm_bss_mlo_type() - Check if the scan entry is of MLO type
+ * @psoc: Pointer to psoc
+ * @entry: scan cache entry
+ * @scan_list: list of scan entries to look for if @entry is of ML type
+ *
+ * Return: MLO AP type: SLO, MLMR or EMLSR.
+ */
+enum MLO_TYPE
+wlan_cm_bss_mlo_type(struct wlan_objmgr_psoc *psoc,
+		     struct scan_cache_entry *entry,
+		     qdf_list_t *scan_list);
 #endif /* __WLAN_CM_UCFG_API_H */

+ 14 - 0
umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_public_struct.h

@@ -679,4 +679,18 @@ enum wlan_cm_active_request_type {
 	CM_ROAM_ACTIVE,
 };
 
+/*
+ * enum MLO_TYPE: ML type of bss
+ * @SLO: Non-ML or Single link ML
+ * @MLSR: Multi link Single Radio, indicates that both links
+ *        have to be on one mac
+ * @MLMR: Multi link Multi Radio, indicates that both links
+ *        can be on different macs
+ */
+enum MLO_TYPE {
+	SLO,
+	MLSR,
+	MLMR,
+	MLO_TYPE_MAX
+};
 #endif /* __WLAN_CM_PUBLIC_STRUCT_H__ */

+ 7 - 0
umac/mlme/connection_mgr/dispatcher/src/wlan_cm_api.c

@@ -563,3 +563,10 @@ wlan_cm_check_mlo_roam_auth_status(struct wlan_objmgr_vdev *vdev)
 }
 #endif
 #endif
+enum MLO_TYPE
+wlan_cm_bss_mlo_type(struct wlan_objmgr_psoc *psoc,
+		     struct scan_cache_entry *entry,
+		     qdf_list_t *scan_list)
+{
+	return cm_bss_mlo_type(psoc, entry, scan_list);
+}