404-ath_regd_optional.patch 937 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. --- a/drivers/net/wireless/ath/regd.c
  2. +++ b/drivers/net/wireless/ath/regd.c
  3. @@ -193,6 +193,10 @@ ath_reg_apply_beaconing_flags(struct wip
  4. u32 bandwidth = 0;
  5. int r;
  6. +#ifdef ATH_USER_REGD
  7. + return;
  8. +#endif
  9. +
  10. for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
  11. if (!wiphy->bands[band])
  12. @@ -252,6 +256,10 @@ ath_reg_apply_active_scan_flags(struct w
  13. u32 bandwidth = 0;
  14. int r;
  15. +#ifdef ATH_USER_REGD
  16. + return;
  17. +#endif
  18. +
  19. sband = wiphy->bands[IEEE80211_BAND_2GHZ];
  20. /*
  21. @@ -299,6 +307,10 @@ static void ath_reg_apply_radar_flags(st
  22. struct ieee80211_channel *ch;
  23. unsigned int i;
  24. +#ifdef ATH_USER_REGD
  25. + return;
  26. +#endif
  27. +
  28. if (!wiphy->bands[IEEE80211_BAND_5GHZ])
  29. return;
  30. @@ -466,6 +478,10 @@ ath_regd_init_wiphy(struct ath_regulator
  31. {
  32. const struct ieee80211_regdomain *regd;
  33. +#ifdef ATH_USER_REGD
  34. + return 0;
  35. +#endif
  36. +
  37. wiphy->reg_notifier = reg_notifier;
  38. wiphy->flags |= WIPHY_FLAG_STRICT_REGULATORY;