Prechádzať zdrojové kódy

qca-wifi-oss: Fix compilation errors on disabling Agile DFS

Agile DFS can be disabled by disabling macro QCA_SUPPORT_AGILE_DFS.
Fix compilation errors on disabling Agile DFS.

Change-Id: I144a261f5e0db37bea9a0a6b372bcf1e13205bb6
Ananya Barat 5 rokov pred
rodič
commit
5c45da13be
1 zmenil súbory, kde vykonal 10 pridanie a 2 odobranie
  1. 10 2
      umac/dfs/core/src/misc/dfs_zero_cac.c

+ 10 - 2
umac/dfs/core/src/misc/dfs_zero_cac.c

@@ -261,6 +261,14 @@
 /* Given a bandwidth, find the number of subchannels in that bandwidth */
 #define N_SUBCHS_FOR_BANDWIDTH(_bw) ((_bw) / MIN_DFS_SUBCHAN_BW)
 
+#ifdef CONFIG_CHAN_FREQ_API
+#define DFS_160MHZ_SECSEG_CHAN_OFFSET 40
+#else
+#ifdef CONFIG_CHAN_NUM_API
+#define DFS_160MHZ_SECSEG_CHAN_OFFSET 8
+#endif
+#endif
+
  /*dfs_zero_cac_reset() - Reset zero cac variables.
   *@dfs: Pointer to wlan_dfs
   */
@@ -315,10 +323,12 @@ bool dfs_is_legacy_precac_enabled(struct wlan_dfs *dfs)
 	return dfs->dfs_legacy_precac_ucfg;
 }
 
+#ifdef QCA_SUPPORT_AGILE_DFS
 bool dfs_is_agile_precac_enabled(struct wlan_dfs *dfs)
 {
 	return (dfs->dfs_agile_precac_ucfg && dfs->dfs_fw_adfs_support_non_160);
 }
+#endif
 
 /* dfs_descend_precac_tree() - Descend into the precac BSTree based on the
  *                             channel provided. If the channel is less than
@@ -765,7 +775,6 @@ void dfs_find_pdev_for_agile_precac(struct wlan_objmgr_pdev *pdev,
  * @dfs: Pointer to wlan_dfs.
  */
 #ifdef CONFIG_CHAN_FREQ_API
-#define DFS_160MHZ_SECSEG_CHAN_OFFSET 40
 void dfs_prepare_agile_precac_chan(struct wlan_dfs *dfs)
 {
 	struct wlan_objmgr_psoc *psoc;
@@ -848,7 +857,6 @@ void dfs_prepare_agile_precac_chan(struct wlan_dfs *dfs)
 }
 #else
 #ifdef CONFIG_CHAN_NUM_API
-#define DFS_160MHZ_SECSEG_CHAN_OFFSET 8
 void dfs_prepare_agile_precac_chan(struct wlan_dfs *dfs)
 {
 	struct wlan_objmgr_psoc *psoc;