diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index b647b91ed096..8d6e816ef343 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -2296,6 +2296,10 @@ static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx, &sap_ctx->csr_roamProfile.operationChannel; sap_ctx->csr_roamProfile.operationChannel = (uint8_t)sap_ctx->channel; + sap_ctx->csr_roamProfile.op_freq = + wlan_reg_chan_to_freq(mac_ctx->pdev, + (uint8_t)sap_ctx->channel); + sap_ctx->csr_roamProfile.ch_params.ch_width = sap_ctx->ch_params.ch_width; sap_ctx->csr_roamProfile.ch_params.center_freq_seg0 = diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h index d7d70a9e095a..829ab61fa753 100644 --- a/core/sme/inc/csr_api.h +++ b/core/sme/inc/csr_api.h @@ -762,6 +762,7 @@ struct csr_roam_profile { tCsrKeys Keys; tCsrChannelInfo ChannelInfo; uint8_t operationChannel; + uint32_t op_freq; struct ch_params ch_params; /* If this is 0, SME will fill in for caller. */ uint16_t beaconInterval; diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 87837c2a5834..72bd40a746a3 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -14146,7 +14146,7 @@ void csr_roam_prepare_bss_params(struct mac_context *mac, uint32_t sessionId, struct bss_config_param *pBssConfig, tDot11fBeaconIEs *pIes) { - uint8_t Channel; + uint8_t channel; ePhyChanBondState cbMode = PHY_SINGLE_CHANNEL_CENTERED; struct csr_roam_session *pSession = CSR_GET_SESSION(mac, sessionId); bool skip_hostapd_rate = !pProfile->chan_switch_hostapd_rate_enabled; @@ -14181,20 +14181,21 @@ void csr_roam_prepare_bss_params(struct mac_context *mac, uint32_t sessionId, qdf_mem_zero(&pSession->bssParams.bssid, sizeof(struct qdf_mac_addr)); } - Channel = pSession->bssParams.operationChn; + channel = pSession->bssParams.operationChn; /* Set operating channel in pProfile which will be used */ /* in csr_roam_set_bss_config_cfg() to determine channel bonding */ /* mode and will be configured in CFG later */ - pProfile->operationChannel = Channel; + pProfile->operationChannel = channel; + pProfile->op_freq = wlan_reg_chan_to_freq(mac->pdev, channel); - if (Channel == 0) + if (channel == 0) sme_err("CSR cannot find a channel to start IBSS"); else { csr_roam_determine_max_rate_for_ad_hoc(mac, &pSession->bssParams. operationalRateSet); if (CSR_IS_INFRA_AP(pProfile) || CSR_IS_START_IBSS(pProfile)) { - if (WLAN_REG_IS_24GHZ_CH(Channel)) { + if (WLAN_REG_IS_24GHZ_CH(channel)) { cbMode = mac->roam.configParam. channelBondingMode24GHz;