402-ath_regd_optional.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. +#ifdef CPTCFG_ATH_USER_REGD
  7. + return;
  8. +#endif
  9. +
  10. for (band = 0; band < NUM_NL80211_BANDS; band++) {
  11. if (!wiphy->bands[band])
  12. continue;
  13. @@ -374,6 +378,10 @@ ath_reg_apply_ir_flags(struct wiphy *wip
  14. {
  15. struct ieee80211_supported_band *sband;
  16. +#ifdef CPTCFG_ATH_USER_REGD
  17. + return;
  18. +#endif
  19. +
  20. sband = wiphy->bands[NL80211_BAND_2GHZ];
  21. if (!sband)
  22. return;
  23. @@ -402,6 +410,10 @@ static void ath_reg_apply_radar_flags(st
  24. struct ieee80211_channel *ch;
  25. unsigned int i;
  26. +#ifdef CPTCFG_ATH_USER_REGD
  27. + return;
  28. +#endif
  29. +
  30. if (!wiphy->bands[NL80211_BAND_5GHZ])
  31. return;
  32. @@ -633,6 +645,11 @@ ath_regd_init_wiphy(struct ath_regulator
  33. const struct ieee80211_regdomain *regd;
  34. wiphy->reg_notifier = reg_notifier;
  35. +
  36. +#ifdef CPTCFG_ATH_USER_REGD
  37. + return 0;
  38. +#endif
  39. +
  40. wiphy->regulatory_flags |= REGULATORY_STRICT_REG |
  41. REGULATORY_CUSTOM_REG;
  42. --- a/drivers/net/wireless/ath/Kconfig
  43. +++ b/drivers/net/wireless/ath/Kconfig
  44. @@ -23,6 +23,9 @@ config WLAN_VENDOR_ATH
  45. if WLAN_VENDOR_ATH
  46. +config ATH_USER_REGD
  47. + bool "Do not enforce EEPROM regulatory restrictions"
  48. +
  49. config ATH_DEBUG
  50. bool "Atheros wireless debugging"
  51. ---help---
  52. --- a/.local-symbols
  53. +++ b/.local-symbols
  54. @@ -127,6 +127,7 @@ ADM8211=
  55. ATH_COMMON=
  56. WLAN_VENDOR_ATH=
  57. ATH_DEBUG=
  58. +ATH_USER_REGD=
  59. ATH_TRACEPOINTS=
  60. ATH_REG_DYNAMIC_USER_REG_HINTS=
  61. ATH_REG_DYNAMIC_USER_CERT_TESTING=