From bb0b78c688beb11d74e3fd308938655f16b17052 Mon Sep 17 00:00:00 2001 From: Liangwei Dong Date: Thu, 6 Feb 2020 20:18:39 +0800 Subject: [PATCH] qcacmn: Set dfs_set_cfreq2 with correct DFS flag In MCL code, QCA_DFS_NOL_OFFLOAD is no defined, which causes the utils_is_dfs_cfreq2_ch always return "false". In function vdev_mgr_start_param_update the "dfs_set_cfreq2" needs to be set correct dfs flag from utils_is_dfs_cfreq2_ch so that vdev start wmi command will include correct DFS flag - WMI_CHAN_FLAG_DFS_CFREQ2 for AP home channel. Move utils_is_dfs_cfreq2_ch function out of WLAN_DFS_FULL_OFFLOAD and QCA_DFS_NOL_OFFLOAD build flag. Change-Id: I341db02c4db3ad3b21d8b2c115b2baffc3df3164 CRs-Fixed: 2619273 --- umac/dfs/dispatcher/inc/wlan_dfs_utils_api.h | 8 -------- umac/dfs/dispatcher/src/wlan_dfs_utils_api.c | 4 ++-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/umac/dfs/dispatcher/inc/wlan_dfs_utils_api.h b/umac/dfs/dispatcher/inc/wlan_dfs_utils_api.h index 48f9bbe485c6..d074bb688316 100644 --- a/umac/dfs/dispatcher/inc/wlan_dfs_utils_api.h +++ b/umac/dfs/dispatcher/inc/wlan_dfs_utils_api.h @@ -653,15 +653,7 @@ static inline bool utils_is_dfs_chan_for_freq(struct wlan_objmgr_pdev *pdev, * * Return: True if channel dfs cfreq2, else false. */ -#if defined(WLAN_DFS_FULL_OFFLOAD) && defined(QCA_DFS_NOL_OFFLOAD) bool utils_is_dfs_cfreq2_ch(struct wlan_objmgr_pdev *pdev); -#else -static inline -bool utils_is_dfs_cfreq2_ch(struct wlan_objmgr_pdev *pdev) -{ - return false; -} -#endif /** * utils_dfs_reg_update_nol_ch() - set nol channel diff --git a/umac/dfs/dispatcher/src/wlan_dfs_utils_api.c b/umac/dfs/dispatcher/src/wlan_dfs_utils_api.c index 337c2b1da9dc..d95a3eaae805 100644 --- a/umac/dfs/dispatcher/src/wlan_dfs_utils_api.c +++ b/umac/dfs/dispatcher/src/wlan_dfs_utils_api.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. * * * Permission to use, copy, modify, and/or distribute this software for @@ -1586,6 +1586,7 @@ QDF_STATUS utils_dfs_get_disable_radar_marking(struct wlan_objmgr_pdev *pdev, } qdf_export_symbol(utils_dfs_get_disable_radar_marking); +#endif bool utils_is_dfs_cfreq2_ch(struct wlan_objmgr_pdev *pdev) { @@ -1599,7 +1600,6 @@ bool utils_is_dfs_cfreq2_ch(struct wlan_objmgr_pdev *pdev) } qdf_export_symbol(utils_is_dfs_cfreq2_ch); -#endif void utils_dfs_deliver_event(struct wlan_objmgr_pdev *pdev, uint16_t freq, enum WLAN_DFS_EVENTS event)