1 --- a/drivers/net/wireless/ath/regd.c
2 +++ b/drivers/net/wireless/ath/regd.c
3 @@ -116,6 +116,9 @@ static const struct ieee80211_regdomain
5 static bool dynamic_country_user_possible(struct ath_regulatory *reg)
7 + if (IS_ENABLED(CPTCFG_ATH_USER_REGD))
10 if (IS_ENABLED(CPTCFG_ATH_REG_DYNAMIC_USER_CERT_TESTING))
13 @@ -188,6 +191,8 @@ static bool dynamic_country_user_possibl
15 static bool ath_reg_dyn_country_user_allow(struct ath_regulatory *reg)
17 + if (IS_ENABLED(CPTCFG_ATH_USER_REGD))
19 if (!IS_ENABLED(CPTCFG_ATH_REG_DYNAMIC_USER_REG_HINTS))
21 if (!dynamic_country_user_possible(reg))
22 @@ -341,6 +346,9 @@ ath_reg_apply_beaconing_flags(struct wip
23 struct ieee80211_channel *ch;
26 + if (IS_ENABLED(CPTCFG_ATH_USER_REGD))
29 for (band = 0; band < NUM_NL80211_BANDS; band++) {
30 if (!wiphy->bands[band])
32 @@ -374,6 +382,9 @@ ath_reg_apply_ir_flags(struct wiphy *wip
34 struct ieee80211_supported_band *sband;
36 + if (IS_ENABLED(CPTCFG_ATH_USER_REGD))
39 sband = wiphy->bands[NL80211_BAND_2GHZ];
42 @@ -402,6 +413,9 @@ static void ath_reg_apply_radar_flags(st
43 struct ieee80211_channel *ch;
46 + if (IS_ENABLED(CPTCFG_ATH_USER_REGD))
49 if (!wiphy->bands[NL80211_BAND_5GHZ])
52 @@ -633,6 +647,10 @@ ath_regd_init_wiphy(struct ath_regulator
53 const struct ieee80211_regdomain *regd;
55 wiphy->reg_notifier = reg_notifier;
57 + if (IS_ENABLED(CPTCFG_ATH_USER_REGD))
60 wiphy->regulatory_flags |= REGULATORY_STRICT_REG |
61 REGULATORY_CUSTOM_REG;
63 --- a/drivers/net/wireless/ath/Kconfig
64 +++ b/drivers/net/wireless/ath/Kconfig
65 @@ -23,6 +23,9 @@ config WLAN_VENDOR_ATH
70 + bool "Do not enforce EEPROM regulatory restrictions"
73 bool "Atheros wireless debugging"
77 @@ -127,6 +127,7 @@ ADM8211=
83 ATH_REG_DYNAMIC_USER_REG_HINTS=
84 ATH_REG_DYNAMIC_USER_CERT_TESTING=