diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index 04a67b7594de..ec5980a8f19c 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -1340,7 +1340,7 @@ struct switch_channel_ind { uint16_t messageType; /* eWNI_SME_SWITCH_CHL_IND */ uint16_t length; uint8_t sessionId; - uint16_t newChannelId; + uint32_t freq; struct ch_params chan_params; struct qdf_mac_addr bssid; /* BSSID */ QDF_STATUS status; diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index 86e0e7b4c36c..679997cafa79 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -2203,8 +2203,10 @@ void lim_switch_channel_cback(struct mac_context *mac, QDF_STATUS status, pSirSmeSwitchChInd->messageType = eWNI_SME_SWITCH_CHL_IND; pSirSmeSwitchChInd->length = sizeof(*pSirSmeSwitchChInd); - pSirSmeSwitchChInd->newChannelId = - pe_session->gLimChannelSwitch.primaryChannel; + pSirSmeSwitchChInd->freq = + wlan_reg_chan_to_freq(mac->pdev, + pe_session-> + gLimChannelSwitch.primaryChannel); pSirSmeSwitchChInd->sessionId = pe_session->smeSessionId; pSirSmeSwitchChInd->chan_params.ch_width = pe_session->gLimChannelSwitch.ch_width; @@ -2217,9 +2219,9 @@ void lim_switch_channel_cback(struct mac_context *mac, QDF_STATUS status, pSirSmeSwitchChInd->status = status; pe_debug( - "session: %d chan: %d width: %d sec offset: %d seg0: %d seg1: %d status %d", + "session: %d freq: %d width: %d sec offset: %d seg0: %d seg1: %d status %d", pSirSmeSwitchChInd->sessionId, - pSirSmeSwitchChInd->newChannelId, + pSirSmeSwitchChInd->freq, pSirSmeSwitchChInd->chan_params.ch_width, pSirSmeSwitchChInd->chan_params.sec_ch_offset, pSirSmeSwitchChInd->chan_params.center_freq_seg0, diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 383a5185ca8a..a7934cd229e0 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -11574,10 +11574,11 @@ csr_roam_chk_lnk_swt_ch_ind(struct mac_context *mac_ctx, tSirSmeRsp *msg_ptr) return; } session->connectedProfile.operationChannel = - (uint8_t) pSwitchChnInd->newChannelId; + wlan_reg_freq_to_chan(mac_ctx->pdev, pSwitchChnInd->freq); if (session->pConnectBssDesc) { session->pConnectBssDesc->channelId = - (uint8_t) pSwitchChnInd->newChannelId; + wlan_reg_freq_to_chan(mac_ctx->pdev, + pSwitchChnInd->freq); ie_len = csr_get_ielen_from_bss_description( session->pConnectBssDesc); @@ -11587,7 +11588,8 @@ csr_roam_chk_lnk_swt_ch_ind(struct mac_context *mac_ctx, tSirSmeRsp *msg_ptr) ie_len); if (ds_params_ie) ds_params_ie->channelNumber = - (uint8_t)pSwitchChnInd->newChannelId; + wlan_reg_freq_to_chan(mac_ctx->pdev, + pSwitchChnInd->freq); ht_info_ie = (tDot11fIEHTInfo *)wlan_get_ie_ptr_from_eid( DOT11F_EID_HTINFO, @@ -11595,7 +11597,8 @@ csr_roam_chk_lnk_swt_ch_ind(struct mac_context *mac_ctx, tSirSmeRsp *msg_ptr) ie_len); if (ht_info_ie) { ht_info_ie->primaryChannel = - (uint8_t)pSwitchChnInd->newChannelId; + wlan_reg_freq_to_chan(mac_ctx->pdev, + pSwitchChnInd->freq); ht_info_ie->secondaryChannelOffset = pSwitchChnInd->chan_params.sec_ch_offset; } @@ -11604,7 +11607,8 @@ csr_roam_chk_lnk_swt_ch_ind(struct mac_context *mac_ctx, tSirSmeRsp *msg_ptr) roam_info = qdf_mem_malloc(sizeof(*roam_info)); if (!roam_info) return; - roam_info->chan_info.chan_id = pSwitchChnInd->newChannelId; + roam_info->chan_info.chan_id = + wlan_reg_freq_to_chan(mac_ctx->pdev, pSwitchChnInd->freq); roam_info->chan_info.ch_width = pSwitchChnInd->chan_params.ch_width; roam_info->chan_info.sec_ch_offset = pSwitchChnInd->chan_params.sec_ch_offset;