From 9462dd670dbf5bf4971890ac32ddc8a455249073 Mon Sep 17 00:00:00 2001 From: Liangwei Dong Date: Mon, 17 Feb 2020 12:14:21 +0800 Subject: [PATCH] qcacld-3.0: Fix incorrect channel change event The ch_params of sap_ctx->csr_roamProfile is not populated correctly during SAP channel switching. Fix it and send channel change event to supplicant with correct seg0/seg1 value. Change-Id: I7ef82c6e79b970edfee58d9960e8c6b42fa91ef8 CRs-Fixed: 2594973 --- core/sap/src/sap_fsm.c | 6 +++--- core/sap/src/sap_module.c | 8 +------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index f6c009c37710..c74610183a60 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -1719,11 +1719,11 @@ QDF_STATUS sap_signal_hdd_event(struct sap_context *sap_ctx, acs_selected->pri_ch_freq = sap_ctx->chan_freq; acs_selected->ht_sec_ch_freq = sap_ctx->sec_ch_freq; acs_selected->ch_width = - sap_ctx->csr_roamProfile.ch_params.ch_width; + sap_ctx->acs_cfg->ch_width; acs_selected->vht_seg0_center_ch_freq = - sap_ctx->csr_roamProfile.ch_params.mhz_freq_seg0; + sap_ctx->acs_cfg->vht_seg0_center_ch_freq; acs_selected->vht_seg1_center_ch_freq = - sap_ctx->csr_roamProfile.ch_params.mhz_freq_seg1; + sap_ctx->acs_cfg->vht_seg1_center_ch_freq; break; case eSAP_ECSA_CHANGE_CHAN_IND: diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c index 1b703267a58b..c2c3b530a364 100644 --- a/core/sap/src/sap_module.c +++ b/core/sap/src/sap_module.c @@ -1776,13 +1776,7 @@ QDF_STATUS wlansap_channel_change_request(struct sap_context *sap_ctx, sap_ctx->chan_freq = target_chan_freq; wlansap_get_sec_channel(ch_params->sec_ch_offset, sap_ctx->chan_freq, &sap_ctx->sec_ch_freq); - sap_ctx->csr_roamProfile.ch_params.ch_width = ch_params->ch_width; - sap_ctx->csr_roamProfile.ch_params.sec_ch_offset = - ch_params->sec_ch_offset; - sap_ctx->csr_roamProfile.ch_params.center_freq_seg0 = - ch_params->center_freq_seg0; - sap_ctx->csr_roamProfile.ch_params.center_freq_seg1 = - ch_params->center_freq_seg1; + sap_ctx->csr_roamProfile.ch_params = *ch_params; sap_dfs_set_current_channel(sap_ctx); wlansap_set_cac_required_for_chan(mac_ctx, sap_ctx);