diff --git a/core/mac/src/pe/lim/lim_mlo.c b/core/mac/src/pe/lim/lim_mlo.c index d1e6ccd135..d5c502b811 100644 --- a/core/mac/src/pe/lim/lim_mlo.c +++ b/core/mac/src/pe/lim/lim_mlo.c @@ -1192,3 +1192,29 @@ end: wlan_objmgr_peer_release_ref(peer, WLAN_LEGACY_MAC_ID); return is_ml_peer_disconn; } + +bool lim_is_emlsr_band_supported(struct pe_session *session) +{ + uint8_t i; + uint32_t freq; + struct mlo_partner_info *partner_info; + + partner_info = &session->lim_join_req->partner_info; + + if (wlan_reg_is_24ghz_ch_freq(session->curr_op_freq)) { + pe_debug("Pri link freq: %d, EMLSR mode not allowed", + session->curr_op_freq); + return false; + } + + for (i = 0; i < partner_info->num_partner_links; i++) { + freq = partner_info->partner_link_info[i].chan_freq; + if (wlan_reg_is_24ghz_ch_freq(freq)) { + pe_debug("Partner link freq: %d, EMLSR mode not allwed", + freq); + return false; + } + } + + return true; +} diff --git a/core/mac/src/pe/lim/lim_mlo.h b/core/mac/src/pe/lim/lim_mlo.h index c26e6965b9..edacdd8c78 100644 --- a/core/mac/src/pe/lim/lim_mlo.h +++ b/core/mac/src/pe/lim/lim_mlo.h @@ -335,6 +335,8 @@ QDF_STATUS lim_store_mlo_ie_raw_info(uint8_t *ie, uint8_t *sta_prof_ie, bool lim_is_ml_peer_state_disconn(struct mac_context *mac_ctx, struct pe_session *session, uint8_t *mac_addr); + +bool lim_is_emlsr_band_supported(struct pe_session *session); #else static inline void lim_mlo_notify_peer_disconn(struct pe_session *pe_session, tpDphHashNode sta_ds) @@ -454,5 +456,11 @@ bool lim_is_ml_peer_state_disconn(struct mac_context *mac_ctx, { return false; } + +static inline +bool lim_is_emlsr_band_supported(struct pe_session *session) +{ + return false; +} #endif #endif diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c index fc04a51857..0e678f9f9d 100644 --- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c +++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c @@ -4022,6 +4022,8 @@ static void lim_fill_ml_info(struct cm_vdev_join_req *req, partner_info->partner_link_info[idx].link_id, QDF_MAC_ADDR_REF(partner_info->partner_link_info[idx]. link_addr.bytes)); + partner_info->partner_link_info[idx].chan_freq = + req->partner_info.partner_link_info[idx].chan_freq; } pe_join_req->assoc_link_id = req->assoc_link_id; } @@ -4029,7 +4031,7 @@ static void lim_fill_ml_info(struct cm_vdev_join_req *req, static void lim_set_emlsr_caps(struct mac_context *mac_ctx, struct pe_session *session) { - bool emlsr_cap, emlsr_allowed, emlsr_enabled = false; + bool emlsr_cap, emlsr_allowed, emlsr_band_check, emlsr_enabled = false; /* Check if HW supports eMLSR mode */ emlsr_cap = policy_mgr_is_hw_emlsr_capable(mac_ctx->psoc); @@ -4039,7 +4041,10 @@ static void lim_set_emlsr_caps(struct mac_context *mac_ctx, /* Check if vendor command chooses eMLSR mode */ wlan_mlme_get_emlsr_mode_enabled(mac_ctx->psoc, &emlsr_enabled); - emlsr_allowed = emlsr_cap && emlsr_enabled; + /* Check if ML links are in 5 GHz + 6 GHz combination */ + emlsr_band_check = lim_is_emlsr_band_supported(session); + + emlsr_allowed = emlsr_cap && emlsr_enabled && emlsr_band_check; if (emlsr_allowed) { wlan_vdev_obj_lock(session->vdev);