mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
qcacmn: Add country code check for ETSI dmn
Add country code check for ETSI domain, in other words UK, since only UK supports 6G in EU as of today. The TPC power calculation API calls this function to check if programmed ctry is GB to allow STA to use VLP mode. As and when more EU countries support 6G, the checks will be appended to this API. Change-Id: If985f3f64fc806cf1875f798ff3a86667a0861b8 CRs-Fixed: 2933678
This commit is contained in:
parent
e6820ab1eb
commit
5a2d88df87
4 changed files with 34 additions and 0 deletions
|
|
@ -169,6 +169,14 @@ bool reg_is_us_alpha2(uint8_t *alpha2)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool reg_is_etsi_alpha2(uint8_t *alpha2)
|
||||
{
|
||||
if ((alpha2[0] == 'G') && (alpha2[1] == 'B'))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
QDF_STATUS reg_set_country(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t *country)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -272,6 +272,14 @@ bool reg_is_world_alpha2(uint8_t *alpha2);
|
|||
*/
|
||||
bool reg_is_us_alpha2(uint8_t *alpha2);
|
||||
|
||||
/**
|
||||
* reg_is_etsi_alpha2 - is country code in EU
|
||||
* @alpha2: country code pointer
|
||||
*
|
||||
* Return: true or false
|
||||
*/
|
||||
bool reg_is_etsi_alpha2(uint8_t *alpha2);
|
||||
|
||||
/**
|
||||
* reg_set_country() - Set the current regulatory country
|
||||
* @pdev: pdev device for country information
|
||||
|
|
@ -423,6 +431,11 @@ static inline bool reg_is_us_alpha2(uint8_t *alpha2)
|
|||
return false;
|
||||
}
|
||||
|
||||
static inline bool reg_is_etsi_alpha2(uint8_t *alpha2)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS reg_set_country(struct wlan_objmgr_pdev *pdev,
|
||||
uint8_t *country)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -954,6 +954,14 @@ qdf_freq_t wlan_reg_legacy_chan_to_freq(struct wlan_objmgr_pdev *pdev,
|
|||
*/
|
||||
bool wlan_reg_is_us(uint8_t *country);
|
||||
|
||||
/**
|
||||
* wlan_reg_is_etsi() - reg is a country in EU
|
||||
* @country: The country information
|
||||
*
|
||||
* Return: true or false
|
||||
*/
|
||||
bool wlan_reg_is_etsi(uint8_t *country);
|
||||
|
||||
#ifdef CONFIG_CHAN_NUM_API
|
||||
/**
|
||||
* wlan_reg_chan_is_49ghz() - Check if the input channel number is 4.9GHz
|
||||
|
|
|
|||
|
|
@ -628,6 +628,11 @@ bool wlan_reg_is_us(uint8_t *country)
|
|||
return reg_is_us_alpha2(country);
|
||||
}
|
||||
|
||||
bool wlan_reg_is_etsi(uint8_t *country)
|
||||
{
|
||||
return reg_is_etsi_alpha2(country);
|
||||
}
|
||||
|
||||
void wlan_reg_register_chan_change_callback(struct wlan_objmgr_psoc *psoc,
|
||||
void *cbk, void *arg)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue