mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
qcacmn: Make regulatory APIs common for both WIN and MCC
Make reg_is_disable_for_freq and reg_is_disable_ch common for both WIN and MCC, by moving the definition from reg_utils.c to reg_services_common.c and declaration from reg_utils.h to reg_services_common.h. Change-Id: I6425c99b403580836d1ee41839086f4df3971091 CRs-Fixed: 2718047
This commit is contained in:
parent
b510a1e642
commit
d5b80abab6
4 changed files with 36 additions and 52 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue