From 4e9afac0cfee17bf64d47599a1734f4bf35ca304 Mon Sep 17 00:00:00 2001 From: Arif Hussain Date: Tue, 25 Apr 2017 23:36:15 -0700 Subject: [PATCH] qcacld-3.0: Use dfs api to convert chan to freq MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit center frequency of 40/80/160 are not valid frequency for regulatory component, so regulatory api's may not covert freq to channel or chan to freq. use dfs api’s to covert the same. Change-Id: I3bb7d4997d0dbcbd757537fe3fee9ad5f7f97904 CRs-Fixed: 2017481 --- core/sap/src/sap_fsm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index 3ceccd60d628..38d113a04e8f 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -1209,10 +1209,10 @@ static void sap_get_cac_dur_dfs_region(ptSapContext sap_ctx, void sap_dfs_set_current_channel(void *ctx) { ptSapContext sap_ctx = (ptSapContext) ctx; - uint16_t ic_freq = 0; uint32_t ic_flags = 0; uint16_t ic_flagext = 0; uint8_t ic_ieee = sap_ctx->channel; + uint16_t ic_freq = utils_dfs_chan_to_freq(sap_ctx->channel); uint8_t vht_seg0 = sap_ctx->csr_roamProfile.ch_params.center_freq_seg0; uint8_t vht_seg1 = sap_ctx->csr_roamProfile.ch_params.center_freq_seg1; struct wlan_objmgr_pdev *pdev; @@ -1257,7 +1257,10 @@ void sap_dfs_set_current_channel(void *ctx) return; } - ic_freq = wlan_reg_chan_to_freq(pdev, sap_ctx->channel); + QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO, + FL("freq=%d, channel=%d, seg0=%d, seg1=%d, flags=%d"), + ic_freq, ic_ieee, vht_seg0, vht_seg1, ic_flags); + tgt_dfs_set_current_channel(pdev, ic_freq, ic_flags, ic_flagext, ic_ieee, vht_seg0, vht_seg1); }