| 1 | --- a/drivers/net/wireless/ath/regd.c |
| 2 | +++ b/drivers/net/wireless/ath/regd.c |
| 3 | @@ -18,6 +18,9 @@ |
| 4 | #include <net/cfg80211.h> |
| 5 | #include <net/mac80211.h> |
| 6 | #include "regd.h" |
| 7 | + |
| 8 | +#ifndef ATH_USER_REGD |
| 9 | + |
| 10 | #include "regd_common.h" |
| 11 | |
| 12 | /* |
| 13 | @@ -587,3 +590,5 @@ u32 ath_regd_get_band_ctl(struct ath_reg |
| 14 | } |
| 15 | } |
| 16 | EXPORT_SYMBOL(ath_regd_get_band_ctl); |
| 17 | + |
| 18 | +#endif |
| 19 | --- a/drivers/net/wireless/ath/regd.h |
| 20 | +++ b/drivers/net/wireless/ath/regd.h |
| 21 | @@ -250,6 +250,41 @@ enum CountryCode { |
| 22 | CTRY_BELGIUM2 = 5002 |
| 23 | }; |
| 24 | |
| 25 | +#ifdef ATH_USER_REGD |
| 26 | + |
| 27 | +static inline bool |
| 28 | +ath_is_world_regd(struct ath_regulatory *reg) |
| 29 | +{ |
| 30 | + return true; |
| 31 | +} |
| 32 | + |
| 33 | +static inline int |
| 34 | +ath_regd_init(struct ath_regulatory *reg, struct wiphy *wiphy, |
| 35 | + int (*reg_notifier)(struct wiphy *wiphy, |
| 36 | + struct regulatory_request *request)) |
| 37 | +{ |
| 38 | + return 0; |
| 39 | +} |
| 40 | + |
| 41 | + |
| 42 | +static inline u32 |
| 43 | +ath_regd_get_band_ctl(struct ath_regulatory *reg, |
| 44 | + enum ieee80211_band band) |
| 45 | +{ |
| 46 | + return SD_NO_CTL; |
| 47 | +} |
| 48 | + |
| 49 | +static inline int |
| 50 | +ath_reg_notifier_apply(struct wiphy *wiphy, |
| 51 | + struct regulatory_request *request, |
| 52 | + struct ath_regulatory *reg) |
| 53 | +{ |
| 54 | + return 0; |
| 55 | +} |
| 56 | + |
| 57 | + |
| 58 | +#else |
| 59 | + |
| 60 | bool ath_is_world_regd(struct ath_regulatory *reg); |
| 61 | int ath_regd_init(struct ath_regulatory *reg, struct wiphy *wiphy, |
| 62 | int (*reg_notifier)(struct wiphy *wiphy, |
| 63 | @@ -261,3 +296,5 @@ int ath_reg_notifier_apply(struct wiphy |
| 64 | struct ath_regulatory *reg); |
| 65 | |
| 66 | #endif |
| 67 | + |
| 68 | +#endif |
| 69 | |