diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c
index 36d2808b61..94817da668 100644
--- a/components/mlme/core/src/wlan_mlme_main.c
+++ b/components/mlme/core/src/wlan_mlme_main.c
@@ -1694,6 +1694,8 @@ static void mlme_init_sta_mlo_cfg(struct wlan_objmgr_psoc *psoc,
cfg_default(CFG_MLO_SUPPORT_LINK_NUM);
sta->mlo_support_link_band =
cfg_default(CFG_MLO_SUPPORT_LINK_BAND);
+ sta->mlo_max_simultaneous_links =
+ cfg_default(CFG_MLO_MAX_SIMULTANEOUS_LINKS);
}
#else
static void mlme_init_sta_mlo_cfg(struct wlan_objmgr_psoc *psoc,
diff --git a/components/mlme/dispatcher/inc/cfg_mlme_sta.h b/components/mlme/dispatcher/inc/cfg_mlme_sta.h
index 69209e29b9..7a75ca8506 100644
--- a/components/mlme/dispatcher/inc/cfg_mlme_sta.h
+++ b/components/mlme/dispatcher/inc/cfg_mlme_sta.h
@@ -564,6 +564,32 @@
#define CFG_MLO_SUPPORT_LINK_NUM_CFG CFG(CFG_MLO_SUPPORT_LINK_NUM)
+/*
+ *
+ * mlo_max_simultaneous_links- Set number of mlo simultaneous links for sta
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * This cfg is used to configure the mlo max simultaneous links
+ *
+ * Related: None
+ *
+ * Supported Feature: STA
+ *
+ * Usage: Internal
+ *
+ *
+ */
+#define CFG_MLO_MAX_SIMULTANEOUS_LINKS CFG_UINT( \
+ "mlo_max_simultaneous_links", \
+ 0, \
+ 1, \
+ 1, \
+ CFG_VALUE_OR_DEFAULT, \
+ "mlo max simultaneous links")
+
+#define CFG_MLO_MAX_SIMULTANEOUS_LINKS_CFG CFG(CFG_MLO_MAX_SIMULTANEOUS_LINKS)
/*
*
* mlo_support_link_band - Set band bitmap of mlo connection supports for sta
@@ -603,6 +629,7 @@
#else
#define CFG_MLO_SUPPORT_LINK_NUM_CFG
#define CFG_MLO_SUPPORT_LINK_BAND_CFG
+#define CFG_MLO_MAX_SIMULTANEOUS_LINKS_CFG
#endif
#define CFG_STA_ALL \
@@ -627,6 +654,7 @@
CFG(CFG_TX_POWER_CTRL) \
CFG(CFG_MAX_LI_MODULATED_DTIM_MS) \
CFG_MLO_SUPPORT_LINK_NUM_CFG \
+ CFG_MLO_MAX_SIMULTANEOUS_LINKS_CFG \
CFG_MLO_SUPPORT_LINK_BAND_CFG
#endif /* CFG_MLME_STA_H__ */
diff --git a/components/mlme/dispatcher/inc/wlan_mlme_api.h b/components/mlme/dispatcher/inc/wlan_mlme_api.h
index b343ccec59..9a0b96b0c6 100644
--- a/components/mlme/dispatcher/inc/wlan_mlme_api.h
+++ b/components/mlme/dispatcher/inc/wlan_mlme_api.h
@@ -3543,7 +3543,7 @@ uint8_t wlan_mlme_get_sta_mlo_conn_max_num(struct wlan_objmgr_psoc *psoc);
* Return: QDF Status
*/
QDF_STATUS wlan_mlme_set_sta_mlo_conn_max_num(struct wlan_objmgr_psoc *psoc,
- bool value);
+ uint8_t value);
/**
* wlan_mlme_get_sta_mlo_conn_band_bmp() - get band bitmap that sta mlo
@@ -3554,6 +3554,25 @@ QDF_STATUS wlan_mlme_set_sta_mlo_conn_max_num(struct wlan_objmgr_psoc *psoc,
*/
uint8_t wlan_mlme_get_sta_mlo_conn_band_bmp(struct wlan_objmgr_psoc *psoc);
+/**
+ * wlan_mlme_set_sta_mlo_simulataneous_links() - set mlo simulataneous links
+ * @psoc: pointer to psoc object
+ * @value: value to set
+ *
+ * Return: QDF Status
+ */
+QDF_STATUS
+wlan_mlme_set_sta_mlo_simulataneous_links(struct wlan_objmgr_psoc *psoc,
+ uint8_t value);
+
+/**
+ * wlan_mlme_get_sta_mlo_simultaneous_links() - get mlo simulataneous links
+ * @psoc: pointer to psoc object
+ *
+ * Return: number of links
+ */
+uint8_t wlan_mlme_get_sta_mlo_simultaneous_links(struct wlan_objmgr_psoc *psoc);
+
/**
* wlan_mlme_set_sta_mlo_conn_band_bmp() - set band bitmap that sta mlo
* connection can support
@@ -3563,7 +3582,7 @@ uint8_t wlan_mlme_get_sta_mlo_conn_band_bmp(struct wlan_objmgr_psoc *psoc);
* Return: QDF Status
*/
QDF_STATUS wlan_mlme_set_sta_mlo_conn_band_bmp(struct wlan_objmgr_psoc *psoc,
- bool value);
+ uint8_t value);
#endif
/**
diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
index 3d9e517e75..c39944dccb 100644
--- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
+++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
@@ -1669,6 +1669,7 @@ enum station_prefer_bw {
* @max_li_modulated_dtim_time_ms: Max modulated DTIM time in ms.
* @mlo_support_link_num: max number of links that sta mlo supports
* @mlo_support_link_band: band bitmap that sta mlo supports
+ * @mlo_max_simultaneous_links number of simulataneous links
*/
struct wlan_mlme_sta_cfg {
uint32_t sta_keep_alive_period;
@@ -1699,6 +1700,7 @@ struct wlan_mlme_sta_cfg {
#ifdef WLAN_FEATURE_11BE_MLO
uint8_t mlo_support_link_num;
uint8_t mlo_support_link_band;
+ uint8_t mlo_max_simultaneous_links;
#endif
};
diff --git a/components/mlme/dispatcher/src/wlan_mlme_api.c b/components/mlme/dispatcher/src/wlan_mlme_api.c
index 47730cc272..ae73bc3287 100644
--- a/components/mlme/dispatcher/src/wlan_mlme_api.c
+++ b/components/mlme/dispatcher/src/wlan_mlme_api.c
@@ -1074,6 +1074,33 @@ enum phy_ch_width wlan_mlme_convert_eht_op_bw_to_phy_ch_width(
#endif
#ifdef WLAN_FEATURE_11BE_MLO
+uint8_t wlan_mlme_get_sta_mlo_simultaneous_links(struct wlan_objmgr_psoc *psoc)
+{
+ struct wlan_mlme_psoc_ext_obj *mlme_obj;
+
+ mlme_obj = mlme_get_psoc_ext_obj(psoc);
+ if (!mlme_obj)
+ return false;
+
+ return mlme_obj->cfg.sta.mlo_max_simultaneous_links;
+}
+
+QDF_STATUS
+wlan_mlme_set_sta_mlo_simulataneous_links(struct wlan_objmgr_psoc *psoc,
+ uint8_t value)
+{
+ struct wlan_mlme_psoc_ext_obj *mlme_obj;
+
+ mlme_obj = mlme_get_psoc_ext_obj(psoc);
+ if (!mlme_obj)
+ return QDF_STATUS_E_FAILURE;
+
+ mlme_obj->cfg.sta.mlo_max_simultaneous_links = value;
+ mlme_legacy_debug("mlo_max_simultaneous_links %d", value);
+
+ return QDF_STATUS_SUCCESS;
+}
+
uint8_t wlan_mlme_get_sta_mlo_conn_max_num(struct wlan_objmgr_psoc *psoc)
{
struct wlan_mlme_psoc_ext_obj *mlme_obj;
@@ -1086,7 +1113,7 @@ uint8_t wlan_mlme_get_sta_mlo_conn_max_num(struct wlan_objmgr_psoc *psoc)
}
QDF_STATUS wlan_mlme_set_sta_mlo_conn_max_num(struct wlan_objmgr_psoc *psoc,
- bool value)
+ uint8_t value)
{
struct wlan_mlme_psoc_ext_obj *mlme_obj;
@@ -1095,6 +1122,7 @@ QDF_STATUS wlan_mlme_set_sta_mlo_conn_max_num(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_E_FAILURE;
mlme_obj->cfg.sta.mlo_support_link_num = value;
+ mlme_legacy_debug("mlo_support_link_num %d", value);
return QDF_STATUS_SUCCESS;
}
@@ -1111,7 +1139,7 @@ uint8_t wlan_mlme_get_sta_mlo_conn_band_bmp(struct wlan_objmgr_psoc *psoc)
}
QDF_STATUS wlan_mlme_set_sta_mlo_conn_band_bmp(struct wlan_objmgr_psoc *psoc,
- bool value)
+ uint8_t value)
{
struct wlan_mlme_psoc_ext_obj *mlme_obj;
@@ -1120,6 +1148,7 @@ QDF_STATUS wlan_mlme_set_sta_mlo_conn_band_bmp(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_E_FAILURE;
mlme_obj->cfg.sta.mlo_support_link_band = value;
+ mlme_legacy_debug("mlo_support_link_conn band %d", value);
return QDF_STATUS_SUCCESS;
}
diff --git a/core/mac/src/sys/legacy/src/utils/src/parser_api.c b/core/mac/src/sys/legacy/src/utils/src/parser_api.c
index 51e0d6415d..71fbfb2103 100644
--- a/core/mac/src/sys/legacy/src/utils/src/parser_api.c
+++ b/core/mac/src/sys/legacy/src/utils/src/parser_api.c
@@ -11025,7 +11025,10 @@ QDF_STATUS populate_dot11f_assoc_req_mlo_ie(struct mac_context *mac_ctx,
if (mlo_ie->mld_capab_and_op_present) {
presence_bitmap |= WLAN_ML_BV_CTRL_PBM_MLDCAPANDOP_P;
mlo_ie->common_info_length += WLAN_ML_BV_CINFO_MLDCAPANDOP_SIZE;
- mlo_ie->mld_capab_and_op_info.max_simultaneous_link_num = 1;
+ mlo_ie->mld_capab_and_op_info.max_simultaneous_link_num =
+ wlan_mlme_get_sta_mlo_simultaneous_links(psoc);
+ pe_debug("max_simultaneous_link_num %d",
+ mlo_ie->mld_capab_and_op_info.max_simultaneous_link_num);
mlo_ie->mld_capab_and_op_info.srs_support = 0;
mlo_ie->mld_capab_and_op_info.tid_link_map_supported = 0;
mlo_ie->mld_capab_and_op_info.str_freq_separation = 0;
diff --git a/core/sme/inc/sme_api.h b/core/sme/inc/sme_api.h
index 8443d06594..81df4a7115 100644
--- a/core/sme/inc/sme_api.h
+++ b/core/sme/inc/sme_api.h
@@ -3682,13 +3682,65 @@ void sme_set_eht_testbed_def(mac_handle_t mac_handle, uint8_t vdev_id);
* Return: None
*/
void sme_reset_eht_caps(mac_handle_t mac_handle, uint8_t vdev_id);
+
+/**
+ * sme_set_mlo_max_links() - set mlo max links
+ * @mac_handle: Opaque handle to the global MAC context
+ * @vdev_id: VDEV id
+ * @val: value to be set
+ *
+ * Return: None
+ */
+void sme_set_mlo_max_links(mac_handle_t mac_handle, uint8_t vdev_id,
+ uint8_t val);
+
+/**
+ * sme_set_mlo_max_simultaneous_links() - set mlo max simultaneous links
+ * @mac_handle: Opaque handle to the global MAC context
+ * @vdev_id: VDEV id
+ * @val: value to set
+ *
+ * Return: None
+ */
+void sme_set_mlo_max_simultaneous_links(mac_handle_t mac_handle,
+ uint8_t vdev_id, uint8_t val);
+
+/**
+ * sme_set_mlo_assoc_link_band() - set mlo assoc link band
+ * @mac_handle: Opaque handle to the global MAC context
+ * @vdev_id: VDEV id
+ * @val: value to be set
+ *
+ * Return: None
+ */
+void sme_set_mlo_assoc_link_band(mac_handle_t mac_handle, uint8_t vdev_id,
+ uint8_t val);
#else
static inline void sme_set_eht_testbed_def(mac_handle_t mac_handle,
uint8_t vdev_id)
{
}
-static inline void sme_reset_eht_caps(mac_handle_t mac_handle, uint8_t vdev_id)
+static inline
+void sme_reset_eht_caps(mac_handle_t mac_handle, uint8_t vdev_id)
+{
+}
+
+static inline
+void sme_set_mlo_max_links(mac_handle_t mac_handle, uint8_t vdev_id,
+ uint8_t val)
+{
+}
+
+static inline
+void sme_set_mlo_assoc_link_band(mac_handle_t mac_handle, uint8_t vdev_id,
+ uint8_t val)
+{
+}
+
+static inline
+void sme_set_mlo_max_simultaneous_links(mac_handle_t mac_handle,
+ uint8_t vdev_id, uint8_t val)
{
}
#endif
diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c
index cc2c0bf975..7d61065f75 100644
--- a/core/sme/src/common/sme_api.c
+++ b/core/sme/src/common/sme_api.c
@@ -14956,6 +14956,50 @@ void sme_reset_he_caps(mac_handle_t mac_handle, uint8_t vdev_id)
#endif
#ifdef WLAN_FEATURE_11BE
+void sme_set_mlo_max_links(mac_handle_t mac_handle, uint8_t vdev_id,
+ uint8_t val)
+{
+ struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
+ struct csr_roam_session *session;
+
+ session = CSR_GET_SESSION(mac_ctx, vdev_id);
+
+ if (!session) {
+ sme_err("No session for id %d", vdev_id);
+ return;
+ }
+ wlan_mlme_set_sta_mlo_conn_max_num(mac_ctx->psoc, val);
+}
+
+void sme_set_mlo_max_simultaneous_links(mac_handle_t mac_handle,
+ uint8_t vdev_id, uint8_t val)
+{
+ struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
+ struct csr_roam_session *session;
+
+ session = CSR_GET_SESSION(mac_ctx, vdev_id);
+ if (!session) {
+ sme_err("No session for id %d", vdev_id);
+ return;
+ }
+ wlan_mlme_set_sta_mlo_simulataneous_links(mac_ctx->psoc, val);
+}
+
+void sme_set_mlo_assoc_link_band(mac_handle_t mac_handle, uint8_t vdev_id,
+ uint8_t val)
+{
+ struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
+ struct csr_roam_session *session;
+
+ session = CSR_GET_SESSION(mac_ctx, vdev_id);
+
+ if (!session) {
+ sme_err("No session for id %d", vdev_id);
+ return;
+ }
+ wlan_mlme_set_sta_mlo_conn_band_bmp(mac_ctx->psoc, val);
+}
+
void sme_set_eht_testbed_def(mac_handle_t mac_handle, uint8_t vdev_id)
{
struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
@@ -15057,6 +15101,7 @@ void sme_set_eht_testbed_def(mac_handle_t mac_handle, uint8_t vdev_id)
mac_ctx->eht_cap_5g.bw_20_tx_max_nss_for_mcs_8_and_9 = 0;
mac_ctx->usr_eht_testbed_cfg = true;
mac_ctx->roam.configParam.channelBondingMode24GHz = 0;
+ wlan_mlme_set_sta_mlo_conn_max_num(mac_ctx->psoc, 1);
}
void sme_reset_eht_caps(mac_handle_t mac_handle, uint8_t vdev_id)
@@ -15084,6 +15129,8 @@ void sme_reset_eht_caps(mac_handle_t mac_handle, uint8_t vdev_id)
sizeof(tDot11fIEeht_cap));
mac_ctx->usr_eht_testbed_cfg = false;
mac_ctx->roam.configParam.channelBondingMode24GHz = 1;
+ wlan_mlme_set_sta_mlo_conn_band_bmp(mac_ctx->psoc, 0x77);
+ wlan_mlme_set_sta_mlo_conn_max_num(mac_ctx->psoc, 2);
}
#endif