mac80211: update to wireless-testing 2016-01-10
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 402-ath_regd_optional.patch
1 --- a/drivers/net/wireless/ath/regd.c
2 +++ b/drivers/net/wireless/ath/regd.c
3 @@ -341,6 +341,10 @@ ath_reg_apply_beaconing_flags(struct wip
4 struct ieee80211_channel *ch;
5 unsigned int i;
6
7 +#ifdef CPTCFG_ATH_USER_REGD
8 + return;
9 +#endif
10 +
11 for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
12 if (!wiphy->bands[band])
13 continue;
14 @@ -374,6 +378,10 @@ ath_reg_apply_ir_flags(struct wiphy *wip
15 {
16 struct ieee80211_supported_band *sband;
17
18 +#ifdef CPTCFG_ATH_USER_REGD
19 + return;
20 +#endif
21 +
22 sband = wiphy->bands[IEEE80211_BAND_2GHZ];
23 if (!sband)
24 return;
25 @@ -402,6 +410,10 @@ static void ath_reg_apply_radar_flags(st
26 struct ieee80211_channel *ch;
27 unsigned int i;
28
29 +#ifdef CPTCFG_ATH_USER_REGD
30 + return;
31 +#endif
32 +
33 if (!wiphy->bands[IEEE80211_BAND_5GHZ])
34 return;
35
36 @@ -633,6 +645,11 @@ ath_regd_init_wiphy(struct ath_regulator
37 const struct ieee80211_regdomain *regd;
38
39 wiphy->reg_notifier = reg_notifier;
40 +
41 +#ifdef CPTCFG_ATH_USER_REGD
42 + return 0;
43 +#endif
44 +
45 wiphy->regulatory_flags |= REGULATORY_STRICT_REG |
46 REGULATORY_CUSTOM_REG;
47
48 --- a/drivers/net/wireless/ath/Kconfig
49 +++ b/drivers/net/wireless/ath/Kconfig
50 @@ -23,6 +23,9 @@ config WLAN_VENDOR_ATH
51
52 if WLAN_VENDOR_ATH
53
54 +config ATH_USER_REGD
55 + bool "Do not enforce EEPROM regulatory restrictions"
56 +
57 config ATH_DEBUG
58 bool "Atheros wireless debugging"
59 ---help---
60 --- a/.local-symbols
61 +++ b/.local-symbols
62 @@ -125,6 +125,7 @@ ADM8211=
63 ATH_COMMON=
64 WLAN_VENDOR_ATH=
65 ATH_DEBUG=
66 +ATH_USER_REGD=
67 ATH_TRACEPOINTS=
68 ATH_REG_DYNAMIC_USER_REG_HINTS=
69 ATH_REG_DYNAMIC_USER_CERT_TESTING=