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. @@ -196,6 +196,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. @@ -249,6 +253,10 @@ ath_reg_apply_active_scan_flags(struct w
  13. struct ieee80211_channel *ch;
  14. const struct ieee80211_reg_rule *reg_rule;
  15. +#ifdef CPTCFG_ATH_USER_REGD
  16. + return;
  17. +#endif
  18. +
  19. sband = wiphy->bands[IEEE80211_BAND_2GHZ];
  20. if (!sband)
  21. return;
  22. @@ -298,6 +306,10 @@ static void ath_reg_apply_radar_flags(st
  23. struct ieee80211_channel *ch;
  24. unsigned int i;
  25. +#ifdef CPTCFG_ATH_USER_REGD
  26. + return;
  27. +#endif
  28. +
  29. if (!wiphy->bands[IEEE80211_BAND_5GHZ])
  30. return;
  31. @@ -606,6 +618,10 @@ ath_regd_init_wiphy(struct ath_regulator
  32. {
  33. const struct ieee80211_regdomain *regd;
  34. +#ifdef CPTCFG_ATH_USER_REGD
  35. + return 0;
  36. +#endif
  37. +
  38. wiphy->reg_notifier = reg_notifier;
  39. wiphy->flags |= WIPHY_FLAG_STRICT_REGULATORY;
  40. --- a/drivers/net/wireless/ath/Kconfig
  41. +++ b/drivers/net/wireless/ath/Kconfig
  42. @@ -21,6 +21,9 @@ menuconfig ATH_CARDS
  43. if ATH_CARDS
  44. +config ATH_USER_REGD
  45. + bool "Do not enforce EEPROM regulatory restrictions"
  46. +
  47. config ATH_DEBUG
  48. bool "Atheros wireless debugging"
  49. ---help---
  50. --- a/.local-symbols
  51. +++ b/.local-symbols
  52. @@ -126,6 +126,7 @@ RTL8187_LEDS=
  53. ATH_COMMON=
  54. ATH_CARDS=
  55. ATH_DEBUG=
  56. +ATH_USER_REGD=
  57. ATH_REG_DYNAMIC_USER_REG_HINTS=
  58. ATH_REG_DYNAMIC_USER_CERT_TESTING=
  59. ATH5K=