diff --git a/umac/regulatory/core/src/reg_services_common.c b/umac/regulatory/core/src/reg_services_common.c index 02031dbabc99..2ac1670f0b29 100644 --- a/umac/regulatory/core/src/reg_services_common.c +++ b/umac/regulatory/core/src/reg_services_common.c @@ -1689,6 +1689,15 @@ bool reg_is_dfs_ch(struct wlan_objmgr_pdev *pdev, return ch_state == CHANNEL_STATE_DFS; } + +bool reg_is_disable_ch(struct wlan_objmgr_pdev *pdev, uint8_t chan) +{ + enum channel_state ch_state; + + ch_state = reg_get_channel_state(pdev, chan); + + return ch_state == CHANNEL_STATE_DISABLE; +} #endif /* CONFIG_CHAN_NUM_API */ uint8_t reg_freq_to_chan(struct wlan_objmgr_pdev *pdev, @@ -3732,6 +3741,14 @@ enum reg_wifi_band reg_freq_to_band(qdf_freq_t freq) return REG_BAND_UNKNOWN; } +bool reg_is_disable_for_freq(struct wlan_objmgr_pdev *pdev, qdf_freq_t freq) +{ + enum channel_state ch_state; + + ch_state = reg_get_channel_state_for_freq(pdev, freq); + + return ch_state == CHANNEL_STATE_DISABLE; +} #endif /* CONFIG_CHAN_FREQ_API */ uint8_t reg_get_max_tx_power(struct wlan_objmgr_pdev *pdev) diff --git a/umac/regulatory/core/src/reg_services_common.h b/umac/regulatory/core/src/reg_services_common.h index 1ac3f6410bb4..2644c5008a23 100644 --- a/umac/regulatory/core/src/reg_services_common.h +++ b/umac/regulatory/core/src/reg_services_common.h @@ -207,6 +207,15 @@ enum channel_state reg_get_2g_bonded_channel_state( void reg_set_channel_params(struct wlan_objmgr_pdev *pdev, uint8_t ch, uint8_t sec_ch_2g, struct ch_params *ch_params); + +/** + * reg_is_disable_ch() - Check if the given channel in disable state + * @pdev: Pointer to pdev + * @chan: channel number + * + * Return: True if channel state is disabled, else false + */ +bool reg_is_disable_ch(struct wlan_objmgr_pdev *pdev, uint8_t chan); #endif /* CONFIG_CHAN_NUM_API */ /** @@ -1044,6 +1053,16 @@ reg_get_5g_bonded_channel_for_freq(struct wlan_objmgr_pdev *pdev, enum phy_ch_width ch_width, const struct bonded_channel_freq **bonded_chan_ptr_ptr); + +/** + * reg_is_disable_for_freq() - Check if the given channel frequency in + * disable state + * @pdev: Pointer to pdev + * @freq: Channel frequency + * + * Return: True if channel state is disabled, else false + */ +bool reg_is_disable_for_freq(struct wlan_objmgr_pdev *pdev, qdf_freq_t freq); #endif /* CONFIG_CHAN_FREQ_API */ /** diff --git a/umac/regulatory/core/src/reg_utils.c b/umac/regulatory/core/src/reg_utils.c index fa26fb0284a5..bb1a32a3e498 100644 --- a/umac/regulatory/core/src/reg_utils.c +++ b/umac/regulatory/core/src/reg_utils.c @@ -823,28 +823,6 @@ QDF_STATUS reg_set_config_vars(struct wlan_objmgr_psoc *psoc, return status; } -#ifdef CONFIG_CHAN_FREQ_API -bool reg_is_disable_for_freq(struct wlan_objmgr_pdev *pdev, qdf_freq_t freq) -{ - enum channel_state ch_state; - - ch_state = reg_get_channel_state_for_freq(pdev, freq); - - return ch_state == CHANNEL_STATE_DISABLE; -} -#endif /* CONFIG_CHAN_FREQ_API */ - -#ifdef CONFIG_CHAN_NUM_API -bool reg_is_disable_ch(struct wlan_objmgr_pdev *pdev, uint8_t chan) -{ - enum channel_state ch_state; - - ch_state = reg_get_channel_state(pdev, chan); - - return ch_state == CHANNEL_STATE_DISABLE; -} -#endif /* CONFIG_CHAN_NUM_API */ - bool reg_is_regdb_offloaded(struct wlan_objmgr_psoc *psoc) { struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj; diff --git a/umac/regulatory/core/src/reg_utils.h b/umac/regulatory/core/src/reg_utils.h index b4d79c78842d..dd5442e9f58d 100644 --- a/umac/regulatory/core/src/reg_utils.h +++ b/umac/regulatory/core/src/reg_utils.h @@ -74,15 +74,6 @@ bool reg_chan_has_dfs_attribute(struct wlan_objmgr_pdev *pdev, uint8_t ch); * Return: true if channel is passive or disabled, else false. */ bool reg_is_passive_or_disable_ch(struct wlan_objmgr_pdev *pdev, uint8_t chan); - -/** - * reg_is_disable_ch() - Check if the given channel in disable state - * @pdev: Pointer to pdev - * @chan: channel number - * - * Return: True if channel state is disabled, else false - */ -bool reg_is_disable_ch(struct wlan_objmgr_pdev *pdev, uint8_t chan); #else static inline bool reg_chan_has_dfs_attribute(struct wlan_objmgr_pdev *pdev, uint8_t ch) @@ -95,12 +86,6 @@ reg_is_passive_or_disable_ch(struct wlan_objmgr_pdev *pdev, uint8_t chan) { return false; } - -static inline bool -reg_is_disable_ch(struct wlan_objmgr_pdev *pdev, uint8_t chan) -{ - return false; -} #endif /* defined(CONFIG_REG_CLIENT) && defined(CONFIG_CHAN_NUM_API) */ #if defined(CONFIG_REG_CLIENT) && defined(CONFIG_CHAN_FREQ_API) @@ -126,15 +111,6 @@ bool reg_chan_has_dfs_attribute_for_freq(struct wlan_objmgr_pdev *pdev, */ bool reg_is_passive_or_disable_for_freq(struct wlan_objmgr_pdev *pdev, qdf_freq_t freq); -/** - * reg_is_disable_for_freq() - Check if the given channel frequency in - * disable state - * @pdev: Pointer to pdev - * @freq: Channel frequency - * - * Return: True if channel state is disabled, else false - */ -bool reg_is_disable_for_freq(struct wlan_objmgr_pdev *pdev, qdf_freq_t freq); #else static inline bool reg_chan_has_dfs_attribute_for_freq(struct wlan_objmgr_pdev *pdev, @@ -149,12 +125,6 @@ reg_is_passive_or_disable_for_freq(struct wlan_objmgr_pdev *pdev, { return false; } - -static inline bool -reg_is_disable_for_freq(struct wlan_objmgr_pdev *pdev, qdf_freq_t freq) -{ - return false; -} #endif /* defined(CONFIG_REG_CLIENT) && defined(CONFIG_CHAN_FREQ_API) */ #ifdef DISABLE_CHANNEL_LIST