qcacmn: Replace callers to use super channel list API

The current channel list alone is not enough to represent the
capability of the chip or device. Given a channel, in many
cases it may be required to know all the power modes that are
supported by this channel.

Update caller APIs to use super channel list. Removed
wlan_reg_get_bonded_channel_state_for_freq and
wlan_reg_get_5g_bonded_channel_and_state_for_freq to use the
super channel API wlan_reg_get_bonded_channel_state_for_pwrmode
and wlan_reg_get_5g_bonded_channel_and_state_for_pwrmode
respectively

Change-Id: If51bd130892cd712f5a218067a5d321e874e134a
CRs-Fixed: 3357153
Tento commit je obsažen v:
Vinod Kumar Myadam
2022-09-01 10:50:16 +05:30
odevzdal Madan Koyyalamudi
rodič 5abb61b966
revize 006220cc0d
2 změnil soubory, kde provedl 45 přidání a 130 odebrání

Zobrazit soubor

@@ -892,21 +892,7 @@ wlan_reg_is_6ghz_freq_txable(struct wlan_objmgr_pdev *pdev,
}
#endif
/**
* wlan_reg_get_bonded_channel_state_for_freq() - Get bonded channel freq state
* @freq: channel frequency
* @bw: channel band width
* @sec_freq: secondary frequency
*
* Return: channel state
*/
enum channel_state
wlan_reg_get_bonded_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
qdf_freq_t freq,
enum phy_ch_width bw,
qdf_freq_t sec_freq);
#ifdef CONFIG_REG_6G_PWRMODE
#if defined(WLAN_FEATURE_11BE) && defined(CONFIG_REG_CLIENT)
/**
* wlan_reg_get_bonded_channel_state_for_pwrmode() - Get bonded channel freq
* state
@@ -924,8 +910,18 @@ wlan_reg_get_bonded_channel_state_for_pwrmode(struct wlan_objmgr_pdev *pdev,
enum phy_ch_width bw,
qdf_freq_t sec_freq,
enum supported_6g_pwr_types
in_6g_pwr_mode,
uint16_t input_puncture_bitmap);
in_6g_pwr_mode);
#else
static inline enum channel_state
wlan_reg_get_bonded_channel_state_for_pwrmode(struct wlan_objmgr_pdev *pdev,
qdf_freq_t freq,
enum phy_ch_width bw,
qdf_freq_t sec_freq,
enum supported_6g_pwr_types
in_6g_pwr_mode)
{
return CHANNEL_STATE_INVALID;
}
#endif
/**
@@ -2018,26 +2014,6 @@ bool wlan_reg_is_freq_in_country_opclass(struct wlan_objmgr_pdev *pdev,
const uint8_t country[3],
uint8_t op_class,
qdf_freq_t chan_freq);
/**
* wlan_reg_get_5g_bonded_channel_and_state_for_freq()- Return the channel
* state for a 5G or 6G channel frequency based on the channel width and
* bonded channel.
* @pdev: Pointer to pdev.
* @freq: Channel center frequency.
* @bw Channel Width.
* @bonded_chan_ptr_ptr: Pointer to bonded_channel_freq.
*
* Return: Channel State
*/
enum channel_state
wlan_reg_get_5g_bonded_channel_and_state_for_freq(struct wlan_objmgr_pdev *pdev,
uint16_t freq,
enum phy_ch_width bw,
const
struct bonded_channel_freq
**bonded_chan_ptr_ptr);
#ifdef CONFIG_REG_6G_PWRMODE
/**
* wlan_reg_get_5g_bonded_channel_and_state_for_pwrmode()- Return the channel
* state for a 5G or 6G channel frequency based on the channel width and
@@ -2053,16 +2029,15 @@ wlan_reg_get_5g_bonded_channel_and_state_for_freq(struct wlan_objmgr_pdev *pdev,
*/
enum channel_state
wlan_reg_get_5g_bonded_channel_and_state_for_pwrmode(
struct wlan_objmgr_pdev *pdev,
uint16_t freq,
enum phy_ch_width bw,
const
struct bonded_channel_freq
**bonded_chan_ptr_ptr,
enum supported_6g_pwr_types
in_6g_pwr_mode,
uint16_t input_puncture_bitmap);
#endif
struct wlan_objmgr_pdev *pdev,
uint16_t freq,
enum phy_ch_width bw,
const
struct bonded_channel_freq
**bonded_chan_ptr_ptr,
enum supported_6g_pwr_types
in_6g_pwr_mode,
uint16_t input_puncture_bitmap);
#endif /*CONFIG_CHAN_FREQ_API */
/**

Zobrazit soubor

@@ -1449,33 +1449,17 @@ bool wlan_reg_is_freq_in_country_opclass(struct wlan_objmgr_pdev *pdev,
op_class, chan_freq);
}
enum channel_state
wlan_reg_get_5g_bonded_channel_and_state_for_freq(struct wlan_objmgr_pdev *pdev,
uint16_t freq,
enum phy_ch_width bw,
const
struct bonded_channel_freq
**bonded_chan_ptr_ptr)
{
/*
* Get channel frequencies and state from regulatory
*/
return reg_get_5g_bonded_channel_for_freq(pdev, freq, bw,
bonded_chan_ptr_ptr);
}
#ifdef CONFIG_REG_6G_PWRMODE
enum channel_state
wlan_reg_get_5g_bonded_channel_and_state_for_pwrmode(
struct wlan_objmgr_pdev *pdev,
uint16_t freq,
enum phy_ch_width bw,
const
struct bonded_channel_freq
**bonded_chan_ptr_ptr,
enum supported_6g_pwr_types
in_6g_pwr_mode,
uint16_t input_puncture_bitmap)
struct wlan_objmgr_pdev *pdev,
uint16_t freq,
enum phy_ch_width bw,
const
struct bonded_channel_freq
**bonded_chan_ptr_ptr,
enum supported_6g_pwr_types
in_6g_pwr_mode,
uint16_t input_puncture_bitmap)
{
/*
* Get channel frequencies and state from regulatory
@@ -1487,14 +1471,15 @@ wlan_reg_get_5g_bonded_channel_and_state_for_pwrmode(
}
qdf_export_symbol(wlan_reg_get_5g_bonded_channel_and_state_for_pwrmode);
#endif
#if defined(WLAN_FEATURE_11BE) && defined(CONFIG_REG_CLIENT)
enum channel_state
wlan_reg_get_bonded_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
qdf_freq_t freq,
enum phy_ch_width bw,
qdf_freq_t sec_freq)
wlan_reg_get_bonded_channel_state_for_pwrmode(struct wlan_objmgr_pdev *pdev,
qdf_freq_t freq,
enum phy_ch_width bw,
qdf_freq_t sec_freq,
enum supported_6g_pwr_types
in_6g_pwr_mode)
{
if (WLAN_REG_IS_24GHZ_CH_FREQ(freq))
return reg_get_2g_bonded_channel_state_for_freq(pdev, freq,
@@ -1502,69 +1487,24 @@ wlan_reg_get_bonded_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
if (bw == CH_WIDTH_320MHZ) {
const struct bonded_channel_freq *bonded_chan_ptr_ptr = NULL;
return reg_get_5g_bonded_channel_for_freq(pdev, freq, bw,
&bonded_chan_ptr_ptr);
return reg_get_chan_state_for_320(pdev, freq, 0,
bw,
&bonded_chan_ptr_ptr,
in_6g_pwr_mode, true,
NO_SCHANS_PUNC);
} else {
struct ch_params params = {0};
params.ch_width = bw;
return reg_get_5g_bonded_channel_state_for_freq(pdev, freq,
&params);
}
}
qdf_export_symbol(wlan_reg_get_5g_bonded_channel_and_state_for_freq);
#else
enum channel_state
wlan_reg_get_bonded_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
qdf_freq_t freq,
enum phy_ch_width bw,
qdf_freq_t sec_freq)
{
if (WLAN_REG_IS_24GHZ_CH_FREQ(freq)) {
return reg_get_2g_bonded_channel_state_for_freq(pdev, freq,
sec_freq, bw);
} else {
struct ch_params params = {0};
params.ch_width = bw;
return reg_get_5g_bonded_channel_state_for_freq(pdev, freq,
&params);
}
}
qdf_export_symbol(wlan_reg_get_5g_bonded_channel_and_state_for_freq);
#ifdef CONFIG_REG_6G_PWRMODE
enum channel_state
wlan_reg_get_bonded_channel_state_for_pwrmode(struct wlan_objmgr_pdev *pdev,
qdf_freq_t freq,
enum phy_ch_width bw,
qdf_freq_t sec_freq,
enum supported_6g_pwr_types
in_6g_pwr_mode,
uint16_t input_punc_bitmap)
{
if (WLAN_REG_IS_24GHZ_CH_FREQ(freq)) {
return reg_get_2g_bonded_channel_state_for_freq(pdev, freq,
sec_freq, bw);
} else {
struct ch_params params = {0};
params.ch_width = bw;
return reg_get_5g_bonded_channel_state_for_pwrmode(pdev, freq,
&params,
in_6g_pwr_mode);
return reg_get_5g_bonded_channel_state_for_pwrmode(
pdev, freq,
&params, in_6g_pwr_mode);
}
}
qdf_export_symbol(wlan_reg_get_bonded_channel_state_for_pwrmode);
#endif
#endif
#endif /* CONFIG CHAN FREQ API */
uint16_t wlan_reg_get_op_class_width(struct wlan_objmgr_pdev *pdev,