mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
qcacmn: Add API to check for passive frequency
Add new API to check if frequency is passive or not. The API checks the channel flag against REGULATORY_CHAN_NO_IR. Change-Id: I166a7a79517f81c23ff933d2657ef3f4c551c082 CRs-fixed: 2822205
This commit is contained in:
parent
88029b9272
commit
46458e7d22
4 changed files with 36 additions and 0 deletions
|
|
@ -3936,6 +3936,15 @@ bool reg_is_disable_for_freq(struct wlan_objmgr_pdev *pdev, qdf_freq_t freq)
|
|||
|
||||
return ch_state == CHANNEL_STATE_DISABLE;
|
||||
}
|
||||
|
||||
bool reg_is_passive_for_freq(struct wlan_objmgr_pdev *pdev, qdf_freq_t freq)
|
||||
{
|
||||
uint32_t chan_flags;
|
||||
|
||||
chan_flags = reg_get_channel_flags_for_freq(pdev, freq);
|
||||
|
||||
return chan_flags & REGULATORY_CHAN_NO_IR;
|
||||
}
|
||||
#endif /* CONFIG_CHAN_FREQ_API */
|
||||
|
||||
uint8_t reg_get_max_tx_power(struct wlan_objmgr_pdev *pdev)
|
||||
|
|
|
|||
|
|
@ -1137,6 +1137,16 @@ reg_get_5g_bonded_channel_for_freq(struct wlan_objmgr_pdev *pdev,
|
|||
* Return: True if channel state is disabled, else false
|
||||
*/
|
||||
bool reg_is_disable_for_freq(struct wlan_objmgr_pdev *pdev, qdf_freq_t freq);
|
||||
|
||||
/**
|
||||
* reg_is_passive_for_freq() - Check if the given channel frequency is in
|
||||
* passive state
|
||||
* @pdev: Pointer to pdev
|
||||
* @freq: Channel frequency
|
||||
*
|
||||
* Return: True if channel state is passive, else false
|
||||
*/
|
||||
bool reg_is_passive_for_freq(struct wlan_objmgr_pdev *pdev, qdf_freq_t freq);
|
||||
#endif /* CONFIG_CHAN_FREQ_API */
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1318,6 +1318,17 @@ bool wlan_reg_is_passive_or_disable_for_freq(struct wlan_objmgr_pdev *pdev,
|
|||
bool wlan_reg_is_disable_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
qdf_freq_t freq);
|
||||
|
||||
/**
|
||||
* wlan_reg_is_passive_for_freq() - Check the channel flags to see if the
|
||||
* passive flag is set
|
||||
* @pdev: pdev ptr
|
||||
* @freq: Channel center frequency
|
||||
*
|
||||
* Return: true or false
|
||||
*/
|
||||
bool wlan_reg_is_passive_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
qdf_freq_t freq);
|
||||
|
||||
/**
|
||||
* wlan_reg_chan_to_band() - Get band from channel number
|
||||
* @chan_num: channel number
|
||||
|
|
|
|||
|
|
@ -1009,6 +1009,12 @@ bool wlan_reg_is_disable_for_freq(struct wlan_objmgr_pdev *pdev,
|
|||
return reg_is_disable_for_freq(pdev, freq);
|
||||
}
|
||||
|
||||
bool wlan_reg_is_passive_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
qdf_freq_t freq)
|
||||
{
|
||||
return reg_is_passive_for_freq(pdev, freq);
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
wlan_reg_get_channel_list_with_power_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
struct channel_power *ch_list,
|
||||
|
|
|
|||
Loading…
Reference in a new issue