qcacmn: Based on input 6g power mode find if freq is enabled or not

Add the new sets of APIs that checks if given freq is enabled on given
power mode's channel list.

Also, remove reg_is_chan_disabled() and replace the callers with
reg_is_chan_disabled_and_not_nol().

Change-Id: I65ee6b8dde629b0e31b050b478300a8ba5ae5b4a
Tento commit je obsažen v:
Vignesh U
2021-12-29 11:28:01 +05:30
odevzdal Madan Koyyalamudi
rodič a266f3af83
revize dcec4534a1
5 změnil soubory, kde provedl 200 přidání a 14 odebrání

Zobrazit soubor

@@ -604,6 +604,41 @@ bool wlan_reg_is_chan_disabled_and_not_nol(struct regulatory_channel *chan);
QDF_STATUS wlan_reg_get_current_chan_list(struct wlan_objmgr_pdev *pdev,
struct regulatory_channel *chan_list);
/**
* wlan_reg_is_freq_enabled() - Checks if the given frequency is enabled on the
* given power mode or not. If the frequency is not a 6G frequency then the
* input power mode is ignored and only current channel list is searched.
*
* @pdev: pdev pointer.
* @freq: input frequency.
* @in_6g_pwr_mode: Power mode on which the freq is enabled or not is to be
* checked.
*
* Return: True if the frequency is present in the given power mode channel
* list.
*/
bool wlan_reg_is_freq_enabled(struct wlan_objmgr_pdev *pdev,
qdf_freq_t freq,
enum supported_6g_pwr_types in_6g_pwr_mode);
/**
* wlan_reg_is_freq_idx_enabled() - Checks if the given frequency index is
* enabled on the given power mode or not. If the frequency index is not a 6G
* frequency then the input power mode is ignored and only current channel list
* is searched.
*
* @pdev: pdev pointer.
* @freq_idx: input frequency index.
* @in_6g_pwr_mode: Power mode on which the frequency index is enabled or not
* is to be checked.
*
* Return: True if the frequency index is present in the given power mode
* channel list.
*/
bool wlan_reg_is_freq_idx_enabled(struct wlan_objmgr_pdev *pdev,
enum channel_enum freq_idx,
enum supported_6g_pwr_types in_6g_pwr_mode);
#ifdef CONFIG_REG_CLIENT
/**
* wlan_reg_get_secondary_current_chan_list() - provide the pdev secondary

Zobrazit soubor

@@ -133,6 +133,20 @@ QDF_STATUS wlan_reg_get_current_chan_list(struct wlan_objmgr_pdev *pdev,
qdf_export_symbol(wlan_reg_get_current_chan_list);
bool wlan_reg_is_freq_enabled(struct wlan_objmgr_pdev *pdev,
qdf_freq_t freq,
enum supported_6g_pwr_types in_6g_pwr_mode)
{
return reg_is_freq_enabled(pdev, freq, in_6g_pwr_mode);
}
bool wlan_reg_is_freq_idx_enabled(struct wlan_objmgr_pdev *pdev,
enum channel_enum freq_idx,
enum supported_6g_pwr_types in_6g_pwr_mode)
{
return reg_is_freq_idx_enabled(pdev, freq_idx, in_6g_pwr_mode);
}
#ifdef CONFIG_REG_CLIENT
QDF_STATUS wlan_reg_get_secondary_current_chan_list(
struct wlan_objmgr_pdev *pdev,