From 1010dcfa743417597f8daee4145cfc286072b55d Mon Sep 17 00:00:00 2001 From: Ananya Barat Date: Wed, 5 Aug 2020 17:19:36 +0530 Subject: [PATCH] qcacmn: Fix unknown symbol error for 16M flash profile The 2 functions dfs_print_delayline and dfs_get_pri_margin are specific to Partial Offload and Direct Attach. Bringing them under the macros in order to resolve unknown symbol errors for 16M flash profile. Change-Id: I0ca1514e37ba54083a9f614825dda4f31a95e7ea --- umac/dfs/core/src/dfs.h | 17 +++++++++++++++++ umac/dfs/core/src/dfs_zero_cac.h | 4 ++-- umac/dfs/core/src/filtering/dfs_debug.c | 4 +++- umac/dfs/core/src/filtering/dfs_misc.c | 4 +++- 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/umac/dfs/core/src/dfs.h b/umac/dfs/core/src/dfs.h index 0d056b9b00da..3a60a61aeb46 100644 --- a/umac/dfs/core/src/dfs.h +++ b/umac/dfs/core/src/dfs.h @@ -1761,8 +1761,15 @@ int dfs_get_random_bin5_dur(struct wlan_dfs *dfs, * @dfs: Pointer to wlan_dfs structure. * @dl: Pointer to dfs_delayline structure. */ +#if defined(WLAN_DFS_DIRECT_ATTACH) || defined(WLAN_DFS_PARTIAL_OFFLOAD) void dfs_print_delayline(struct wlan_dfs *dfs, struct dfs_delayline *dl); +#else +static inline +void dfs_print_delayline(struct wlan_dfs *dfs, struct dfs_delayline *dl) +{ +} +#endif /** * dfs_print_nol() - Print NOL elements. @@ -1906,9 +1913,19 @@ int dfs_staggered_check(struct wlan_dfs *dfs, * * Return: Returns pri_margin. */ +#if defined(WLAN_DFS_DIRECT_ATTACH) || defined(WLAN_DFS_PARTIAL_OFFLOAD) int dfs_get_pri_margin(struct wlan_dfs *dfs, int is_extchan_detect, int is_fixed_pattern); +#else +static inline +int dfs_get_pri_margin(struct wlan_dfs *dfs, + int is_extchan_detect, + int is_fixed_pattern) +{ + return 0; +} +#endif /** * dfs_get_filter_threshold() - Get filter threshold. diff --git a/umac/dfs/core/src/dfs_zero_cac.h b/umac/dfs/core/src/dfs_zero_cac.h index a88aee9d1772..5d50fabe15ad 100644 --- a/umac/dfs/core/src/dfs_zero_cac.h +++ b/umac/dfs/core/src/dfs_zero_cac.h @@ -164,7 +164,7 @@ struct dfs_precac_entry { * dfs_zero_cac_timer_init() - Initialize zero-cac timers * @dfs_soc_obj: Pointer to DFS SOC object structure. */ -#if !defined(QCA_MCL_DFS_SUPPORT) +#if defined(ATH_SUPPORT_ZERO_CAC_DFS) && !defined(QCA_MCL_DFS_SUPPORT) void dfs_zero_cac_timer_init(struct dfs_soc_priv_obj *dfs_soc_obj); #else static inline void @@ -308,7 +308,7 @@ static inline void dfs_zero_cac_reset(struct wlan_dfs *dfs) * dfs_zero_cac_timer_detach() - Free Zero cac DFS variables. * @dfs_soc_obj: Pointer to dfs_soc_priv_obj structure. */ -#if !defined(QCA_MCL_DFS_SUPPORT) +#if defined(ATH_SUPPORT_ZERO_CAC_DFS) && !defined(QCA_MCL_DFS_SUPPORT) void dfs_zero_cac_timer_detach(struct dfs_soc_priv_obj *dfs_soc_obj); #else static inline void diff --git a/umac/dfs/core/src/filtering/dfs_debug.c b/umac/dfs/core/src/filtering/dfs_debug.c index 6b42b529eafd..db94abc8f3b9 100644 --- a/umac/dfs/core/src/filtering/dfs_debug.c +++ b/umac/dfs/core/src/filtering/dfs_debug.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2013, 2016-2020 The Linux Foundation. All rights reserved. * Copyright (c) 2002-2010, Atheros Communications Inc. * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -20,6 +20,7 @@ #include "../dfs.h" #include "wlan_dfs_lmac_api.h" +#if defined(WLAN_DFS_DIRECT_ATTACH) || defined(WLAN_DFS_PARTIAL_OFFLOAD) void dfs_print_delayline(struct wlan_dfs *dfs, struct dfs_delayline *dl) { int i = 0, index; @@ -38,6 +39,7 @@ void dfs_print_delayline(struct wlan_dfs *dfs, struct dfs_delayline *dl) index = (index + 1) & DFS_MAX_DL_MASK; } } +#endif void dfs_print_filter(struct wlan_dfs *dfs, struct dfs_filter *rf) { diff --git a/umac/dfs/core/src/filtering/dfs_misc.c b/umac/dfs/core/src/filtering/dfs_misc.c index 64602df3ad81..322f86140d8e 100644 --- a/umac/dfs/core/src/filtering/dfs_misc.c +++ b/umac/dfs/core/src/filtering/dfs_misc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2017,2020 The Linux Foundation. All rights reserved. * Copyright (c) 2002-2010, Atheros Communications Inc. * * Permission to use, copy, modify, and/or distribute this software for any @@ -95,6 +95,7 @@ static inline void dfs_get_cached_ext_chan_busy( } } +#if defined(WLAN_DFS_DIRECT_ATTACH) || defined(WLAN_DFS_PARTIAL_OFFLOAD) int dfs_get_pri_margin(struct wlan_dfs *dfs, int is_extchan_detect, int is_fixed_pattern) @@ -123,6 +124,7 @@ int dfs_get_pri_margin(struct wlan_dfs *dfs, return pri_margin; } +#endif int dfs_get_filter_threshold(struct wlan_dfs *dfs, struct dfs_filter *rf,