qcacmn: Control the size of the freq and chan_num (Regulatory)
Depending on the requirement, a bigger size or a smaller size for the frequency variable can be chosen. The advantages of each size are described below: Advantage of a bigger size: When two technologies (e.g. 802.11AX and 802.11AD) are controlled by the same driver software, the frequency range may be very large and a bigger size (e.g. 32bit integer) is more appropriate. Advantage of a smaller size: When the frequency range is not very large, a smaller size (e.g. 16bit integer) can be used. It saves a large amount of space especially when many large arrays containing elements of this type/size are defined in the driver. Also, change the size of the IEEE channel variables to unsigned 8-bit integer. Change-Id: Ie205befb82f643808973286ae578d7add7738eec CRs-Fixed: 2586071
This commit is contained in:

committad av
nshrivas

förälder
9c43a47af0
incheckning
2c1420a617
@@ -360,13 +360,13 @@ static void reg_modify_chan_list_for_nol_list(
|
||||
* Return: None
|
||||
*/
|
||||
static void reg_find_low_limit_chan_enum(
|
||||
struct regulatory_channel *chan_list, uint32_t low_freq,
|
||||
struct regulatory_channel *chan_list, qdf_freq_t low_freq,
|
||||
uint32_t *low_limit)
|
||||
{
|
||||
enum channel_enum chan_enum;
|
||||
uint16_t min_bw;
|
||||
uint16_t max_bw;
|
||||
uint32_t center_freq;
|
||||
qdf_freq_t center_freq;
|
||||
|
||||
for (chan_enum = 0; chan_enum < NUM_CHANNELS; chan_enum++) {
|
||||
min_bw = chan_list[chan_enum].min_bw;
|
||||
@@ -396,13 +396,13 @@ static void reg_find_low_limit_chan_enum(
|
||||
* Return: None
|
||||
*/
|
||||
static void reg_find_high_limit_chan_enum(
|
||||
struct regulatory_channel *chan_list, uint32_t high_freq,
|
||||
struct regulatory_channel *chan_list, qdf_freq_t high_freq,
|
||||
uint32_t *high_limit)
|
||||
{
|
||||
enum channel_enum chan_enum;
|
||||
uint16_t min_bw;
|
||||
uint16_t max_bw;
|
||||
uint32_t center_freq;
|
||||
qdf_freq_t center_freq;
|
||||
|
||||
for (chan_enum = NUM_CHANNELS - 1; chan_enum >= 0; chan_enum--) {
|
||||
min_bw = chan_list[chan_enum].min_bw;
|
||||
@@ -471,10 +471,10 @@ reg_modify_chan_list_for_japan(struct wlan_objmgr_pdev *pdev)
|
||||
*/
|
||||
static void
|
||||
reg_modify_chan_list_for_freq_range(struct regulatory_channel *chan_list,
|
||||
uint32_t low_freq_2g,
|
||||
uint32_t high_freq_2g,
|
||||
uint32_t low_freq_5g,
|
||||
uint32_t high_freq_5g)
|
||||
qdf_freq_t low_freq_2g,
|
||||
qdf_freq_t high_freq_2g,
|
||||
qdf_freq_t low_freq_5g,
|
||||
qdf_freq_t high_freq_5g)
|
||||
{
|
||||
uint32_t low_limit_2g = NUM_CHANNELS;
|
||||
uint32_t high_limit_2g = NUM_CHANNELS;
|
||||
|
@@ -48,8 +48,8 @@ static QDF_STATUS reg_process_ch_avoid_freq(struct wlan_objmgr_psoc *psoc,
|
||||
enum channel_enum ch_loop;
|
||||
enum channel_enum start_ch_idx;
|
||||
enum channel_enum end_ch_idx;
|
||||
uint16_t start_channel;
|
||||
uint16_t end_channel;
|
||||
uint8_t start_channel;
|
||||
uint8_t end_channel;
|
||||
uint32_t i;
|
||||
struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj;
|
||||
struct ch_avoid_freq_type *range;
|
||||
|
@@ -381,7 +381,7 @@ uint16_t reg_dmn_get_curr_opclasses(uint8_t *num_classes, uint8_t *class)
|
||||
|
||||
#ifdef CONFIG_CHAN_FREQ_API
|
||||
void reg_freq_width_to_chan_op_class(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq,
|
||||
qdf_freq_t freq,
|
||||
uint16_t chan_width,
|
||||
bool global_tbl_lookup,
|
||||
uint16_t behav_limit,
|
||||
@@ -436,7 +436,7 @@ void reg_freq_width_to_chan_op_class(struct wlan_objmgr_pdev *pdev,
|
||||
}
|
||||
|
||||
void reg_freq_to_chan_op_class(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq,
|
||||
qdf_freq_t freq,
|
||||
bool global_tbl_lookup,
|
||||
uint16_t behav_limit,
|
||||
uint8_t *op_class,
|
||||
|
@@ -90,7 +90,7 @@ uint16_t reg_dmn_get_curr_opclasses(uint8_t *num_classes, uint8_t *class);
|
||||
* Return: Void.
|
||||
*/
|
||||
void reg_freq_width_to_chan_op_class(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq,
|
||||
qdf_freq_t freq,
|
||||
uint16_t chan_width,
|
||||
bool global_tbl_lookup,
|
||||
uint16_t behav_limit,
|
||||
@@ -110,7 +110,7 @@ void reg_freq_width_to_chan_op_class(struct wlan_objmgr_pdev *pdev,
|
||||
* Return: Void.
|
||||
*/
|
||||
void reg_freq_to_chan_op_class(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq,
|
||||
qdf_freq_t freq,
|
||||
bool global_tbl_lookup,
|
||||
uint16_t behav_limit,
|
||||
uint8_t *op_class,
|
||||
@@ -175,7 +175,7 @@ static inline void reg_dmn_print_channels_in_opclass(uint8_t *country,
|
||||
|
||||
static inline void
|
||||
reg_freq_width_to_chan_op_class(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq,
|
||||
qdf_freq_t freq,
|
||||
uint16_t chan_width,
|
||||
bool global_tbl_lookup,
|
||||
uint16_t behav_limit,
|
||||
@@ -186,7 +186,7 @@ reg_freq_width_to_chan_op_class(struct wlan_objmgr_pdev *pdev,
|
||||
|
||||
static inline void
|
||||
reg_freq_to_chan_op_class(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq,
|
||||
qdf_freq_t freq,
|
||||
bool global_tbl_lookup,
|
||||
uint16_t behav_limit,
|
||||
uint8_t *op_class,
|
||||
|
@@ -162,10 +162,10 @@ struct wlan_regulatory_pdev_priv_obj {
|
||||
enum dfs_reg dfs_region;
|
||||
uint32_t phybitmap;
|
||||
struct wlan_objmgr_pdev *pdev_ptr;
|
||||
uint32_t range_2g_low;
|
||||
uint32_t range_2g_high;
|
||||
uint32_t range_5g_low;
|
||||
uint32_t range_5g_high;
|
||||
qdf_freq_t range_2g_low;
|
||||
qdf_freq_t range_2g_high;
|
||||
qdf_freq_t range_5g_low;
|
||||
qdf_freq_t range_5g_high;
|
||||
bool dfs_enabled;
|
||||
bool set_fcc_channel;
|
||||
enum band_info band_capability;
|
||||
|
@@ -1081,7 +1081,7 @@ QDF_STATUS reg_get_channel_list_with_power(struct wlan_objmgr_pdev *pdev,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
enum channel_enum reg_get_chan_enum(uint32_t chan_num)
|
||||
enum channel_enum reg_get_chan_enum(uint8_t chan_num)
|
||||
{
|
||||
uint32_t count;
|
||||
|
||||
@@ -1095,7 +1095,7 @@ enum channel_enum reg_get_chan_enum(uint32_t chan_num)
|
||||
}
|
||||
|
||||
enum channel_state reg_get_channel_state(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t ch)
|
||||
uint8_t ch)
|
||||
{
|
||||
enum channel_enum ch_idx;
|
||||
struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
|
||||
@@ -1127,7 +1127,7 @@ enum channel_state reg_get_channel_state(struct wlan_objmgr_pdev *pdev,
|
||||
*/
|
||||
static enum channel_state reg_get_5g_bonded_chan_array(
|
||||
struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t oper_chan,
|
||||
uint8_t oper_chan,
|
||||
const struct bonded_channel bonded_chan_ar[],
|
||||
uint16_t array_size,
|
||||
const struct bonded_channel **bonded_chan_ptr_ptr)
|
||||
@@ -1162,7 +1162,7 @@ static enum channel_state reg_get_5g_bonded_chan_array(
|
||||
}
|
||||
|
||||
enum channel_state reg_get_5g_bonded_channel(
|
||||
struct wlan_objmgr_pdev *pdev, uint32_t chan_num,
|
||||
struct wlan_objmgr_pdev *pdev, uint8_t chan_num,
|
||||
enum phy_ch_width ch_width,
|
||||
const struct bonded_channel **bonded_chan_ptr_ptr)
|
||||
{
|
||||
@@ -1566,7 +1566,7 @@ void reg_set_dfs_region(struct wlan_objmgr_pdev *pdev,
|
||||
|
||||
#ifdef CONFIG_CHAN_NUM_API
|
||||
uint32_t reg_get_channel_reg_power(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t chan_num)
|
||||
uint8_t chan_num)
|
||||
{
|
||||
enum channel_enum chan_enum;
|
||||
struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
|
||||
@@ -1591,8 +1591,8 @@ uint32_t reg_get_channel_reg_power(struct wlan_objmgr_pdev *pdev,
|
||||
return reg_channels[chan_enum].tx_power;
|
||||
}
|
||||
|
||||
uint32_t reg_get_channel_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t chan_num)
|
||||
qdf_freq_t reg_get_channel_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t chan_num)
|
||||
{
|
||||
enum channel_enum chan_enum;
|
||||
struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
|
||||
@@ -1616,7 +1616,7 @@ uint32_t reg_get_channel_freq(struct wlan_objmgr_pdev *pdev,
|
||||
}
|
||||
|
||||
bool reg_is_dfs_ch(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t chan)
|
||||
uint8_t chan)
|
||||
{
|
||||
enum channel_state ch_state;
|
||||
|
||||
@@ -1626,8 +1626,8 @@ bool reg_is_dfs_ch(struct wlan_objmgr_pdev *pdev,
|
||||
}
|
||||
#endif /* CONFIG_CHAN_NUM_API */
|
||||
|
||||
uint32_t reg_freq_to_chan(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t freq)
|
||||
uint8_t reg_freq_to_chan(struct wlan_objmgr_pdev *pdev,
|
||||
qdf_freq_t freq)
|
||||
{
|
||||
uint32_t count;
|
||||
struct regulatory_channel *chan_list;
|
||||
@@ -1749,8 +1749,8 @@ uint16_t reg_legacy_chan_to_freq(struct wlan_objmgr_pdev *pdev,
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CHAN_NUM_API
|
||||
uint32_t reg_chan_to_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t chan_num)
|
||||
qdf_freq_t reg_chan_to_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t chan_num)
|
||||
{
|
||||
uint32_t count;
|
||||
struct regulatory_channel *chan_list;
|
||||
@@ -1787,14 +1787,14 @@ uint32_t reg_chan_to_freq(struct wlan_objmgr_pdev *pdev,
|
||||
|
||||
bool reg_chan_is_49ghz(struct wlan_objmgr_pdev *pdev, uint8_t chan_num)
|
||||
{
|
||||
uint32_t freq = 0;
|
||||
qdf_freq_t freq = 0;
|
||||
|
||||
freq = reg_chan_to_freq(pdev, chan_num);
|
||||
|
||||
return REG_IS_49GHZ_FREQ(freq) ? true : false;
|
||||
}
|
||||
|
||||
enum band_info reg_chan_to_band(uint32_t chan_num)
|
||||
enum band_info reg_chan_to_band(uint8_t chan_num)
|
||||
{
|
||||
if (chan_num <= 14)
|
||||
return BAND_2G;
|
||||
@@ -2191,8 +2191,8 @@ QDF_STATUS reg_set_hal_reg_cap(
|
||||
}
|
||||
|
||||
bool reg_chan_in_range(struct regulatory_channel *chan_list,
|
||||
uint32_t low_freq_2g, uint32_t high_freq_2g,
|
||||
uint32_t low_freq_5g, uint32_t high_freq_5g,
|
||||
qdf_freq_t low_freq_2g, qdf_freq_t high_freq_2g,
|
||||
qdf_freq_t low_freq_5g, qdf_freq_t high_freq_5g,
|
||||
enum channel_enum ch_enum)
|
||||
{
|
||||
uint32_t low_limit_2g = NUM_CHANNELS;
|
||||
@@ -2202,7 +2202,7 @@ bool reg_chan_in_range(struct regulatory_channel *chan_list,
|
||||
bool chan_in_range;
|
||||
enum channel_enum chan_enum;
|
||||
uint16_t min_bw;
|
||||
uint32_t center_freq;
|
||||
qdf_freq_t center_freq;
|
||||
|
||||
for (chan_enum = 0; chan_enum < NUM_CHANNELS; chan_enum++) {
|
||||
min_bw = chan_list[chan_enum].min_bw;
|
||||
@@ -2454,9 +2454,9 @@ reg_get_band_channel_list(struct wlan_objmgr_pdev *pdev,
|
||||
return num_channels;
|
||||
}
|
||||
|
||||
uint16_t reg_chan_band_to_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t chan_num,
|
||||
uint8_t band_mask)
|
||||
qdf_freq_t reg_chan_band_to_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t chan_num,
|
||||
uint8_t band_mask)
|
||||
{
|
||||
enum channel_enum min_chan, max_chan;
|
||||
struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
|
||||
@@ -2510,71 +2510,71 @@ uint16_t reg_chan_band_to_freq(struct wlan_objmgr_pdev *pdev,
|
||||
}
|
||||
}
|
||||
|
||||
bool reg_is_49ghz_freq(uint32_t freq)
|
||||
bool reg_is_49ghz_freq(qdf_freq_t freq)
|
||||
{
|
||||
return REG_IS_49GHZ_FREQ(freq);
|
||||
}
|
||||
|
||||
uint32_t reg_ch_num(uint32_t ch_enum)
|
||||
qdf_freq_t reg_ch_num(uint32_t ch_enum)
|
||||
{
|
||||
return REG_CH_NUM(ch_enum);
|
||||
}
|
||||
|
||||
uint32_t reg_ch_to_freq(uint32_t ch_enum)
|
||||
qdf_freq_t reg_ch_to_freq(uint32_t ch_enum)
|
||||
{
|
||||
return REG_CH_TO_FREQ(ch_enum);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CHAN_NUM_API
|
||||
bool reg_is_same_band_channels(uint32_t chan_num1, uint32_t chan_num2)
|
||||
bool reg_is_same_band_channels(uint8_t chan_num1, uint8_t chan_num2)
|
||||
{
|
||||
return (chan_num1 && chan_num2 &&
|
||||
(REG_IS_5GHZ_CH(chan_num1) == REG_IS_5GHZ_CH(chan_num2)));
|
||||
}
|
||||
|
||||
bool reg_is_channel_valid_5g_sbs(uint32_t curchan, uint32_t newchan)
|
||||
bool reg_is_channel_valid_5g_sbs(uint8_t curchan, uint8_t newchan)
|
||||
{
|
||||
return REG_IS_CHANNEL_VALID_5G_SBS(curchan, newchan);
|
||||
}
|
||||
|
||||
uint32_t reg_min_24ghz_ch_num(void)
|
||||
uint8_t reg_min_24ghz_ch_num(void)
|
||||
{
|
||||
return REG_MIN_24GHZ_CH_NUM;
|
||||
}
|
||||
|
||||
uint32_t reg_max_24ghz_ch_num(void)
|
||||
uint8_t reg_max_24ghz_ch_num(void)
|
||||
{
|
||||
return REG_MAX_24GHZ_CH_NUM;
|
||||
}
|
||||
|
||||
uint32_t reg_min_5ghz_ch_num(void)
|
||||
uint8_t reg_min_5ghz_ch_num(void)
|
||||
{
|
||||
return REG_MIN_5GHZ_CH_NUM;
|
||||
}
|
||||
|
||||
uint32_t reg_max_5ghz_ch_num(void)
|
||||
uint8_t reg_max_5ghz_ch_num(void)
|
||||
{
|
||||
return REG_MAX_5GHZ_CH_NUM;
|
||||
}
|
||||
#endif /* CONFIG_CHAN_NUM_API */
|
||||
|
||||
#ifdef CONFIG_CHAN_FREQ_API
|
||||
uint16_t reg_min_24ghz_chan_freq(void)
|
||||
qdf_freq_t reg_min_24ghz_chan_freq(void)
|
||||
{
|
||||
return REG_MIN_24GHZ_CH_FREQ;
|
||||
}
|
||||
|
||||
uint16_t reg_max_24ghz_chan_freq(void)
|
||||
qdf_freq_t reg_max_24ghz_chan_freq(void)
|
||||
{
|
||||
return REG_MAX_24GHZ_CH_FREQ;
|
||||
}
|
||||
|
||||
uint16_t reg_min_5ghz_chan_freq(void)
|
||||
qdf_freq_t reg_min_5ghz_chan_freq(void)
|
||||
{
|
||||
return REG_MIN_5GHZ_CH_FREQ;
|
||||
}
|
||||
|
||||
uint16_t reg_max_5ghz_chan_freq(void)
|
||||
qdf_freq_t reg_max_5ghz_chan_freq(void)
|
||||
{
|
||||
return REG_MAX_5GHZ_CH_FREQ;
|
||||
}
|
||||
@@ -2840,7 +2840,7 @@ QDF_STATUS reg_get_channel_list_with_power_for_freq(struct wlan_objmgr_pdev
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
enum channel_enum reg_get_chan_enum_for_freq(uint16_t freq)
|
||||
enum channel_enum reg_get_chan_enum_for_freq(qdf_freq_t freq)
|
||||
{
|
||||
uint32_t count;
|
||||
|
||||
@@ -2854,7 +2854,7 @@ enum channel_enum reg_get_chan_enum_for_freq(uint16_t freq)
|
||||
}
|
||||
|
||||
enum channel_state reg_get_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq)
|
||||
qdf_freq_t freq)
|
||||
{
|
||||
enum channel_enum ch_idx;
|
||||
struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
|
||||
@@ -2968,7 +2968,7 @@ reg_get_5g_bonded_channel_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
|
||||
enum channel_state
|
||||
reg_get_5g_bonded_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq,
|
||||
qdf_freq_t freq,
|
||||
enum phy_ch_width bw)
|
||||
{
|
||||
enum channel_enum ch_indx;
|
||||
@@ -3030,8 +3030,8 @@ reg_get_5g_bonded_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
|
||||
enum channel_state
|
||||
reg_get_2g_bonded_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t oper_ch_freq,
|
||||
uint16_t sec_ch_freq,
|
||||
qdf_freq_t oper_ch_freq,
|
||||
qdf_freq_t sec_ch_freq,
|
||||
enum phy_ch_width bw)
|
||||
{
|
||||
enum channel_enum chan_idx;
|
||||
@@ -3302,8 +3302,8 @@ static void reg_set_2g_channel_params_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
}
|
||||
|
||||
void reg_set_channel_params_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq,
|
||||
uint16_t sec_ch_2g_freq,
|
||||
qdf_freq_t freq,
|
||||
qdf_freq_t sec_ch_2g_freq,
|
||||
struct ch_params *ch_params)
|
||||
{
|
||||
if (reg_is_5ghz_ch_freq(freq) || reg_is_6ghz_chan_freq(freq))
|
||||
@@ -3314,7 +3314,7 @@ void reg_set_channel_params_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
}
|
||||
|
||||
uint8_t reg_get_channel_reg_power_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq)
|
||||
qdf_freq_t freq)
|
||||
{
|
||||
enum channel_enum chan_enum;
|
||||
struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
|
||||
@@ -3339,7 +3339,7 @@ uint8_t reg_get_channel_reg_power_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
return reg_channels[chan_enum].tx_power;
|
||||
}
|
||||
|
||||
bool reg_is_dfs_for_freq(struct wlan_objmgr_pdev *pdev, uint16_t freq)
|
||||
bool reg_is_dfs_for_freq(struct wlan_objmgr_pdev *pdev, qdf_freq_t freq)
|
||||
{
|
||||
enum channel_state ch_state;
|
||||
|
||||
@@ -3427,8 +3427,8 @@ void reg_update_nol_history_ch_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
}
|
||||
}
|
||||
|
||||
static inline bool REG_IS_FREQUENCY_VALID_5G_SBS(uint16_t curfreq,
|
||||
uint16_t newfreq)
|
||||
static inline bool REG_IS_FREQUENCY_VALID_5G_SBS(qdf_freq_t curfreq,
|
||||
qdf_freq_t newfreq)
|
||||
{
|
||||
return ((curfreq) > (newfreq) ?
|
||||
REG_CH_TO_FREQ(reg_get_chan_enum_for_freq(curfreq))
|
||||
@@ -3439,22 +3439,22 @@ static inline bool REG_IS_FREQUENCY_VALID_5G_SBS(uint16_t curfreq,
|
||||
> REG_SBS_SEPARATION_THRESHOLD);
|
||||
}
|
||||
|
||||
bool reg_is_frequency_valid_5g_sbs(uint16_t curfreq, uint16_t newfreq)
|
||||
bool reg_is_frequency_valid_5g_sbs(qdf_freq_t curfreq, qdf_freq_t newfreq)
|
||||
{
|
||||
return REG_IS_FREQUENCY_VALID_5G_SBS(curfreq, newfreq);
|
||||
}
|
||||
|
||||
uint16_t reg_min_chan_freq(void)
|
||||
qdf_freq_t reg_min_chan_freq(void)
|
||||
{
|
||||
return channel_map[MIN_24GHZ_CHANNEL].center_freq;
|
||||
}
|
||||
|
||||
uint16_t reg_max_chan_freq(void)
|
||||
qdf_freq_t reg_max_chan_freq(void)
|
||||
{
|
||||
return channel_map[NUM_CHANNELS - 1].center_freq;
|
||||
}
|
||||
|
||||
bool reg_is_same_band_freqs(uint16_t freq1, uint16_t freq2)
|
||||
bool reg_is_same_band_freqs(qdf_freq_t freq1, qdf_freq_t freq2)
|
||||
{
|
||||
return (freq1 && freq2 && ((REG_IS_6GHZ_FREQ(freq1) &&
|
||||
REG_IS_6GHZ_FREQ(freq2)) ||
|
||||
@@ -3464,7 +3464,7 @@ bool reg_is_same_band_freqs(uint16_t freq1, uint16_t freq2)
|
||||
REG_IS_24GHZ_CH_FREQ(freq2))));
|
||||
}
|
||||
|
||||
enum reg_wifi_band reg_freq_to_band(uint16_t freq)
|
||||
enum reg_wifi_band reg_freq_to_band(qdf_freq_t freq)
|
||||
{
|
||||
if (REG_IS_24GHZ_CH_FREQ(freq))
|
||||
return REG_BAND_2G;
|
||||
|
@@ -112,7 +112,7 @@ extern const struct chan_map channel_map_global[];
|
||||
*
|
||||
* Return: Channel enum
|
||||
*/
|
||||
enum channel_enum reg_get_chan_enum(uint32_t chan_num);
|
||||
enum channel_enum reg_get_chan_enum(uint8_t chan_num);
|
||||
|
||||
/**
|
||||
* reg_get_channel_list_with_power() - Provides the channel list with power
|
||||
@@ -134,7 +134,7 @@ QDF_STATUS reg_get_channel_list_with_power(struct wlan_objmgr_pdev *pdev,
|
||||
* Return: channel state
|
||||
*/
|
||||
enum channel_state reg_get_channel_state(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t ch);
|
||||
uint8_t ch);
|
||||
|
||||
/**
|
||||
* reg_get_5g_bonded_channel() - get the 5G bonded channel state
|
||||
@@ -146,7 +146,7 @@ enum channel_state reg_get_channel_state(struct wlan_objmgr_pdev *pdev,
|
||||
* Return: channel state
|
||||
*/
|
||||
enum channel_state reg_get_5g_bonded_channel(
|
||||
struct wlan_objmgr_pdev *pdev, uint32_t chan_num,
|
||||
struct wlan_objmgr_pdev *pdev, uint8_t chan_num,
|
||||
enum phy_ch_width ch_width,
|
||||
const struct bonded_channel **bonded_chan_ptr_ptr);
|
||||
|
||||
@@ -219,7 +219,7 @@ void reg_get_current_dfs_region(struct wlan_objmgr_pdev *pdev,
|
||||
* Return: txpower
|
||||
*/
|
||||
uint32_t reg_get_channel_reg_power(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t chan_num);
|
||||
uint8_t chan_num);
|
||||
|
||||
/**
|
||||
* reg_get_channel_freq() - Get the channel frequency
|
||||
@@ -228,8 +228,8 @@ uint32_t reg_get_channel_reg_power(struct wlan_objmgr_pdev *pdev,
|
||||
*
|
||||
* Return: frequency
|
||||
*/
|
||||
uint32_t reg_get_channel_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t chan_num);
|
||||
qdf_freq_t reg_get_channel_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t chan_num);
|
||||
#endif /* CONFIG_CHAN_NUM_API */
|
||||
|
||||
/**
|
||||
@@ -257,7 +257,7 @@ void reg_set_dfs_region(struct wlan_objmgr_pdev *pdev,
|
||||
*
|
||||
* Return: band info
|
||||
*/
|
||||
enum band_info reg_chan_to_band(uint32_t chan_num);
|
||||
enum band_info reg_chan_to_band(uint8_t chan_num);
|
||||
#endif /* CONFIG_CHAN_NUM_API */
|
||||
|
||||
/**
|
||||
@@ -290,7 +290,7 @@ void reg_update_nol_ch(struct wlan_objmgr_pdev *pdev, uint8_t *chan_list,
|
||||
*
|
||||
* Return: true or false
|
||||
*/
|
||||
bool reg_is_dfs_ch(struct wlan_objmgr_pdev *pdev, uint32_t chan);
|
||||
bool reg_is_dfs_ch(struct wlan_objmgr_pdev *pdev, uint8_t chan);
|
||||
#endif /* CONFIG_CHAN_NUM_API */
|
||||
|
||||
/**
|
||||
@@ -300,7 +300,7 @@ bool reg_is_dfs_ch(struct wlan_objmgr_pdev *pdev, uint32_t chan);
|
||||
*
|
||||
* Return: Channel number if success, otherwise 0
|
||||
*/
|
||||
uint32_t reg_freq_to_chan(struct wlan_objmgr_pdev *pdev, uint32_t freq);
|
||||
uint8_t reg_freq_to_chan(struct wlan_objmgr_pdev *pdev, qdf_freq_t freq);
|
||||
|
||||
#ifdef CONFIG_CHAN_NUM_API
|
||||
/**
|
||||
@@ -310,7 +310,7 @@ uint32_t reg_freq_to_chan(struct wlan_objmgr_pdev *pdev, uint32_t freq);
|
||||
*
|
||||
* Return: Channel frequency if success, otherwise 0
|
||||
*/
|
||||
uint32_t reg_chan_to_freq(struct wlan_objmgr_pdev *pdev, uint32_t chan_num);
|
||||
qdf_freq_t reg_chan_to_freq(struct wlan_objmgr_pdev *pdev, uint8_t chan_num);
|
||||
|
||||
/**
|
||||
* reg_legacy_chan_to_freq() - Get freq from chan noumber, for 2G and 5G
|
||||
@@ -431,8 +431,8 @@ QDF_STATUS reg_set_hal_reg_cap(
|
||||
* Return: true if ch_enum is with in pdev's channel range, else false.
|
||||
*/
|
||||
bool reg_chan_in_range(struct regulatory_channel *chan_list,
|
||||
uint32_t low_freq_2g, uint32_t high_freq_2g,
|
||||
uint32_t low_freq_5g, uint32_t high_freq_5g,
|
||||
qdf_freq_t low_freq_2g, qdf_freq_t high_freq_2g,
|
||||
qdf_freq_t low_freq_5g, qdf_freq_t high_freq_5g,
|
||||
enum channel_enum ch_enum);
|
||||
|
||||
/**
|
||||
@@ -595,9 +595,9 @@ uint16_t reg_get_band_channel_list(struct wlan_objmgr_pdev *pdev,
|
||||
* supported only for 2.4Ghz and 5Ghz bands. For other bands the following
|
||||
* priority is given: 1) 6Ghz 2) 5Ghz 3) 2.4Ghz.
|
||||
*/
|
||||
uint16_t reg_chan_band_to_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t chan,
|
||||
uint8_t band_mask);
|
||||
qdf_freq_t reg_chan_band_to_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t chan,
|
||||
uint8_t band_mask);
|
||||
|
||||
/**
|
||||
* reg_is_49ghz_freq() - Check if the given channel frequency is 4.9GHz
|
||||
@@ -605,7 +605,7 @@ uint16_t reg_chan_band_to_freq(struct wlan_objmgr_pdev *pdev,
|
||||
*
|
||||
* Return: true if channel frequency is 4.9GHz, else false
|
||||
*/
|
||||
bool reg_is_49ghz_freq(uint32_t freq);
|
||||
bool reg_is_49ghz_freq(qdf_freq_t freq);
|
||||
|
||||
/**
|
||||
* reg_ch_num() - Get channel number from channel enum
|
||||
@@ -613,7 +613,7 @@ bool reg_is_49ghz_freq(uint32_t freq);
|
||||
*
|
||||
* Return: channel number
|
||||
*/
|
||||
uint32_t reg_ch_num(uint32_t ch_enum);
|
||||
qdf_freq_t reg_ch_num(uint32_t ch_enum);
|
||||
|
||||
/**
|
||||
* reg_ch_to_freq() - Get channel frequency from channel enum
|
||||
@@ -621,7 +621,7 @@ uint32_t reg_ch_num(uint32_t ch_enum);
|
||||
*
|
||||
* Return: channel frequency
|
||||
*/
|
||||
uint32_t reg_ch_to_freq(uint32_t ch_enum);
|
||||
qdf_freq_t reg_ch_to_freq(uint32_t ch_enum);
|
||||
|
||||
#ifdef CONFIG_CHAN_NUM_API
|
||||
/**
|
||||
@@ -631,7 +631,7 @@ uint32_t reg_ch_to_freq(uint32_t ch_enum);
|
||||
*
|
||||
* Return: true if both the channels has the same band.
|
||||
*/
|
||||
bool reg_is_same_band_channels(uint32_t chan_num1, uint32_t chan_num2);
|
||||
bool reg_is_same_band_channels(uint8_t chan_num1, uint8_t chan_num2);
|
||||
|
||||
/**
|
||||
* reg_is_channel_valid_5g_sbs() Check if the given channel is 5G SBS.
|
||||
@@ -640,35 +640,35 @@ bool reg_is_same_band_channels(uint32_t chan_num1, uint32_t chan_num2);
|
||||
*
|
||||
* Return: true if the given channel is a valid 5G SBS
|
||||
*/
|
||||
bool reg_is_channel_valid_5g_sbs(uint32_t curchan, uint32_t newchan);
|
||||
bool reg_is_channel_valid_5g_sbs(uint8_t curchan, uint8_t newchan);
|
||||
|
||||
/**
|
||||
* reg_min_24ghz_ch_num() - Get minimum 2.4GHz channel number
|
||||
*
|
||||
* Return: Minimum 2.4GHz channel number
|
||||
*/
|
||||
uint32_t reg_min_24ghz_ch_num(void);
|
||||
uint8_t reg_min_24ghz_ch_num(void);
|
||||
|
||||
/**
|
||||
* reg_max_24ghz_ch_num() - Get maximum 2.4GHz channel number
|
||||
*
|
||||
* Return: Maximum 2.4GHz channel number
|
||||
*/
|
||||
uint32_t reg_max_24ghz_ch_num(void);
|
||||
uint8_t reg_max_24ghz_ch_num(void);
|
||||
|
||||
/**
|
||||
* reg_min_5ghz_ch_num() - Get minimum 5GHz channel number
|
||||
*
|
||||
* Return: Minimum 5GHz channel number
|
||||
*/
|
||||
uint32_t reg_min_5ghz_ch_num(void);
|
||||
uint8_t reg_min_5ghz_ch_num(void);
|
||||
|
||||
/**
|
||||
* reg_max_5ghz_ch_num() - Get maximum 5GHz channel number
|
||||
*
|
||||
* Return: Maximum 5GHz channel number
|
||||
*/
|
||||
uint32_t reg_max_5ghz_ch_num(void);
|
||||
uint8_t reg_max_5ghz_ch_num(void);
|
||||
#endif /* CONFIG_CHAN_NUM_API */
|
||||
|
||||
#ifdef CONFIG_CHAN_FREQ_API
|
||||
@@ -677,28 +677,28 @@ uint32_t reg_max_5ghz_ch_num(void);
|
||||
*
|
||||
* Return: Minimum 2.4GHz channel frequency
|
||||
*/
|
||||
uint16_t reg_min_24ghz_chan_freq(void);
|
||||
qdf_freq_t reg_min_24ghz_chan_freq(void);
|
||||
|
||||
/**
|
||||
* reg_max_24ghz_chan_freq() - Get maximum 2.4GHz channel frequency
|
||||
*
|
||||
* Return: Maximum 2.4GHz channel frequency
|
||||
*/
|
||||
uint16_t reg_max_24ghz_chan_freq(void);
|
||||
qdf_freq_t reg_max_24ghz_chan_freq(void);
|
||||
|
||||
/**
|
||||
* reg_min_5ghz_chan_freq() - Get minimum 5GHz channel frequency
|
||||
*
|
||||
* Return: Minimum 5GHz channel frequency
|
||||
*/
|
||||
uint16_t reg_min_5ghz_chan_freq(void);
|
||||
qdf_freq_t reg_min_5ghz_chan_freq(void);
|
||||
|
||||
/**
|
||||
* reg_max_5ghz_chan_freq() - Get maximum 5GHz channel frequency
|
||||
*
|
||||
* Return: Maximum 5GHz channel frequency
|
||||
*/
|
||||
uint16_t reg_max_5ghz_chan_freq(void);
|
||||
qdf_freq_t reg_max_5ghz_chan_freq(void);
|
||||
#endif /* CONFIG_CHAN_FREQ_API */
|
||||
|
||||
/**
|
||||
@@ -747,7 +747,7 @@ QDF_STATUS reg_disable_chan_coex(struct wlan_objmgr_pdev *pdev,
|
||||
*
|
||||
* Return: Channel enum
|
||||
*/
|
||||
enum channel_enum reg_get_chan_enum_for_freq(uint16_t freq);
|
||||
enum channel_enum reg_get_chan_enum_for_freq(qdf_freq_t freq);
|
||||
|
||||
/**
|
||||
* reg_get_channel_list_with_power_for_freq() - Provides the channel list with
|
||||
@@ -771,7 +771,7 @@ reg_get_channel_list_with_power_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
* Return: channel state
|
||||
*/
|
||||
enum channel_state reg_get_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq);
|
||||
qdf_freq_t freq);
|
||||
|
||||
/**
|
||||
* reg_get_5g_bonded_channel_state_for_freq() - Get channel state for
|
||||
@@ -784,7 +784,7 @@ enum channel_state reg_get_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
*/
|
||||
enum channel_state
|
||||
reg_get_5g_bonded_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq,
|
||||
qdf_freq_t freq,
|
||||
enum phy_ch_width bw);
|
||||
|
||||
/**
|
||||
@@ -800,8 +800,8 @@ reg_get_5g_bonded_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
*/
|
||||
enum channel_state
|
||||
reg_get_2g_bonded_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t oper_ch_freq,
|
||||
uint16_t sec_ch_freq,
|
||||
qdf_freq_t oper_ch_freq,
|
||||
qdf_freq_t sec_ch_freq,
|
||||
enum phy_ch_width bw);
|
||||
|
||||
/**
|
||||
@@ -815,8 +815,8 @@ reg_get_2g_bonded_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
* Return: None
|
||||
*/
|
||||
void reg_set_channel_params_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq,
|
||||
uint16_t sec_ch_2g_freq,
|
||||
qdf_freq_t freq,
|
||||
qdf_freq_t sec_ch_2g_freq,
|
||||
struct ch_params *ch_params);
|
||||
|
||||
/**
|
||||
@@ -827,7 +827,7 @@ void reg_set_channel_params_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
* Return: txpower
|
||||
*/
|
||||
uint8_t reg_get_channel_reg_power_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq);
|
||||
qdf_freq_t freq);
|
||||
|
||||
/**
|
||||
* reg_update_nol_ch_for_freq () - Updates NOL channels in current channel list
|
||||
@@ -849,7 +849,7 @@ void reg_update_nol_ch_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
*
|
||||
* Return: true or false
|
||||
*/
|
||||
bool reg_is_dfs_for_freq(struct wlan_objmgr_pdev *pdev, uint16_t freq);
|
||||
bool reg_is_dfs_for_freq(struct wlan_objmgr_pdev *pdev, qdf_freq_t freq);
|
||||
|
||||
/**
|
||||
* reg_chan_freq_is_49ghz() - Check if the input channel center frequency is
|
||||
@@ -859,7 +859,7 @@ bool reg_is_dfs_for_freq(struct wlan_objmgr_pdev *pdev, uint16_t freq);
|
||||
*
|
||||
* Return: true if the frequency is 4.9GHz else false.
|
||||
*/
|
||||
bool reg_chan_freq_is_49ghz(uint16_t freq);
|
||||
bool reg_chan_freq_is_49ghz(qdf_freq_t freq);
|
||||
|
||||
/**
|
||||
* reg_update_nol_history_ch_for_freq() - Set nol-history flag for the channels
|
||||
@@ -884,7 +884,7 @@ void reg_update_nol_history_ch_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
*
|
||||
* Return: true if both the frequencies has the same band.
|
||||
*/
|
||||
bool reg_is_same_band_freqs(uint16_t freq1, uint16_t freq2);
|
||||
bool reg_is_same_band_freqs(qdf_freq_t freq1, qdf_freq_t freq2);
|
||||
|
||||
/**
|
||||
* reg_is_frequency_valid_5g_sbs() Check if the given frequency is 5G SBS.
|
||||
@@ -893,7 +893,7 @@ bool reg_is_same_band_freqs(uint16_t freq1, uint16_t freq2);
|
||||
*
|
||||
* Return: true if the given center frequency is a valid 5G SBS
|
||||
*/
|
||||
bool reg_is_frequency_valid_5g_sbs(uint16_t curfreq, uint16_t newfreq);
|
||||
bool reg_is_frequency_valid_5g_sbs(qdf_freq_t curfreq, qdf_freq_t newfreq);
|
||||
|
||||
/**
|
||||
* reg_freq_to_band() - Get band from channel frequency
|
||||
@@ -901,21 +901,21 @@ bool reg_is_frequency_valid_5g_sbs(uint16_t curfreq, uint16_t newfreq);
|
||||
*
|
||||
* Return: wifi band
|
||||
*/
|
||||
enum reg_wifi_band reg_freq_to_band(uint16_t freq);
|
||||
enum reg_wifi_band reg_freq_to_band(qdf_freq_t freq);
|
||||
|
||||
/**
|
||||
* reg_min_chan_freq() - minimum channel frequency supported
|
||||
*
|
||||
* Return: channel frequency
|
||||
*/
|
||||
uint16_t reg_min_chan_freq(void);
|
||||
qdf_freq_t reg_min_chan_freq(void);
|
||||
|
||||
/**
|
||||
* reg_max_chan_freq() - maximum channel frequency supported
|
||||
*
|
||||
* Return: channel frequency
|
||||
*/
|
||||
uint16_t reg_max_chan_freq(void);
|
||||
qdf_freq_t reg_max_chan_freq(void);
|
||||
|
||||
/**
|
||||
* reg_get_5g_bonded_channel_for_freq()- Return the channel state for a
|
||||
|
@@ -43,7 +43,7 @@
|
||||
#define IS_VALID_PDEV_REG_OBJ(pdev_priv_obj) (pdev_priv_obj)
|
||||
|
||||
#ifdef CONFIG_CHAN_NUM_API
|
||||
bool reg_chan_has_dfs_attribute(struct wlan_objmgr_pdev *pdev, uint32_t ch)
|
||||
bool reg_chan_has_dfs_attribute(struct wlan_objmgr_pdev *pdev, uint8_t ch)
|
||||
{
|
||||
enum channel_enum ch_idx;
|
||||
struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
|
||||
@@ -70,7 +70,7 @@ bool reg_chan_has_dfs_attribute(struct wlan_objmgr_pdev *pdev, uint32_t ch)
|
||||
|
||||
#ifdef CONFIG_CHAN_FREQ_API
|
||||
bool reg_chan_has_dfs_attribute_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq)
|
||||
qdf_freq_t freq)
|
||||
{
|
||||
enum channel_enum ch_idx;
|
||||
struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
|
||||
@@ -305,7 +305,7 @@ QDF_STATUS reg_get_domain_from_country_code(v_REGDOMAIN_t *reg_domain_ptr,
|
||||
|
||||
#ifdef CONFIG_CHAN_NUM_API
|
||||
bool reg_is_passive_or_disable_ch(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t chan)
|
||||
uint8_t chan)
|
||||
{
|
||||
enum channel_state ch_state;
|
||||
|
||||
@@ -318,7 +318,7 @@ bool reg_is_passive_or_disable_ch(struct wlan_objmgr_pdev *pdev,
|
||||
|
||||
#ifdef CONFIG_CHAN_FREQ_API
|
||||
bool reg_is_passive_or_disable_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq)
|
||||
qdf_freq_t freq)
|
||||
{
|
||||
enum channel_state chan_state;
|
||||
|
||||
@@ -331,7 +331,7 @@ bool reg_is_passive_or_disable_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
|
||||
#ifdef WLAN_FEATURE_DSRC
|
||||
#ifdef CONFIG_CHAN_FREQ_API
|
||||
bool reg_is_dsrc_freq(uint16_t freq)
|
||||
bool reg_is_dsrc_freq(qdf_freq_t freq)
|
||||
{
|
||||
if (!REG_IS_5GHZ_FREQ(chan))
|
||||
return false;
|
||||
@@ -344,10 +344,10 @@ bool reg_is_dsrc_freq(uint16_t freq)
|
||||
#endif /*CONFIG_CHAN_FREQ_API*/
|
||||
|
||||
#ifdef CONFIG_CHAN_NUM_API
|
||||
bool reg_is_dsrc_chan(struct wlan_objmgr_pdev *pdev, uint32_t chan)
|
||||
bool reg_is_dsrc_chan(struct wlan_objmgr_pdev *pdev, uint8_t chan)
|
||||
{
|
||||
struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
|
||||
uint32_t freq = 0;
|
||||
qdf_freq_t freq = 0;
|
||||
|
||||
pdev_priv_obj = reg_get_pdev_obj(pdev);
|
||||
|
||||
@@ -400,10 +400,10 @@ bool reg_is_etsi13_srd_chan_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
#endif /* CONFIG_CHAN_FREQ_API */
|
||||
|
||||
#ifdef CONFIG_CHAN_NUM_API
|
||||
bool reg_is_etsi13_srd_chan(struct wlan_objmgr_pdev *pdev, uint32_t chan)
|
||||
bool reg_is_etsi13_srd_chan(struct wlan_objmgr_pdev *pdev, uint8_t chan)
|
||||
{
|
||||
struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
|
||||
uint32_t freq = 0;
|
||||
qdf_freq_t freq = 0;
|
||||
|
||||
pdev_priv_obj = reg_get_pdev_obj(pdev);
|
||||
|
||||
@@ -815,7 +815,7 @@ QDF_STATUS reg_set_config_vars(struct wlan_objmgr_psoc *psoc,
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CHAN_FREQ_API
|
||||
bool reg_is_disable_for_freq(struct wlan_objmgr_pdev *pdev, uint16_t freq)
|
||||
bool reg_is_disable_for_freq(struct wlan_objmgr_pdev *pdev, qdf_freq_t freq)
|
||||
{
|
||||
enum channel_state ch_state;
|
||||
|
||||
@@ -826,7 +826,7 @@ bool reg_is_disable_for_freq(struct wlan_objmgr_pdev *pdev, uint16_t freq)
|
||||
#endif /* CONFIG_CHAN_FREQ_API */
|
||||
|
||||
#ifdef CONFIG_CHAN_NUM_API
|
||||
bool reg_is_disable_ch(struct wlan_objmgr_pdev *pdev, uint32_t chan)
|
||||
bool reg_is_disable_ch(struct wlan_objmgr_pdev *pdev, uint8_t chan)
|
||||
{
|
||||
enum channel_state ch_state;
|
||||
|
||||
|
@@ -61,7 +61,7 @@ bool reg_is_world_ctry_code(uint16_t ctry_code);
|
||||
*
|
||||
* Return: true if chan is dfs, otherwise false
|
||||
*/
|
||||
bool reg_chan_has_dfs_attribute(struct wlan_objmgr_pdev *pdev, uint32_t ch);
|
||||
bool reg_chan_has_dfs_attribute(struct wlan_objmgr_pdev *pdev, uint8_t ch);
|
||||
|
||||
/**
|
||||
* reg_is_passive_or_disable_ch() - Check if the given channel is passive or
|
||||
@@ -71,7 +71,7 @@ bool reg_chan_has_dfs_attribute(struct wlan_objmgr_pdev *pdev, uint32_t ch);
|
||||
*
|
||||
* Return: true if channel is passive or disabled, else false.
|
||||
*/
|
||||
bool reg_is_passive_or_disable_ch(struct wlan_objmgr_pdev *pdev, uint32_t chan);
|
||||
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
|
||||
@@ -80,22 +80,22 @@ bool reg_is_passive_or_disable_ch(struct wlan_objmgr_pdev *pdev, uint32_t chan);
|
||||
*
|
||||
* Return: True if channel state is disabled, else false
|
||||
*/
|
||||
bool reg_is_disable_ch(struct wlan_objmgr_pdev *pdev, uint32_t chan);
|
||||
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, uint32_t ch)
|
||||
reg_chan_has_dfs_attribute(struct wlan_objmgr_pdev *pdev, uint8_t ch)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
reg_is_passive_or_disable_ch(struct wlan_objmgr_pdev *pdev, uint32_t chan)
|
||||
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, uint32_t chan)
|
||||
reg_is_disable_ch(struct wlan_objmgr_pdev *pdev, uint8_t chan)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -113,7 +113,7 @@ reg_is_disable_ch(struct wlan_objmgr_pdev *pdev, uint32_t chan)
|
||||
* Return: true if channel frequency is dfs, otherwise false
|
||||
*/
|
||||
bool reg_chan_has_dfs_attribute_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq);
|
||||
qdf_freq_t freq);
|
||||
/**
|
||||
* reg_is_passive_or_disable_for_freq() - Check if the given channel is
|
||||
* passive or disabled.
|
||||
@@ -123,7 +123,7 @@ bool reg_chan_has_dfs_attribute_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
* Return: true if channel frequency is passive or disabled, else false.
|
||||
*/
|
||||
bool reg_is_passive_or_disable_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq);
|
||||
qdf_freq_t freq);
|
||||
/**
|
||||
* reg_is_disable_for_freq() - Check if the given channel frequency in
|
||||
* disable state
|
||||
@@ -132,24 +132,24 @@ bool reg_is_passive_or_disable_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, uint16_t freq);
|
||||
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,
|
||||
uint16_t freq)
|
||||
qdf_freq_t freq)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
reg_is_passive_or_disable_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq)
|
||||
qdf_freq_t freq)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
reg_is_disable_for_freq(struct wlan_objmgr_pdev *pdev, uint16_t freq)
|
||||
reg_is_disable_for_freq(struct wlan_objmgr_pdev *pdev, qdf_freq_t freq)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -527,11 +527,11 @@ bool reg_is_dsrc_freq(uint16_t freq);
|
||||
*
|
||||
* Return: true or false
|
||||
*/
|
||||
bool reg_is_dsrc_chan(struct wlan_objmgr_pdev *pdev, uint32_t chan);
|
||||
bool reg_is_dsrc_chan(struct wlan_objmgr_pdev *pdev, uint8_t chan);
|
||||
#endif /* CONFIG_CHAN_NUM_API */
|
||||
|
||||
static inline bool reg_is_etsi13_srd_chan(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t chan)
|
||||
uint8_t chan)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -562,7 +562,7 @@ reg_is_etsi13_srd_chan_allowed_master_mode(struct wlan_objmgr_pdev *pdev)
|
||||
}
|
||||
#elif defined(CONFIG_REG_CLIENT)
|
||||
static inline bool reg_is_dsrc_chan(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t chan)
|
||||
uint8_t chan)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -593,7 +593,7 @@ bool reg_is_etsi13_regdmn(struct wlan_objmgr_pdev *pdev);
|
||||
*
|
||||
* Return: true or false
|
||||
*/
|
||||
bool reg_is_etsi13_srd_chan(struct wlan_objmgr_pdev *pdev, uint32_t chan);
|
||||
bool reg_is_etsi13_srd_chan(struct wlan_objmgr_pdev *pdev, uint8_t chan);
|
||||
#endif /* CONFIG_CHAN_NUM_API */
|
||||
|
||||
/**
|
||||
@@ -607,7 +607,7 @@ bool reg_is_etsi13_srd_chan(struct wlan_objmgr_pdev *pdev, uint32_t chan);
|
||||
bool reg_is_etsi13_srd_chan_allowed_master_mode(struct wlan_objmgr_pdev *pdev);
|
||||
#else
|
||||
static inline bool reg_is_dsrc_chan(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t chan)
|
||||
uint8_t chan)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -636,7 +636,7 @@ reg_is_etsi13_srd_chan_allowed_master_mode(struct wlan_objmgr_pdev *pdev)
|
||||
}
|
||||
|
||||
static inline bool reg_is_etsi13_srd_chan(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t chan)
|
||||
uint8_t chan)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@@ -36,7 +36,7 @@
|
||||
#define REG_MAX_CHAN_CHANGE_CBKS 30
|
||||
#define MAX_STA_VDEV_CNT 4
|
||||
#define INVALID_VDEV_ID 0xFF
|
||||
#define INVALID_CHANNEL_NUM 0xBAD
|
||||
#define INVALID_CHANNEL_NUM 0x0
|
||||
#define CH_AVOID_MAX_RANGE 4
|
||||
#define REG_ALPHA2_LEN 2
|
||||
#define MAX_REG_RULES 10
|
||||
@@ -74,6 +74,7 @@
|
||||
* detection.
|
||||
* @DFS_UNDEF_REGION: Undefined region
|
||||
*/
|
||||
|
||||
enum dfs_reg {
|
||||
DFS_UNINIT_REGION = 0,
|
||||
DFS_FCC_REGION = 1,
|
||||
@@ -527,10 +528,10 @@ enum ctl_value {
|
||||
struct ch_params {
|
||||
enum phy_ch_width ch_width;
|
||||
uint8_t sec_ch_offset;
|
||||
uint8_t center_freq_seg0;
|
||||
uint8_t center_freq_seg1;
|
||||
uint16_t mhz_freq_seg0;
|
||||
uint16_t mhz_freq_seg1;
|
||||
qdf_freq_t center_freq_seg0;
|
||||
qdf_freq_t center_freq_seg1;
|
||||
qdf_freq_t mhz_freq_seg0;
|
||||
qdf_freq_t mhz_freq_seg1;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -540,8 +541,8 @@ struct ch_params {
|
||||
* @tx_power: TX power
|
||||
*/
|
||||
struct channel_power {
|
||||
uint32_t center_freq;
|
||||
uint32_t chan_num;
|
||||
qdf_freq_t center_freq;
|
||||
uint8_t chan_num;
|
||||
uint32_t tx_power;
|
||||
};
|
||||
|
||||
@@ -592,7 +593,7 @@ struct reg_dmn_op_class_map_t {
|
||||
uint8_t chan_spacing;
|
||||
enum offset_t offset;
|
||||
uint16_t behav_limit;
|
||||
uint16_t start_freq;
|
||||
qdf_freq_t start_freq;
|
||||
uint8_t channels[REG_MAX_CHANNELS_PER_OPERATING_CLASS];
|
||||
};
|
||||
|
||||
@@ -664,8 +665,8 @@ enum country_src {
|
||||
* @nol_history: Set NOL-History when STA vap detects RADAR.
|
||||
*/
|
||||
struct regulatory_channel {
|
||||
uint32_t center_freq;
|
||||
uint32_t chan_num;
|
||||
qdf_freq_t center_freq;
|
||||
uint8_t chan_num;
|
||||
enum channel_state state;
|
||||
uint32_t chan_flags;
|
||||
uint32_t tx_power;
|
||||
@@ -710,8 +711,8 @@ struct regulatory {
|
||||
* @max_bw: max bw
|
||||
*/
|
||||
struct chan_map {
|
||||
uint32_t center_freq;
|
||||
uint32_t chan_num;
|
||||
qdf_freq_t center_freq;
|
||||
uint8_t chan_num;
|
||||
uint16_t min_bw;
|
||||
uint16_t max_bw;
|
||||
};
|
||||
@@ -722,8 +723,8 @@ struct chan_map {
|
||||
* @end_ch: end channel
|
||||
*/
|
||||
struct bonded_channel {
|
||||
uint16_t start_ch;
|
||||
uint16_t end_ch;
|
||||
uint8_t start_ch;
|
||||
uint8_t end_ch;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1033,8 +1034,8 @@ struct cur_regdmn_info {
|
||||
* @end_freq: end freq
|
||||
*/
|
||||
struct ch_avoid_freq_type {
|
||||
uint32_t start_freq;
|
||||
uint32_t end_freq;
|
||||
qdf_freq_t start_freq;
|
||||
qdf_freq_t end_freq;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -33,7 +33,7 @@
|
||||
* Return: Minimum 2.4GHz channel number
|
||||
*/
|
||||
#define WLAN_REG_MIN_24GHZ_CH_NUM wlan_reg_min_24ghz_ch_num()
|
||||
uint32_t wlan_reg_min_24ghz_ch_num(void);
|
||||
uint8_t wlan_reg_min_24ghz_ch_num(void);
|
||||
|
||||
/**
|
||||
* wlan_reg_max_24ghz_ch_num() - Get maximum 2.4GHz channel number
|
||||
@@ -41,7 +41,7 @@ uint32_t wlan_reg_min_24ghz_ch_num(void);
|
||||
* Return: Maximum 2.4GHz channel number
|
||||
*/
|
||||
#define WLAN_REG_MAX_24GHZ_CH_NUM wlan_reg_max_24ghz_ch_num()
|
||||
uint32_t wlan_reg_max_24ghz_ch_num(void);
|
||||
uint8_t wlan_reg_max_24ghz_ch_num(void);
|
||||
|
||||
/**
|
||||
* wlan_reg_min_5ghz_ch_num() - Get minimum 5GHz channel number
|
||||
@@ -49,7 +49,7 @@ uint32_t wlan_reg_max_24ghz_ch_num(void);
|
||||
* Return: Minimum 5GHz channel number
|
||||
*/
|
||||
#define WLAN_REG_MIN_5GHZ_CH_NUM wlan_reg_min_5ghz_ch_num()
|
||||
uint32_t wlan_reg_min_5ghz_ch_num(void);
|
||||
uint8_t wlan_reg_min_5ghz_ch_num(void);
|
||||
|
||||
/**
|
||||
* wlan_reg_max_5ghz_ch_num() - Get maximum 5GHz channel number
|
||||
@@ -57,7 +57,7 @@ uint32_t wlan_reg_min_5ghz_ch_num(void);
|
||||
* Return: Maximum 5GHz channel number
|
||||
*/
|
||||
#define WLAN_REG_MAX_5GHZ_CH_NUM wlan_reg_max_5ghz_ch_num()
|
||||
uint32_t wlan_reg_max_5ghz_ch_num(void);
|
||||
uint8_t wlan_reg_max_5ghz_ch_num(void);
|
||||
#endif /* CONFIG_CHAN_NUM_API */
|
||||
|
||||
#ifdef CONFIG_CHAN_FREQ_API
|
||||
@@ -67,7 +67,7 @@ uint32_t wlan_reg_max_5ghz_ch_num(void);
|
||||
* Return: Minimum 2.4GHz channel frequency
|
||||
*/
|
||||
#define WLAN_REG_MIN_24GHZ_CHAN_FREQ wlan_reg_min_24ghz_chan_freq()
|
||||
uint16_t wlan_reg_min_24ghz_chan_freq(void);
|
||||
qdf_freq_t wlan_reg_min_24ghz_chan_freq(void);
|
||||
|
||||
/**
|
||||
* wlan_reg_max_24ghz_chan_freq() - Get maximum 2.4GHz channel frequency
|
||||
@@ -75,7 +75,7 @@ uint16_t wlan_reg_min_24ghz_chan_freq(void);
|
||||
* Return: Maximum 2.4GHz channel frequency
|
||||
*/
|
||||
#define WLAN_REG_MAX_24GHZ_CHAN_FREQ wlan_reg_max_24ghz_chan_freq()
|
||||
uint16_t wlan_reg_max_24ghz_chan_freq(void);
|
||||
qdf_freq_t wlan_reg_max_24ghz_chan_freq(void);
|
||||
|
||||
/**
|
||||
* wlan_reg_min_5ghz_chan_freq() - Get minimum 5GHz channel frequency
|
||||
@@ -83,7 +83,7 @@ uint16_t wlan_reg_max_24ghz_chan_freq(void);
|
||||
* Return: Minimum 5GHz channel frequency
|
||||
*/
|
||||
#define WLAN_REG_MIN_5GHZ_CHAN_FREQ wlan_reg_min_5ghz_chan_freq()
|
||||
uint16_t wlan_reg_min_5ghz_chan_freq(void);
|
||||
qdf_freq_t wlan_reg_min_5ghz_chan_freq(void);
|
||||
|
||||
/**
|
||||
* wlan_reg_max_5ghz_chan_freq() - Get maximum 5GHz channel frequency
|
||||
@@ -91,7 +91,7 @@ uint16_t wlan_reg_min_5ghz_chan_freq(void);
|
||||
* Return: Maximum 5GHz channel frequency
|
||||
*/
|
||||
#define WLAN_REG_MAX_5GHZ_CHAN_FREQ wlan_reg_max_5ghz_chan_freq()
|
||||
uint16_t wlan_reg_max_5ghz_chan_freq(void);
|
||||
qdf_freq_t wlan_reg_max_5ghz_chan_freq(void);
|
||||
#endif /* CONFIG_CHAN_FREQ_API */
|
||||
|
||||
#ifdef CONFIG_CHAN_NUM_API
|
||||
@@ -102,7 +102,7 @@ uint16_t wlan_reg_max_5ghz_chan_freq(void);
|
||||
* Return: true if channel number is 2.4GHz, else false
|
||||
*/
|
||||
#define WLAN_REG_IS_24GHZ_CH(chan) wlan_reg_is_24ghz_ch(chan)
|
||||
bool wlan_reg_is_24ghz_ch(uint32_t chan);
|
||||
bool wlan_reg_is_24ghz_ch(uint8_t chan);
|
||||
|
||||
/**
|
||||
* wlan_reg_is_5ghz_ch() - Check if the given channel number is 5GHz
|
||||
@@ -111,7 +111,7 @@ bool wlan_reg_is_24ghz_ch(uint32_t chan);
|
||||
* Return: true if channel number is 5GHz, else false
|
||||
*/
|
||||
#define WLAN_REG_IS_5GHZ_CH(chan) wlan_reg_is_5ghz_ch(chan)
|
||||
bool wlan_reg_is_5ghz_ch(uint32_t chan);
|
||||
bool wlan_reg_is_5ghz_ch(uint8_t chan);
|
||||
#endif /* CONFIG_CHAN_NUM_API */
|
||||
|
||||
/**
|
||||
@@ -121,7 +121,7 @@ bool wlan_reg_is_5ghz_ch(uint32_t chan);
|
||||
* Return: true if channel frequency is 2.4GHz, else false
|
||||
*/
|
||||
#define WLAN_REG_IS_24GHZ_CH_FREQ(freq) wlan_reg_is_24ghz_ch_freq(freq)
|
||||
bool wlan_reg_is_24ghz_ch_freq(uint32_t freq);
|
||||
bool wlan_reg_is_24ghz_ch_freq(qdf_freq_t freq);
|
||||
|
||||
/**
|
||||
* wlan_reg_is_5ghz_ch_freq() - Check if the given channel frequency is 5GHz
|
||||
@@ -130,7 +130,7 @@ bool wlan_reg_is_24ghz_ch_freq(uint32_t freq);
|
||||
* Return: true if channel frequency is 5GHz, else false
|
||||
*/
|
||||
#define WLAN_REG_IS_5GHZ_CH_FREQ(freq) wlan_reg_is_5ghz_ch_freq(freq)
|
||||
bool wlan_reg_is_5ghz_ch_freq(uint32_t freq);
|
||||
bool wlan_reg_is_5ghz_ch_freq(qdf_freq_t freq);
|
||||
|
||||
#ifdef CONFIG_BAND_6GHZ
|
||||
/**
|
||||
@@ -225,9 +225,9 @@ wlan_reg_get_band_channel_list(struct wlan_objmgr_pdev *pdev,
|
||||
* supported only for 2.4Ghz and 5Ghz bands. For other bands the following
|
||||
* priority is given: 1) 6Ghz 2) 5Ghz 3) 2.4Ghz.
|
||||
*/
|
||||
uint16_t wlan_reg_chan_band_to_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t chan,
|
||||
uint8_t band_mask);
|
||||
qdf_freq_t wlan_reg_chan_band_to_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t chan,
|
||||
uint8_t band_mask);
|
||||
|
||||
/**
|
||||
* wlan_reg_is_49ghz_freq() - Check if the given channel frequency is 4.9GHz
|
||||
@@ -236,7 +236,7 @@ uint16_t wlan_reg_chan_band_to_freq(struct wlan_objmgr_pdev *pdev,
|
||||
* Return: true if channel frequency is 4.9GHz, else false
|
||||
*/
|
||||
#define WLAN_REG_IS_49GHZ_FREQ(freq) wlan_reg_is_49ghz_freq(freq)
|
||||
bool wlan_reg_is_49ghz_freq(uint32_t freq);
|
||||
bool wlan_reg_is_49ghz_freq(qdf_freq_t freq);
|
||||
|
||||
/**
|
||||
* wlan_reg_ch_num() - Get channel number from channel enum
|
||||
@@ -245,7 +245,7 @@ bool wlan_reg_is_49ghz_freq(uint32_t freq);
|
||||
* Return: channel number
|
||||
*/
|
||||
#define WLAN_REG_CH_NUM(ch_enum) wlan_reg_ch_num(ch_enum)
|
||||
uint32_t wlan_reg_ch_num(uint32_t ch_enum);
|
||||
uint8_t wlan_reg_ch_num(uint32_t ch_enum);
|
||||
|
||||
/**
|
||||
* wlan_reg_ch_to_freq() - Get channel frequency from channel enum
|
||||
@@ -254,7 +254,7 @@ uint32_t wlan_reg_ch_num(uint32_t ch_enum);
|
||||
* Return: channel frequency
|
||||
*/
|
||||
#define WLAN_REG_CH_TO_FREQ(ch_enum) wlan_reg_ch_to_freq(ch_enum)
|
||||
uint32_t wlan_reg_ch_to_freq(uint32_t ch_enum);
|
||||
qdf_freq_t wlan_reg_ch_to_freq(uint32_t ch_enum);
|
||||
|
||||
#ifdef CONFIG_CHAN_NUM_API
|
||||
/**
|
||||
@@ -267,7 +267,7 @@ uint32_t wlan_reg_ch_to_freq(uint32_t ch_enum);
|
||||
*/
|
||||
#define WLAN_REG_IS_SAME_BAND_CHANNELS(chan_num1, chan_num2) \
|
||||
wlan_reg_is_same_band_channels(chan_num1, chan_num2)
|
||||
bool wlan_reg_is_same_band_channels(uint32_t chan_num1, uint32_t chan_num2);
|
||||
bool wlan_reg_is_same_band_channels(uint8_t chan_num1, uint8_t chan_num2);
|
||||
|
||||
/**
|
||||
* wlan_reg_is_channel_valid_5g_sbs() Check if the given channel is 5G SBS.
|
||||
@@ -278,7 +278,7 @@ bool wlan_reg_is_same_band_channels(uint32_t chan_num1, uint32_t chan_num2);
|
||||
*/
|
||||
#define WLAN_REG_IS_CHANNEL_VALID_5G_SBS(curchan, newchan) \
|
||||
wlan_reg_is_channel_valid_5g_sbs(curchan, newchan)
|
||||
bool wlan_reg_is_channel_valid_5g_sbs(uint32_t curchan, uint32_t newchan);
|
||||
bool wlan_reg_is_channel_valid_5g_sbs(uint8_t curchan, uint8_t newchan);
|
||||
#endif /* CONFIG_CHAN_NUM_API */
|
||||
|
||||
|
||||
@@ -290,7 +290,7 @@ bool wlan_reg_is_channel_valid_5g_sbs(uint32_t curchan, uint32_t newchan);
|
||||
* Return: band info
|
||||
*/
|
||||
#define WLAN_REG_CHAN_TO_BAND(chan_num) wlan_reg_chan_to_band(chan_num)
|
||||
enum band_info wlan_reg_chan_to_band(uint32_t chan_num);
|
||||
enum band_info wlan_reg_chan_to_band(uint8_t chan_num);
|
||||
|
||||
/**
|
||||
* wlan_reg_get_channel_list_with_power() - Provide the channel list with power
|
||||
@@ -341,7 +341,7 @@ QDF_STATUS wlan_reg_read_current_country(struct wlan_objmgr_psoc *psoc,
|
||||
* Return: true if chan is dfs, otherwise false
|
||||
*/
|
||||
bool
|
||||
wlan_reg_chan_has_dfs_attribute(struct wlan_objmgr_pdev *pdev, uint32_t ch);
|
||||
wlan_reg_chan_has_dfs_attribute(struct wlan_objmgr_pdev *pdev, uint8_t ch);
|
||||
|
||||
/**
|
||||
* wlan_reg_is_etsi13_srd_chan () - Checks if the ch is ETSI13 srd ch or not
|
||||
@@ -364,7 +364,7 @@ bool wlan_reg_is_etsi13_srd_chan(struct wlan_objmgr_pdev *pdev,
|
||||
* Return: true or false
|
||||
*/
|
||||
bool wlan_reg_is_etsi13_srd_chan_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq);
|
||||
qdf_freq_t freq);
|
||||
#endif /*CONFIG_CHAN_FREQ_API*/
|
||||
|
||||
/**
|
||||
@@ -402,7 +402,7 @@ bool wlan_reg_is_world(uint8_t *country);
|
||||
*
|
||||
* Return: Channel enum
|
||||
*/
|
||||
enum channel_enum wlan_reg_get_chan_enum(uint32_t chan_num);
|
||||
enum channel_enum wlan_reg_get_chan_enum(uint8_t chan_num);
|
||||
|
||||
/**
|
||||
* wlan_reg_get_channel_state() - Get channel state from regulatory
|
||||
@@ -411,7 +411,7 @@ enum channel_enum wlan_reg_get_chan_enum(uint32_t chan_num);
|
||||
* Return: channel state
|
||||
*/
|
||||
enum channel_state wlan_reg_get_channel_state(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t ch);
|
||||
uint8_t ch);
|
||||
|
||||
/**
|
||||
* wlan_reg_get_5g_bonded_channel_state() - Get 5G bonded channel state
|
||||
@@ -468,7 +468,7 @@ QDF_STATUS wlan_reg_get_dfs_region(struct wlan_objmgr_pdev *pdev,
|
||||
* Return: int
|
||||
*/
|
||||
uint32_t wlan_reg_get_channel_reg_power(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t chan_num);
|
||||
uint8_t chan_num);
|
||||
|
||||
/**
|
||||
* wlan_reg_get_channel_freq() - provide the channel center freq
|
||||
@@ -476,8 +476,8 @@ uint32_t wlan_reg_get_channel_reg_power(struct wlan_objmgr_pdev *pdev,
|
||||
*
|
||||
* Return: int
|
||||
*/
|
||||
uint32_t wlan_reg_get_channel_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t chan_num);
|
||||
qdf_freq_t wlan_reg_get_channel_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t chan_num);
|
||||
#endif /* CONFIG_CHAN_NUM_API */
|
||||
|
||||
/**
|
||||
@@ -657,7 +657,7 @@ void wlan_reg_update_nol_ch(struct wlan_objmgr_pdev *pdev,
|
||||
*
|
||||
* Return: true or false
|
||||
*/
|
||||
bool wlan_reg_is_dfs_ch(struct wlan_objmgr_pdev *pdev, uint32_t chan);
|
||||
bool wlan_reg_is_dfs_ch(struct wlan_objmgr_pdev *pdev, uint8_t chan);
|
||||
|
||||
/**
|
||||
* wlan_reg_is_dsrc_chan () - Checks if the channel is dsrc channel or not
|
||||
@@ -677,7 +677,7 @@ bool wlan_reg_is_dsrc_chan(struct wlan_objmgr_pdev *pdev, uint8_t chan_num);
|
||||
* Return: true or false
|
||||
*/
|
||||
bool wlan_reg_is_passive_or_disable_ch(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t chan);
|
||||
uint8_t chan);
|
||||
|
||||
/**
|
||||
* wlan_reg_is_disable_ch () - Checks chan state for disabled
|
||||
@@ -686,7 +686,7 @@ bool wlan_reg_is_passive_or_disable_ch(struct wlan_objmgr_pdev *pdev,
|
||||
*
|
||||
* Return: true or false
|
||||
*/
|
||||
bool wlan_reg_is_disable_ch(struct wlan_objmgr_pdev *pdev, uint32_t chan);
|
||||
bool wlan_reg_is_disable_ch(struct wlan_objmgr_pdev *pdev, uint8_t chan);
|
||||
#endif /* CONFIG_CHAN_NUM_API */
|
||||
|
||||
/**
|
||||
@@ -696,8 +696,8 @@ bool wlan_reg_is_disable_ch(struct wlan_objmgr_pdev *pdev, uint32_t chan);
|
||||
*
|
||||
* Return: true or false
|
||||
*/
|
||||
uint32_t wlan_reg_freq_to_chan(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t freq);
|
||||
uint8_t wlan_reg_freq_to_chan(struct wlan_objmgr_pdev *pdev,
|
||||
qdf_freq_t freq);
|
||||
|
||||
/**
|
||||
* wlan_reg_chan_to_freq () - convert channel number to frequency
|
||||
@@ -705,8 +705,8 @@ uint32_t wlan_reg_freq_to_chan(struct wlan_objmgr_pdev *pdev,
|
||||
*
|
||||
* Return: true or false
|
||||
*/
|
||||
uint32_t wlan_reg_chan_to_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t chan);
|
||||
qdf_freq_t wlan_reg_chan_to_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t chan);
|
||||
|
||||
/**
|
||||
* wlan_reg_legacy_chan_to_freq () - convert chan to freq, for 2G and 5G
|
||||
@@ -714,8 +714,8 @@ uint32_t wlan_reg_chan_to_freq(struct wlan_objmgr_pdev *pdev,
|
||||
*
|
||||
* Return: frequency
|
||||
*/
|
||||
uint16_t wlan_reg_legacy_chan_to_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t chan);
|
||||
qdf_freq_t wlan_reg_legacy_chan_to_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t chan);
|
||||
|
||||
/**
|
||||
* wlan_reg_is_us() - reg is us country
|
||||
@@ -822,10 +822,10 @@ bool wlan_reg_is_11d_scan_inprogress(struct wlan_objmgr_psoc *psoc);
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS wlan_reg_get_freq_range(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t *low_2g,
|
||||
uint32_t *high_2g,
|
||||
uint32_t *low_5g,
|
||||
uint32_t *high_5g);
|
||||
qdf_freq_t *low_2g,
|
||||
qdf_freq_t *high_2g,
|
||||
qdf_freq_t *low_5g,
|
||||
qdf_freq_t *high_5g);
|
||||
/**
|
||||
* wlan_reg_get_tx_ops () - get regulatory tx ops
|
||||
* @psoc: psoc ptr
|
||||
@@ -912,7 +912,7 @@ wlan_reg_disable_chan_coex(struct wlan_objmgr_pdev *pdev,
|
||||
*/
|
||||
#define WLAN_REG_IS_SAME_BAND_FREQS(freq1, freq2) \
|
||||
wlan_reg_is_same_band_freqs(freq1, freq2)
|
||||
bool wlan_reg_is_same_band_freqs(uint16_t freq1, uint16_t freq2);
|
||||
bool wlan_reg_is_same_band_freqs(qdf_freq_t freq1, qdf_freq_t freq2);
|
||||
|
||||
/**
|
||||
* wlan_reg_get_chan_enum_for_freq() - Get channel enum for given channel center
|
||||
@@ -921,7 +921,7 @@ bool wlan_reg_is_same_band_freqs(uint16_t freq1, uint16_t freq2);
|
||||
*
|
||||
* Return: Channel enum
|
||||
*/
|
||||
enum channel_enum wlan_reg_get_chan_enum_for_freq(uint16_t freq);
|
||||
enum channel_enum wlan_reg_get_chan_enum_for_freq(qdf_freq_t freq);
|
||||
|
||||
/**
|
||||
* wlan_reg_update_nol_history_ch_for_freq() - Set nol-history flag for the
|
||||
@@ -947,7 +947,7 @@ void wlan_reg_update_nol_history_ch_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
*/
|
||||
#define WLAN_REG_IS_FREQUENCY_VALID_5G_SBS(curfreq, newfreq) \
|
||||
wlan_reg_is_frequency_valid_5g_sbs(curfreq, newfreq)
|
||||
bool wlan_reg_is_frequency_valid_5g_sbs(uint16_t curfreq, uint16_t newfreq);
|
||||
bool wlan_reg_is_frequency_valid_5g_sbs(qdf_freq_t curfreq, qdf_freq_t newfreq);
|
||||
|
||||
/**
|
||||
* wlan_reg_chan_has_dfs_attribute_for_freq() - check channel has dfs
|
||||
@@ -960,7 +960,7 @@ bool wlan_reg_is_frequency_valid_5g_sbs(uint16_t curfreq, uint16_t newfreq);
|
||||
*/
|
||||
bool
|
||||
wlan_reg_chan_has_dfs_attribute_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq);
|
||||
qdf_freq_t freq);
|
||||
|
||||
/**
|
||||
* wlan_reg_get_channel_list_with_power_for_freq() - Provide the channel list
|
||||
@@ -984,7 +984,7 @@ wlan_reg_get_channel_list_with_power_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
*/
|
||||
enum channel_state
|
||||
wlan_reg_get_5g_bonded_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq,
|
||||
qdf_freq_t freq,
|
||||
enum phy_ch_width bw);
|
||||
/**
|
||||
* wlan_reg_get_2g_bonded_channel_state_for_freq() - Get 2G bonded channel state
|
||||
@@ -997,8 +997,8 @@ wlan_reg_get_5g_bonded_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
*/
|
||||
enum channel_state
|
||||
wlan_reg_get_2g_bonded_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq,
|
||||
uint16_t sec_ch_freq,
|
||||
qdf_freq_t freq,
|
||||
qdf_freq_t sec_ch_freq,
|
||||
enum phy_ch_width bw);
|
||||
|
||||
/**
|
||||
@@ -1010,7 +1010,7 @@ wlan_reg_get_2g_bonded_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
*/
|
||||
enum channel_state
|
||||
wlan_reg_get_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq);
|
||||
qdf_freq_t freq);
|
||||
|
||||
/**
|
||||
* wlan_reg_set_channel_params_for_freq() - Sets channel parameteres for
|
||||
@@ -1023,8 +1023,8 @@ wlan_reg_get_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
* Return: None
|
||||
*/
|
||||
void wlan_reg_set_channel_params_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq,
|
||||
uint16_t sec_ch_2g_freq,
|
||||
qdf_freq_t freq,
|
||||
qdf_freq_t sec_ch_2g_freq,
|
||||
struct ch_params *ch_params);
|
||||
|
||||
/**
|
||||
@@ -1035,7 +1035,7 @@ void wlan_reg_set_channel_params_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
* Return: int
|
||||
*/
|
||||
uint8_t wlan_reg_get_channel_reg_power_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq);
|
||||
qdf_freq_t freq);
|
||||
|
||||
/**
|
||||
* wlan_reg_update_nol_ch_for_freq () - set nol channel
|
||||
@@ -1057,7 +1057,7 @@ void wlan_reg_update_nol_ch_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
*
|
||||
* Return: true or false
|
||||
*/
|
||||
bool wlan_reg_is_dfs_for_freq(struct wlan_objmgr_pdev *pdev, uint16_t freq);
|
||||
bool wlan_reg_is_dfs_for_freq(struct wlan_objmgr_pdev *pdev, qdf_freq_t freq);
|
||||
|
||||
/**
|
||||
* wlan_reg_is_dsrc_freq() - Checks if the channel is dsrc channel or not
|
||||
@@ -1065,7 +1065,7 @@ bool wlan_reg_is_dfs_for_freq(struct wlan_objmgr_pdev *pdev, uint16_t freq);
|
||||
*
|
||||
* Return: true or false
|
||||
*/
|
||||
bool wlan_reg_is_dsrc_freq(uint16_t freq);
|
||||
bool wlan_reg_is_dsrc_freq(qdf_freq_t freq);
|
||||
|
||||
/**
|
||||
* wlan_reg_is_passive_or_disable_for_freq() - Checks chan state for passive
|
||||
@@ -1076,7 +1076,7 @@ bool wlan_reg_is_dsrc_freq(uint16_t freq);
|
||||
* Return: true or false
|
||||
*/
|
||||
bool wlan_reg_is_passive_or_disable_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq);
|
||||
qdf_freq_t freq);
|
||||
|
||||
/**
|
||||
* wlan_reg_is_disable_for_freq() - Checks chan state for disabled
|
||||
@@ -1085,7 +1085,8 @@ bool wlan_reg_is_passive_or_disable_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
*
|
||||
* Return: true or false
|
||||
*/
|
||||
bool wlan_reg_is_disable_for_freq(struct wlan_objmgr_pdev *pdev, uint16_t freq);
|
||||
bool wlan_reg_is_disable_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
qdf_freq_t freq);
|
||||
|
||||
/**
|
||||
* wlan_reg_chan_to_band() - Get band from channel number
|
||||
@@ -1093,21 +1094,21 @@ bool wlan_reg_is_disable_for_freq(struct wlan_objmgr_pdev *pdev, uint16_t freq);
|
||||
*
|
||||
* Return: wifi band
|
||||
*/
|
||||
enum reg_wifi_band wlan_reg_freq_to_band(uint16_t freq);
|
||||
enum reg_wifi_band wlan_reg_freq_to_band(qdf_freq_t freq);
|
||||
|
||||
/**
|
||||
* wlan_reg_min_chan_freq() - Minimum channel frequency supported
|
||||
*
|
||||
* Return: frequency
|
||||
*/
|
||||
uint16_t wlan_reg_min_chan_freq(void);
|
||||
qdf_freq_t wlan_reg_min_chan_freq(void);
|
||||
|
||||
/**
|
||||
* wlan_reg_max_chan_freq() - Return max. frequency
|
||||
*
|
||||
* Return: frequency
|
||||
*/
|
||||
uint16_t wlan_reg_max_chan_freq(void);
|
||||
qdf_freq_t wlan_reg_max_chan_freq(void);
|
||||
|
||||
/**
|
||||
* wlan_reg_freq_width_to_chan_op_class() -Get op class from freq
|
||||
@@ -1122,7 +1123,7 @@ uint16_t wlan_reg_max_chan_freq(void);
|
||||
* Return: void
|
||||
*/
|
||||
void wlan_reg_freq_width_to_chan_op_class(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq,
|
||||
qdf_freq_t freq,
|
||||
uint16_t chan_width,
|
||||
bool global_tbl_lookup,
|
||||
uint16_t behav_limit,
|
||||
@@ -1141,7 +1142,7 @@ void wlan_reg_freq_width_to_chan_op_class(struct wlan_objmgr_pdev *pdev,
|
||||
* Return: void
|
||||
*/
|
||||
void wlan_reg_freq_to_chan_op_class(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq,
|
||||
qdf_freq_t freq,
|
||||
bool global_tbl_lookup,
|
||||
uint16_t behav_limit,
|
||||
uint8_t *op_class,
|
||||
|
@@ -92,7 +92,7 @@ QDF_STATUS wlan_reg_read_current_country(struct wlan_objmgr_psoc *psoc,
|
||||
* Return: channel state
|
||||
*/
|
||||
enum channel_state wlan_reg_get_channel_state(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t ch)
|
||||
uint8_t ch)
|
||||
{
|
||||
/*
|
||||
* Get channel state from regulatory
|
||||
@@ -101,7 +101,7 @@ enum channel_state wlan_reg_get_channel_state(struct wlan_objmgr_pdev *pdev,
|
||||
}
|
||||
|
||||
bool
|
||||
wlan_reg_chan_has_dfs_attribute(struct wlan_objmgr_pdev *pdev, uint32_t ch)
|
||||
wlan_reg_chan_has_dfs_attribute(struct wlan_objmgr_pdev *pdev, uint8_t ch)
|
||||
{
|
||||
return reg_chan_has_dfs_attribute(pdev, ch);
|
||||
}
|
||||
@@ -178,7 +178,7 @@ QDF_STATUS wlan_reg_get_dfs_region(struct wlan_objmgr_pdev *pdev,
|
||||
|
||||
#ifdef CONFIG_CHAN_NUM_API
|
||||
uint32_t wlan_reg_get_channel_reg_power(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t chan_num)
|
||||
uint8_t chan_num)
|
||||
{
|
||||
return reg_get_channel_reg_power(pdev, chan_num);
|
||||
}
|
||||
@@ -189,8 +189,8 @@ uint32_t wlan_reg_get_channel_reg_power(struct wlan_objmgr_pdev *pdev,
|
||||
*
|
||||
* Return: int
|
||||
*/
|
||||
uint32_t wlan_reg_get_channel_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t chan_num)
|
||||
qdf_freq_t wlan_reg_get_channel_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t chan_num)
|
||||
{
|
||||
return reg_get_channel_freq(pdev, chan_num);
|
||||
}
|
||||
@@ -468,26 +468,26 @@ void wlan_reg_update_nol_history_ch(struct wlan_objmgr_pdev *pdev,
|
||||
}
|
||||
|
||||
bool wlan_reg_is_dfs_ch(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t chan)
|
||||
uint8_t chan)
|
||||
{
|
||||
return reg_is_dfs_ch(pdev, chan);
|
||||
}
|
||||
|
||||
bool wlan_reg_is_passive_or_disable_ch(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t chan)
|
||||
uint8_t chan)
|
||||
{
|
||||
return reg_is_passive_or_disable_ch(pdev, chan);
|
||||
}
|
||||
|
||||
bool wlan_reg_is_disable_ch(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t chan)
|
||||
uint8_t chan)
|
||||
{
|
||||
return reg_is_disable_ch(pdev, chan);
|
||||
}
|
||||
#endif /* CONFIG_CHAN_NUM_API */
|
||||
|
||||
uint32_t wlan_reg_freq_to_chan(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t freq)
|
||||
uint8_t wlan_reg_freq_to_chan(struct wlan_objmgr_pdev *pdev,
|
||||
qdf_freq_t freq)
|
||||
{
|
||||
return reg_freq_to_chan(pdev, freq);
|
||||
}
|
||||
@@ -495,22 +495,22 @@ uint32_t wlan_reg_freq_to_chan(struct wlan_objmgr_pdev *pdev,
|
||||
qdf_export_symbol(wlan_reg_freq_to_chan);
|
||||
|
||||
#ifdef CONFIG_CHAN_NUM_API
|
||||
uint32_t wlan_reg_chan_to_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t chan_num)
|
||||
qdf_freq_t wlan_reg_chan_to_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t chan_num)
|
||||
{
|
||||
return reg_chan_to_freq(pdev, chan_num);
|
||||
}
|
||||
|
||||
qdf_export_symbol(wlan_reg_chan_to_freq);
|
||||
|
||||
uint16_t wlan_reg_legacy_chan_to_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t chan_num)
|
||||
qdf_freq_t wlan_reg_legacy_chan_to_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t chan_num)
|
||||
{
|
||||
return reg_legacy_chan_to_freq(pdev, chan_num);
|
||||
}
|
||||
|
||||
bool wlan_reg_chan_is_49ghz(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t chan_num)
|
||||
uint8_t chan_num)
|
||||
{
|
||||
return reg_chan_is_49ghz(pdev, chan_num);
|
||||
}
|
||||
@@ -616,10 +616,10 @@ bool wlan_reg_is_11d_scan_inprogress(struct wlan_objmgr_psoc *psoc)
|
||||
}
|
||||
|
||||
QDF_STATUS wlan_reg_get_freq_range(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t *low_2g,
|
||||
uint32_t *high_2g,
|
||||
uint32_t *low_5g,
|
||||
uint32_t *high_5g)
|
||||
qdf_freq_t *low_2g,
|
||||
qdf_freq_t *high_2g,
|
||||
qdf_freq_t *low_5g,
|
||||
qdf_freq_t *high_5g)
|
||||
{
|
||||
struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
|
||||
|
||||
@@ -652,67 +652,67 @@ QDF_STATUS wlan_reg_get_curr_regdomain(struct wlan_objmgr_pdev *pdev,
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CHAN_NUM_API
|
||||
uint32_t wlan_reg_min_24ghz_ch_num(void)
|
||||
uint8_t wlan_reg_min_24ghz_ch_num(void)
|
||||
{
|
||||
return reg_min_24ghz_ch_num();
|
||||
}
|
||||
|
||||
uint32_t wlan_reg_max_24ghz_ch_num(void)
|
||||
uint8_t wlan_reg_max_24ghz_ch_num(void)
|
||||
{
|
||||
return reg_max_24ghz_ch_num();
|
||||
}
|
||||
|
||||
uint32_t wlan_reg_min_5ghz_ch_num(void)
|
||||
uint8_t wlan_reg_min_5ghz_ch_num(void)
|
||||
{
|
||||
return reg_min_5ghz_ch_num();
|
||||
}
|
||||
|
||||
uint32_t wlan_reg_max_5ghz_ch_num(void)
|
||||
uint8_t wlan_reg_max_5ghz_ch_num(void)
|
||||
{
|
||||
return reg_max_5ghz_ch_num();
|
||||
}
|
||||
#endif /* CONFIG_CHAN_NUM_API */
|
||||
|
||||
#ifdef CONFIG_CHAN_FREQ_API
|
||||
uint16_t wlan_reg_min_24ghz_chan_freq(void)
|
||||
qdf_freq_t wlan_reg_min_24ghz_chan_freq(void)
|
||||
{
|
||||
return reg_min_24ghz_chan_freq();
|
||||
}
|
||||
|
||||
uint16_t wlan_reg_max_24ghz_chan_freq(void)
|
||||
qdf_freq_t wlan_reg_max_24ghz_chan_freq(void)
|
||||
{
|
||||
return reg_max_24ghz_chan_freq();
|
||||
}
|
||||
|
||||
uint16_t wlan_reg_min_5ghz_chan_freq(void)
|
||||
qdf_freq_t wlan_reg_min_5ghz_chan_freq(void)
|
||||
{
|
||||
return reg_min_5ghz_chan_freq();
|
||||
}
|
||||
|
||||
uint16_t wlan_reg_max_5ghz_chan_freq(void)
|
||||
qdf_freq_t wlan_reg_max_5ghz_chan_freq(void)
|
||||
{
|
||||
return reg_max_5ghz_chan_freq();
|
||||
}
|
||||
#endif /* CONFIG_CHAN_FREQ_API */
|
||||
|
||||
#ifdef CONFIG_CHAN_NUM_API
|
||||
bool wlan_reg_is_24ghz_ch(uint32_t chan)
|
||||
bool wlan_reg_is_24ghz_ch(uint8_t chan)
|
||||
{
|
||||
return reg_is_24ghz_ch(chan);
|
||||
}
|
||||
|
||||
bool wlan_reg_is_5ghz_ch(uint32_t chan)
|
||||
bool wlan_reg_is_5ghz_ch(uint8_t chan)
|
||||
{
|
||||
return reg_is_5ghz_ch(chan);
|
||||
}
|
||||
#endif /* CONFIG_CHAN_NUM_API */
|
||||
|
||||
bool wlan_reg_is_24ghz_ch_freq(uint32_t freq)
|
||||
bool wlan_reg_is_24ghz_ch_freq(qdf_freq_t freq)
|
||||
{
|
||||
return reg_is_24ghz_ch_freq(freq);
|
||||
}
|
||||
|
||||
bool wlan_reg_is_5ghz_ch_freq(uint32_t freq)
|
||||
bool wlan_reg_is_5ghz_ch_freq(qdf_freq_t freq)
|
||||
{
|
||||
return reg_is_5ghz_ch_freq(freq);
|
||||
}
|
||||
@@ -753,39 +753,39 @@ wlan_reg_get_band_channel_list(struct wlan_objmgr_pdev *pdev,
|
||||
return reg_get_band_channel_list(pdev, band_mask, channel_list);
|
||||
}
|
||||
|
||||
uint16_t wlan_reg_chan_band_to_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t chan, uint8_t band_mask)
|
||||
qdf_freq_t wlan_reg_chan_band_to_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t chan, uint8_t band_mask)
|
||||
{
|
||||
return reg_chan_band_to_freq(pdev, chan, band_mask);
|
||||
}
|
||||
|
||||
bool wlan_reg_is_49ghz_freq(uint32_t freq)
|
||||
bool wlan_reg_is_49ghz_freq(qdf_freq_t freq)
|
||||
{
|
||||
return reg_is_49ghz_freq(freq);
|
||||
}
|
||||
|
||||
uint32_t wlan_reg_ch_num(uint32_t ch_enum)
|
||||
uint8_t wlan_reg_ch_num(uint32_t ch_enum)
|
||||
{
|
||||
return reg_ch_num(ch_enum);
|
||||
}
|
||||
|
||||
uint32_t wlan_reg_ch_to_freq(uint32_t ch_enum)
|
||||
qdf_freq_t wlan_reg_ch_to_freq(uint32_t ch_enum)
|
||||
{
|
||||
return reg_ch_to_freq(ch_enum);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CHAN_NUM_API
|
||||
bool wlan_reg_is_same_band_channels(uint32_t chan_num1, uint32_t chan_num2)
|
||||
bool wlan_reg_is_same_band_channels(uint8_t chan_num1, uint8_t chan_num2)
|
||||
{
|
||||
return reg_is_same_band_channels(chan_num1, chan_num2);
|
||||
}
|
||||
|
||||
bool wlan_reg_is_channel_valid_5g_sbs(uint32_t curchan, uint32_t newchan)
|
||||
bool wlan_reg_is_channel_valid_5g_sbs(uint8_t curchan, uint8_t newchan)
|
||||
{
|
||||
return reg_is_channel_valid_5g_sbs(curchan, newchan);
|
||||
}
|
||||
|
||||
enum band_info wlan_reg_chan_to_band(uint32_t chan_num)
|
||||
enum band_info wlan_reg_chan_to_band(uint8_t chan_num)
|
||||
{
|
||||
return reg_chan_to_band(chan_num);
|
||||
}
|
||||
@@ -798,7 +798,7 @@ qdf_export_symbol(wlan_reg_chan_to_band);
|
||||
*
|
||||
* Return: Channel enum
|
||||
*/
|
||||
enum channel_enum wlan_reg_get_chan_enum(uint32_t chan_num)
|
||||
enum channel_enum wlan_reg_get_chan_enum(uint8_t chan_num)
|
||||
{
|
||||
return reg_get_chan_enum(chan_num);
|
||||
}
|
||||
@@ -829,28 +829,28 @@ QDF_STATUS wlan_reg_disable_chan_coex(struct wlan_objmgr_pdev *pdev,
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CHAN_FREQ_API
|
||||
bool wlan_reg_is_same_band_freqs(uint16_t freq1, uint16_t freq2)
|
||||
bool wlan_reg_is_same_band_freqs(qdf_freq_t freq1, qdf_freq_t freq2)
|
||||
{
|
||||
return reg_is_same_band_freqs(freq1, freq2);
|
||||
}
|
||||
|
||||
bool wlan_reg_is_frequency_valid_5g_sbs(uint16_t curfreq, uint16_t newfreq)
|
||||
bool wlan_reg_is_frequency_valid_5g_sbs(qdf_freq_t curfreq, qdf_freq_t newfreq)
|
||||
{
|
||||
return reg_is_frequency_valid_5g_sbs(curfreq, newfreq);
|
||||
}
|
||||
|
||||
enum channel_enum wlan_reg_get_chan_enum_for_freq(uint16_t freq)
|
||||
enum channel_enum wlan_reg_get_chan_enum_for_freq(qdf_freq_t freq)
|
||||
{
|
||||
return reg_get_chan_enum_for_freq(freq);
|
||||
}
|
||||
|
||||
bool wlan_reg_is_etsi13_srd_chan_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq)
|
||||
qdf_freq_t freq)
|
||||
{
|
||||
return reg_is_etsi13_srd_chan_for_freq(pdev, freq);
|
||||
}
|
||||
|
||||
bool wlan_reg_is_dsrc_freq(uint16_t freq)
|
||||
bool wlan_reg_is_dsrc_freq(qdf_freq_t freq)
|
||||
{
|
||||
return reg_is_dsrc_freq(freq);
|
||||
}
|
||||
@@ -874,18 +874,19 @@ void wlan_reg_update_nol_history_ch_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
nol_history_ch);
|
||||
}
|
||||
|
||||
bool wlan_reg_is_dfs_for_freq(struct wlan_objmgr_pdev *pdev, uint16_t freq)
|
||||
bool wlan_reg_is_dfs_for_freq(struct wlan_objmgr_pdev *pdev, qdf_freq_t freq)
|
||||
{
|
||||
return reg_is_dfs_for_freq(pdev, freq);
|
||||
}
|
||||
|
||||
bool wlan_reg_is_passive_or_disable_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq)
|
||||
qdf_freq_t freq)
|
||||
{
|
||||
return reg_is_passive_or_disable_for_freq(pdev, freq);
|
||||
}
|
||||
|
||||
bool wlan_reg_is_disable_for_freq(struct wlan_objmgr_pdev *pdev, uint16_t freq)
|
||||
bool wlan_reg_is_disable_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
qdf_freq_t freq)
|
||||
{
|
||||
return reg_is_disable_for_freq(pdev, freq);
|
||||
}
|
||||
@@ -902,14 +903,14 @@ wlan_reg_get_channel_list_with_power_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
|
||||
bool
|
||||
wlan_reg_chan_has_dfs_attribute_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq)
|
||||
qdf_freq_t freq)
|
||||
{
|
||||
return reg_chan_has_dfs_attribute_for_freq(pdev, freq);
|
||||
}
|
||||
|
||||
enum channel_state
|
||||
wlan_reg_get_5g_bonded_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq,
|
||||
qdf_freq_t freq,
|
||||
enum phy_ch_width bw)
|
||||
{
|
||||
return reg_get_5g_bonded_channel_state_for_freq(pdev, freq, bw);
|
||||
@@ -917,8 +918,8 @@ wlan_reg_get_5g_bonded_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
|
||||
enum channel_state
|
||||
wlan_reg_get_2g_bonded_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq,
|
||||
uint16_t sec_ch_freq,
|
||||
qdf_freq_t freq,
|
||||
qdf_freq_t sec_ch_freq,
|
||||
enum phy_ch_width bw)
|
||||
{
|
||||
return reg_get_2g_bonded_channel_state_for_freq(pdev,
|
||||
@@ -928,8 +929,8 @@ wlan_reg_get_2g_bonded_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
}
|
||||
|
||||
void wlan_reg_set_channel_params_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq,
|
||||
uint16_t sec_ch_2g_freq,
|
||||
qdf_freq_t freq,
|
||||
qdf_freq_t sec_ch_2g_freq,
|
||||
struct ch_params *ch_params)
|
||||
{
|
||||
reg_set_channel_params_for_freq(pdev, freq, sec_ch_2g_freq, ch_params);
|
||||
@@ -937,36 +938,35 @@ void wlan_reg_set_channel_params_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
|
||||
enum channel_state
|
||||
wlan_reg_get_channel_state_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq)
|
||||
qdf_freq_t freq)
|
||||
{
|
||||
return reg_get_channel_state_for_freq(pdev, freq);
|
||||
}
|
||||
|
||||
uint8_t wlan_reg_get_channel_reg_power_for_freq(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq)
|
||||
qdf_freq_t freq)
|
||||
{
|
||||
return reg_get_channel_reg_power_for_freq(pdev, freq);
|
||||
}
|
||||
|
||||
enum reg_wifi_band wlan_reg_freq_to_band(uint16_t freq)
|
||||
enum reg_wifi_band wlan_reg_freq_to_band(qdf_freq_t freq)
|
||||
{
|
||||
return reg_freq_to_band(freq);
|
||||
}
|
||||
|
||||
qdf_export_symbol(wlan_reg_freq_to_band);
|
||||
|
||||
uint16_t wlan_reg_min_chan_freq(void)
|
||||
qdf_freq_t wlan_reg_min_chan_freq(void)
|
||||
{
|
||||
return reg_min_chan_freq();
|
||||
}
|
||||
|
||||
uint16_t wlan_reg_max_chan_freq(void)
|
||||
qdf_freq_t wlan_reg_max_chan_freq(void)
|
||||
{
|
||||
return reg_max_chan_freq();
|
||||
}
|
||||
|
||||
void wlan_reg_freq_width_to_chan_op_class(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq,
|
||||
qdf_freq_t freq,
|
||||
uint16_t chan_width,
|
||||
bool global_tbl_lookup,
|
||||
uint16_t behav_limit,
|
||||
@@ -981,7 +981,7 @@ void wlan_reg_freq_width_to_chan_op_class(struct wlan_objmgr_pdev *pdev,
|
||||
}
|
||||
|
||||
void wlan_reg_freq_to_chan_op_class(struct wlan_objmgr_pdev *pdev,
|
||||
uint16_t freq,
|
||||
qdf_freq_t freq,
|
||||
bool global_tbl_lookup,
|
||||
uint16_t behav_limit,
|
||||
uint8_t *op_class,
|
||||
|
Referens i nytt ärende
Block a user