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 0dfe2335fe17..17efd413d7d1 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 @@ -5007,6 +5007,7 @@ static void lim_process_sme_channel_change_request(struct mac_context *mac_ctx, uint8_t session_id; /* PE session_id */ int8_t max_tx_pwr; uint32_t target_freq; + bool is_curr_ch_2g, is_new_ch_2g, update_he_cap; if (!msg_buf) { pe_err("msg_buf is NULL"); @@ -5057,6 +5058,27 @@ static void lim_process_sme_channel_change_request(struct mac_context *mac_ctx, lim_is_session_he_capable(session_entry))) { lim_update_session_he_capable_chan_switch (mac_ctx, session_entry, target_freq); + is_new_ch_2g = wlan_reg_is_24ghz_ch_freq(target_freq); + is_curr_ch_2g = wlan_reg_is_24ghz_ch_freq( + session_entry->curr_op_freq); + if ((is_new_ch_2g && !is_curr_ch_2g) || + (!is_new_ch_2g && is_curr_ch_2g)) + update_he_cap = true; + else + update_he_cap = false; + if (!update_he_cap) { + if ((session_entry->ch_width != + ch_change_req->ch_width) && + (session_entry->ch_width > CH_WIDTH_80MHZ || + ch_change_req->ch_width > CH_WIDTH_80MHZ)) + update_he_cap = true; + } + if (update_he_cap) { + session_entry->curr_op_freq = target_freq; + session_entry->ch_width = ch_change_req->ch_width; + lim_copy_bss_he_cap(session_entry); + lim_update_he_bw_cap_mcs(session_entry, NULL); + } } else if (wlan_reg_is_6ghz_chan_freq(target_freq)) { pe_debug("Invalid target_freq %d for dot11mode %d cur HE %d", target_freq, ch_change_req->dot11mode, diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index cc2f5dcec3fa..7557afa6a5bc 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -6896,6 +6896,8 @@ void lim_update_usr_he_cap(struct mac_context *mac_ctx, struct pe_session *sessi uint8_t extracted_buff[DOT11F_IE_HE_CAP_MAX_LEN + 2]; QDF_STATUS status; struct sir_vht_config *vht_cfg = &session->vht_config; + struct mlme_legacy_priv *mlme_priv; + qdf_mem_zero(extracted_buff, sizeof(extracted_buff)); status = lim_strip_ie(mac_ctx, add_ie->probeRespBCNData_buff, &add_ie->probeRespBCNDataLen, @@ -6937,6 +6939,19 @@ void lim_update_usr_he_cap(struct mac_context *mac_ctx, struct pe_session *sessi vht_cfg->mu_beam_formee = 0; vht_cfg->csnof_beamformer_antSup = 0; } + + mlme_priv = wlan_vdev_mlme_get_ext_hdl(session->vdev); + if (mlme_priv) { + mlme_priv->he_config.mu_beamformer = he_cap->mu_beamformer; + mlme_priv->he_config.su_beamformer = he_cap->su_beamformer; + mlme_priv->he_config.su_beamformee = he_cap->su_beamformee; + mlme_priv->he_config.bfee_sts_lt_80 = he_cap->bfee_sts_lt_80; + mlme_priv->he_config.bfee_sts_gt_80 = he_cap->bfee_sts_gt_80; + mlme_priv->he_config.num_sounding_lt_80 = + he_cap->num_sounding_lt_80; + mlme_priv->he_config.num_sounding_gt_80 = + he_cap->num_sounding_gt_80; + } wma_set_he_txbf_params(session->vdev_id, he_cap->su_beamformer, he_cap->su_beamformee, he_cap->mu_beamformer); }