From 61d5bec36f68515bee1053124b6082f2ad9f4492 Mon Sep 17 00:00:00 2001 From: bings Date: Tue, 27 Jun 2017 14:13:40 +0800 Subject: [PATCH] qcacld-3.0: Do not assign ht_sec_ch with sec_ch_offset Supplicant reports ACS failed, if driver indicates invalid ht_sec_ch. Do not assign ht_sec_ch with sec_ch_offset, because they are not the same thing. Change-Id: I8fb2a42973b67bb045d385b1fd90ee32917450ea CRs-Fixed: 2067092 --- core/hdd/src/wlan_hdd_hostapd.c | 13 ++++++++++++- core/sap/src/sap_fsm.c | 3 +-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 75d4994f28a7..fe8d78ce7740 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -1074,6 +1074,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, QDF_STATUS status = QDF_STATUS_SUCCESS; struct hdd_chan_change_params chan_change; int ret = 0; + struct ch_params sap_ch_param = {0}; dev = (struct net_device *)usrDataForCallback; if (!dev) { @@ -1984,13 +1985,23 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, if (pHostapdAdapter->device_mode == QDF_SAP_MODE && pHddCtx->config->force_sap_acs) return QDF_STATUS_SUCCESS; + sap_ch_param.ch_width = + pSapEvent->sapevt.sap_ch_selected.ch_width; + sap_ch_param.center_freq_seg0 = + pSapEvent->sapevt.sap_ch_selected.vht_seg0_center_ch; + sap_ch_param.center_freq_seg1 = + pSapEvent->sapevt.sap_ch_selected.vht_seg1_center_ch; + wlan_reg_set_channel_params(pHddCtx->hdd_pdev, + pSapEvent->sapevt.sap_ch_selected.pri_ch, + pSapEvent->sapevt.sap_ch_selected.ht_sec_ch, + &sap_ch_param); chan_change.chan = pSapEvent->sapevt.sap_ch_selected.pri_ch; chan_change.chan_params.ch_width = pSapEvent->sapevt.sap_ch_selected.ch_width; chan_change.chan_params.sec_ch_offset = - pSapEvent->sapevt.sap_ch_selected.ht_sec_ch; + sap_ch_param.sec_ch_offset; chan_change.chan_params.center_freq_seg0 = pSapEvent->sapevt.sap_ch_selected.vht_seg0_center_ch; chan_change.chan_params.center_freq_seg1 = diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index 3ba60905c009..760d1a3a0527 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -2600,8 +2600,7 @@ QDF_STATUS sap_signal_hdd_event(ptSapContext sap_ctx, acs_selected = &sap_ap_event.sapevt.sap_ch_selected; acs_selected->pri_ch = sap_ctx->acs_cfg->pri_ch; - acs_selected->ht_sec_ch = - sap_ctx->csr_roamProfile.ch_params.sec_ch_offset; + acs_selected->ht_sec_ch = sap_ctx->acs_cfg->ht_sec_ch; acs_selected->ch_width = sap_ctx->csr_roamProfile.ch_params.ch_width; acs_selected->vht_seg0_center_ch =