qcacmn: Add BW macros and rename wlan_reg_country_opclass_freq_check

Add the macros BW_5_MHZ, BW_10_MHZ, BW_20_MHZ, BW_25_MHZ, BW_40_MHZ
to denote channel width and define them as 5, 10, 20, 25 and 40
respectively.

Also rename the API wlan_reg_country_opclass_freq_check to
wlan_reg_is_freq_in_country_opclass.

Change-Id: I6838bd87a9b8d0754909cea414ada4b09ed01643
CRs-Fixed: 2646416
This commit is contained in:
Hariharan Basuthkar 2020-03-10 16:51:10 +05:30 • committed by nshrivas
commit 7165baf6ce
5 changed files with 13 additions and 8 deletions

View file

@ -595,7 +595,7 @@ void reg_freq_to_chan_op_class(struct wlan_objmgr_pdev *pdev,
chan_num);
}
bool reg_country_opclass_freq_check(struct wlan_objmgr_pdev *pdev,
bool 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)

View file

@ -184,7 +184,7 @@ void reg_freq_to_chan_op_class(struct wlan_objmgr_pdev *pdev,
uint8_t *chan_num);
/**
* reg_country_opclass_freq_check() - check for frequency in (tbl, oper class)
* reg_is_freq_in_country_opclass() - check for frequency in (tbl, oper class)
*
* @pdev: pdev pointer
* @country: country from country IE
@ -193,7 +193,7 @@ void reg_freq_to_chan_op_class(struct wlan_objmgr_pdev *pdev,
*
* Return: bool
*/
bool reg_country_opclass_freq_check(struct wlan_objmgr_pdev *pdev,
bool 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);
@ -351,7 +351,7 @@ reg_freq_to_chan_op_class(struct wlan_objmgr_pdev *pdev,
}
static inline bool
reg_country_opclass_freq_check(struct wlan_objmgr_pdev *pdev,
reg_is_freq_in_country_opclass(struct wlan_objmgr_pdev *pdev,
const uint8_t country[3],
uint8_t op_class,
uint16_t chan_freq)

View file

@ -62,6 +62,11 @@
#define REGULATORY_PHYMODE_NO11AC BIT(4)
#define REGULATORY_PHYMODE_NO11AX BIT(5)
#define BW_5_MHZ 5
#define BW_10_MHZ 10
#define BW_20_MHZ 20
#define BW_25_MHZ 25
#define BW_40_MHZ 40
#define BW_80_MHZ 80
#define BW_160_MHZ 160
#define BW_40_MHZ 40

View file

@ -1218,7 +1218,7 @@ void wlan_reg_freq_to_chan_op_class(struct wlan_objmgr_pdev *pdev,
uint8_t *chan_num);
/**
* wlan_reg_country_opclass_freq_check() - checks frequency in (ctry, op class)
* wlan_reg_is_freq_in_country_opclass() - checks frequency in (ctry, op class)
* pair
* @pdev: pdev ptr
* @country: country information
@ -1227,7 +1227,7 @@ void wlan_reg_freq_to_chan_op_class(struct wlan_objmgr_pdev *pdev,
*
* Return: bool
*/
bool wlan_reg_country_opclass_freq_check(struct wlan_objmgr_pdev *pdev,
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);

View file

@ -1040,12 +1040,12 @@ void wlan_reg_freq_to_chan_op_class(struct wlan_objmgr_pdev *pdev,
chan_num);
}
bool wlan_reg_country_opclass_freq_check(struct wlan_objmgr_pdev *pdev,
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)
{
return reg_country_opclass_freq_check(pdev, country,
return reg_is_freq_in_country_opclass(pdev, country,
op_class, chan_freq);
}