Эх сурвалжийг харах

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
Ananya Barat 4 жил өмнө
parent
commit
1010dcfa74

+ 17 - 0
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.

+ 2 - 2
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

+ 3 - 1
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)
 {

+ 3 - 1
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,