1 --- a/drivers/net/wireless/ath/regd.c
2 +++ b/drivers/net/wireless/ath/regd.c
3 @@ -114,10 +114,22 @@ static const struct ieee80211_regdomain
7 +static u16 ath_regd_get_eepromRD(struct ath_regulatory *reg)
9 + return reg->current_rd & ~WORLDWIDE_ROAMING_FLAG;
12 +static bool is_default_regd(struct ath_regulatory *reg)
14 + return ath_regd_get_eepromRD(reg) == CTRY_DEFAULT;
17 static bool dynamic_country_user_possible(struct ath_regulatory *reg)
19 if (config_enabled(CPTCFG_ATH_REG_DYNAMIC_USER_CERT_TESTING))
21 + if (is_default_regd(reg))
24 switch (reg->country_code) {
25 case CTRY_UNITED_STATES:
26 @@ -202,11 +214,6 @@ static inline bool is_wwr_sku(u16 regd)
30 -static u16 ath_regd_get_eepromRD(struct ath_regulatory *reg)
32 - return reg->current_rd & ~WORLDWIDE_ROAMING_FLAG;
35 bool ath_is_world_regd(struct ath_regulatory *reg)
37 return is_wwr_sku(ath_regd_get_eepromRD(reg));
38 @@ -650,6 +657,9 @@ ath_regd_init_wiphy(struct ath_regulator
42 + if (is_default_regd(reg))
45 wiphy->regulatory_flags |= REGULATORY_STRICT_REG |
46 REGULATORY_CUSTOM_REG;