qcacld-3.0: Fetch max num of active links
Fetch max num of active links recommended by AP from beacon ie in case of ML connection. CRs-Fixed: 3599428 Change-Id: I82581cbf7b3f6c6ac7f1b31040dad178a3fad27d
This commit is contained in:

committed by
Rahul Choudhary

parent
1602c40aa7
commit
ec2ac22c08
11
Kbuild
11
Kbuild
@@ -4657,6 +4657,17 @@ CONFIG_WLAN_MAX_ML_DEFAULT_LINK ?= 1
|
|||||||
endif
|
endif
|
||||||
ccflags-y += -DWLAN_MAX_ML_DEFAULT_LINK=$(CONFIG_WLAN_MAX_ML_DEFAULT_LINK)
|
ccflags-y += -DWLAN_MAX_ML_DEFAULT_LINK=$(CONFIG_WLAN_MAX_ML_DEFAULT_LINK)
|
||||||
|
|
||||||
|
ifdef CONFIG_WLAN_FEATURE_11BE_MLO
|
||||||
|
ifndef CONFIG_WLAN_DEFAULT_REC_LINK_VALUE
|
||||||
|
CONFIG_WLAN_DEFAULT_REC_LINK_VALUE ?= 2
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
ifndef CONFIG_WLAN_DEFAULT_REC_LINK_VALUE
|
||||||
|
CONFIG_WLAN_DEFAULT_REC_LINK_VALUE ?= 2
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
ccflags-y += -DWLAN_DEFAULT_REC_LINK_VALUE=$(CONFIG_WLAN_DEFAULT_REC_LINK_VALUE)
|
||||||
|
|
||||||
ifdef CONFIG_WLAN_FEATURE_11BE_MLO
|
ifdef CONFIG_WLAN_FEATURE_11BE_MLO
|
||||||
CONFIG_WLAN_MAX_ML_BSS_LINKS ?= 3
|
CONFIG_WLAN_MAX_ML_BSS_LINKS ?= 3
|
||||||
else
|
else
|
||||||
|
@@ -2891,6 +2891,20 @@
|
|||||||
#define WLAN_MAX_ML_DEFAULT_LINK CONFIG_WLAN_MAX_ML_DEFAULT_LINK
|
#define WLAN_MAX_ML_DEFAULT_LINK CONFIG_WLAN_MAX_ML_DEFAULT_LINK
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_WLAN_FEATURE_11BE_MLO
|
||||||
|
#ifndef CONFIG_WLAN_DEFAULT_REC_LINK_VALUE
|
||||||
|
#define CONFIG_WLAN_DEFAULT_REC_LINK_VALUE (2)
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#ifndef CONFIG_WLAN_DEFAULT_REC_LINK_VALUE
|
||||||
|
#define CONFIG_WLAN_DEFAULT_REC_LINK_VALUE (2)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_WLAN_DEFAULT_REC_LINK_VALUE
|
||||||
|
#define WLAN_DEFAULT_REC_LINK_VALUE CONFIG_WLAN_DEFAULT_REC_LINK_VALUE
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_WLAN_FEATURE_11BE_MLO
|
#ifdef CONFIG_WLAN_FEATURE_11BE_MLO
|
||||||
#ifndef CONFIG_WLAN_MAX_ML_BSS_LINKS
|
#ifndef CONFIG_WLAN_MAX_ML_BSS_LINKS
|
||||||
#define CONFIG_WLAN_MAX_ML_BSS_LINKS (3)
|
#define CONFIG_WLAN_MAX_ML_BSS_LINKS (3)
|
||||||
|
@@ -51,6 +51,9 @@
|
|||||||
#endif
|
#endif
|
||||||
#include "wlan_t2lm_api.h"
|
#include "wlan_t2lm_api.h"
|
||||||
|
|
||||||
|
/*Invalid Recommended Max Simultaneous Links value */
|
||||||
|
#define RESERVED_REC_LINK_VALUE 1
|
||||||
|
|
||||||
#ifdef WLAN_FEATURE_11BE_MLO
|
#ifdef WLAN_FEATURE_11BE_MLO
|
||||||
|
|
||||||
void lim_process_bcn_prb_rsp_t2lm(struct mac_context *mac_ctx,
|
void lim_process_bcn_prb_rsp_t2lm(struct mac_context *mac_ctx,
|
||||||
@@ -82,6 +85,14 @@ void lim_process_bcn_prb_rsp_t2lm(struct mac_context *mac_ctx,
|
|||||||
wlan_update_t2lm_mapping(vdev, &bcn_ptr->t2lm_ctx, t2lm_ctx->tsf);
|
wlan_update_t2lm_mapping(vdev, &bcn_ptr->t2lm_ctx, t2lm_ctx->tsf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static uint8_t valid_max_rec_links(uint8_t value)
|
||||||
|
{
|
||||||
|
if (value > RESERVED_REC_LINK_VALUE &&
|
||||||
|
value <= WLAN_DEFAULT_REC_LINK_VALUE)
|
||||||
|
return value;
|
||||||
|
return WLAN_DEFAULT_REC_LINK_VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
void lim_process_beacon_mlo(struct mac_context *mac_ctx,
|
void lim_process_beacon_mlo(struct mac_context *mac_ctx,
|
||||||
struct pe_session *session,
|
struct pe_session *session,
|
||||||
tSchBeaconStruct *bcn_ptr)
|
tSchBeaconStruct *bcn_ptr)
|
||||||
@@ -102,6 +113,7 @@ void lim_process_beacon_mlo(struct mac_context *mac_ctx,
|
|||||||
uint8_t is_sta_csa_synced;
|
uint8_t is_sta_csa_synced;
|
||||||
struct mlo_link_info *link_info;
|
struct mlo_link_info *link_info;
|
||||||
uint8_t sta_info_len = 0;
|
uint8_t sta_info_len = 0;
|
||||||
|
uint8_t tmp_rec_value;
|
||||||
|
|
||||||
if (!session || !bcn_ptr || !mac_ctx) {
|
if (!session || !bcn_ptr || !mac_ctx) {
|
||||||
pe_err("invalid input parameters");
|
pe_err("invalid input parameters");
|
||||||
@@ -127,6 +139,12 @@ void lim_process_beacon_mlo(struct mac_context *mac_ctx,
|
|||||||
pe_debug("EMLSR not supported with D2.0 AP");
|
pe_debug("EMLSR not supported with D2.0 AP");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** max num of active links recommended by AP */
|
||||||
|
tmp_rec_value =
|
||||||
|
bcn_ptr->mlo_ie.mlo_ie.ext_mld_capab_and_op_info.rec_max_simultaneous_links;
|
||||||
|
mlo_ctx->mlo_max_recom_simult_links =
|
||||||
|
valid_max_rec_links(tmp_rec_value);
|
||||||
|
|
||||||
for (i = 0; i < bcn_ptr->mlo_ie.mlo_ie.num_sta_profile; i++) {
|
for (i = 0; i < bcn_ptr->mlo_ie.mlo_ie.num_sta_profile; i++) {
|
||||||
csa_ie = NULL;
|
csa_ie = NULL;
|
||||||
xcsa_ie = NULL;
|
xcsa_ie = NULL;
|
||||||
|
@@ -9372,6 +9372,9 @@ void lim_extract_ml_info(struct pe_session *session,
|
|||||||
ml_link->vdev_id = wlan_vdev_get_id(session->vdev);
|
ml_link->vdev_id = wlan_vdev_get_id(session->vdev);
|
||||||
ml_link->link_id = wlan_vdev_get_link_id(session->vdev);
|
ml_link->link_id = wlan_vdev_get_link_id(session->vdev);
|
||||||
|
|
||||||
|
ml_link->rec_max_simultaneous_links =
|
||||||
|
session->vdev->mlo_dev_ctx->mlo_max_recom_simult_links;
|
||||||
|
|
||||||
link_info = mlo_mgr_get_ap_link_by_link_id(session->vdev->mlo_dev_ctx,
|
link_info = mlo_mgr_get_ap_link_by_link_id(session->vdev->mlo_dev_ctx,
|
||||||
ml_link->link_id);
|
ml_link->link_id);
|
||||||
if (!link_info)
|
if (!link_info)
|
||||||
|
@@ -5281,6 +5281,8 @@ sir_convert_beacon_frame2_mlo_struct(uint8_t *pframe, uint32_t nframe,
|
|||||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||||
uint8_t bpcc;
|
uint8_t bpcc;
|
||||||
bool bpcc_found;
|
bool bpcc_found;
|
||||||
|
bool ext_mld_cap_found = false;
|
||||||
|
uint16_t ext_mld_cap = 0;
|
||||||
|
|
||||||
if (bcn_frm->mlo_ie.present) {
|
if (bcn_frm->mlo_ie.present) {
|
||||||
status = util_find_mlie(pframe + WLAN_BEACON_IES_OFFSET,
|
status = util_find_mlie(pframe + WLAN_BEACON_IES_OFFSET,
|
||||||
@@ -5304,6 +5306,17 @@ sir_convert_beacon_frame2_mlo_struct(uint8_t *pframe, uint32_t nframe,
|
|||||||
ml_ie_total_len,
|
ml_ie_total_len,
|
||||||
&bcn_struct->mlo_ie.mlo_ie);
|
&bcn_struct->mlo_ie.mlo_ie);
|
||||||
|
|
||||||
|
util_get_bvmlie_ext_mld_cap_op_info(ml_ie,
|
||||||
|
ml_ie_total_len,
|
||||||
|
&ext_mld_cap_found,
|
||||||
|
&ext_mld_cap);
|
||||||
|
if (ext_mld_cap_found) {
|
||||||
|
bcn_struct->mlo_ie.mlo_ie.ext_mld_capab_and_op_info.rec_max_simultaneous_links =
|
||||||
|
QDF_GET_BITS(
|
||||||
|
ext_mld_cap,
|
||||||
|
WLAN_ML_BV_CINFO_EXTMLDCAPINFO_RECOM_MAX_SIMULT_LINKS_IDX,
|
||||||
|
WLAN_ML_BV_CINFO_EXTMLDCAPINFO_RECOM_MAX_SIMULT_LINKS_BITS);
|
||||||
|
}
|
||||||
util_get_bvmlie_bssparamchangecnt(ml_ie,
|
util_get_bvmlie_bssparamchangecnt(ml_ie,
|
||||||
ml_ie_total_len,
|
ml_ie_total_len,
|
||||||
&bpcc_found, &bpcc);
|
&bpcc_found, &bpcc);
|
||||||
|
@@ -159,6 +159,7 @@ struct peer_ml_info {
|
|||||||
struct qdf_mac_addr self_mac_addr;
|
struct qdf_mac_addr self_mac_addr;
|
||||||
uint8_t num_links;
|
uint8_t num_links;
|
||||||
struct ml_partner_link_info partner_info[MLD_MAX_LINKS - 1];
|
struct ml_partner_link_info partner_info[MLD_MAX_LINKS - 1];
|
||||||
|
uint8_t rec_max_simultaneous_links;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -1158,6 +1158,9 @@ static void wma_populate_peer_mlo_cap(struct peer_assoc_params *peer,
|
|||||||
qdf_mem_copy(&mlo_params->mac_addr, &ml_info->self_mac_addr,
|
qdf_mem_copy(&mlo_params->mac_addr, &ml_info->self_mac_addr,
|
||||||
QDF_MAC_ADDR_SIZE);
|
QDF_MAC_ADDR_SIZE);
|
||||||
|
|
||||||
|
mlo_params->rec_max_simultaneous_links =
|
||||||
|
ml_info->rec_max_simultaneous_links;
|
||||||
|
|
||||||
/* Fill partner link info */
|
/* Fill partner link info */
|
||||||
ml_links->num_links = ml_info->num_links;
|
ml_links->num_links = ml_info->num_links;
|
||||||
for (i = 0; i < ml_links->num_links; i++) {
|
for (i = 0; i < ml_links->num_links; i++) {
|
||||||
|
Reference in New Issue
Block a user