Przeglądaj źródła

qcacmn: Address compilation issues

The API reg_get_superchan_entry() is defined under macro CONFIG_BAND_6GHZ,
but used outside it in the API reg_is_freq_idx_enabled_on_given_pwr_mode().

Place reg_is_freq_idx_enabled_on_given_pwr_mode() under the macro
CONFIG_BAND_6GHZ since it is applicable only for 6G and call the API
reg_is_freq_idx_enabled_on_cur_chan_list() for non-6G.

Change-Id: Ieb3efd946f19515dab3fc0c8086e1c508c9f75ad
Vignesh U 3 lat temu
rodzic
commit
2b442113ee
1 zmienionych plików z 13 dodań i 0 usunięć
  1. 13 0
      umac/regulatory/core/src/reg_services_common.c

+ 13 - 0
umac/regulatory/core/src/reg_services_common.c

@@ -6775,6 +6775,7 @@ reg_is_freq_idx_enabled_on_cur_chan_list(struct wlan_regulatory_pdev_priv_obj
 	return !reg_is_chan_disabled_and_not_nol(&cur_chan_list[freq_idx]);
 }
 
+#ifdef CONFIG_BAND_6GHZ
 static inline bool
 reg_is_supr_entry_mode_disabled(const struct super_chan_info *super_chan_ent,
 				enum supported_6g_pwr_types in_6g_pwr_mode)
@@ -6818,6 +6819,18 @@ reg_is_freq_idx_enabled_on_given_pwr_mode(struct wlan_regulatory_pdev_priv_obj
 
 	return !reg_is_supr_entry_mode_disabled(super_chan_ent, in_6g_pwr_mode);
 }
+#else
+static inline bool
+reg_is_freq_idx_enabled_on_given_pwr_mode(struct wlan_regulatory_pdev_priv_obj
+					  *pdev_priv_obj,
+					  enum channel_enum freq_idx,
+					  enum supported_6g_pwr_types
+					  in_6g_pwr_mode)
+{
+	return reg_is_freq_idx_enabled_on_cur_chan_list(pdev_priv_obj,
+							freq_idx);
+}
+#endif /* CONFIG_BAND_6GHZ */
 
 bool
 reg_is_freq_enabled(struct wlan_objmgr_pdev *pdev,