403-ath_regd_optional.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 < IEEE80211_NUM_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[IEEE80211_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[IEEE80211_BAND_5GHZ])
  31. return;
  32. @@ -631,6 +643,10 @@ ath_regd_init_wiphy(struct ath_regulator
  33. {
  34. const struct ieee80211_regdomain *regd;
  35. +#ifdef CPTCFG_ATH_USER_REGD
  36. + return 0;
  37. +#endif
  38. +
  39. wiphy->reg_notifier = reg_notifier;
  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. @@ -21,6 +21,9 @@ menuconfig ATH_CARDS
  45. if ATH_CARDS
  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. @@ -116,6 +116,7 @@ RTL8187_LEDS=
  55. ATH_COMMON=
  56. ATH_CARDS=
  57. ATH_DEBUG=
  58. +ATH_USER_REGD=
  59. ATH_REG_DYNAMIC_USER_REG_HINTS=
  60. ATH_REG_DYNAMIC_USER_CERT_TESTING=
  61. ATH5K=