diff --git a/umac/regulatory/core/src/reg_utils.c b/umac/regulatory/core/src/reg_utils.c index 12b0ad9b0c53..0295b5b85e2e 100644 --- a/umac/regulatory/core/src/reg_utils.c +++ b/umac/regulatory/core/src/reg_utils.c @@ -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) { diff --git a/umac/regulatory/core/src/reg_utils.h b/umac/regulatory/core/src/reg_utils.h index 4cfbd8c68a28..70dfdbea5881 100644 --- a/umac/regulatory/core/src/reg_utils.h +++ b/umac/regulatory/core/src/reg_utils.h @@ -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) { diff --git a/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h b/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h index b1e4c352bce9..1e6ab72b7b92 100644 --- a/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h +++ b/umac/regulatory/dispatcher/inc/wlan_reg_services_api.h @@ -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 diff --git a/umac/regulatory/dispatcher/src/wlan_reg_services_api.c b/umac/regulatory/dispatcher/src/wlan_reg_services_api.c index 75932e22a602..afda53de5244 100644 --- a/umac/regulatory/dispatcher/src/wlan_reg_services_api.c +++ b/umac/regulatory/dispatcher/src/wlan_reg_services_api.c @@ -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) {