diff options
author | Felix Fietkau <nbd@openwrt.org> | 2009-10-02 22:02:37 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2009-10-02 22:02:37 +0000 |
commit | 8d9946530ec6b8d1c571a15473ab4a27cff4e6f4 (patch) | |
tree | a65c9c85783bc89d6c0370e235373c69c10cdf22 /package/mac80211/patches | |
parent | 7bd8115c7e653e6b6ed40f87bdcf67056803480a (diff) | |
download | upstream-8d9946530ec6b8d1c571a15473ab4a27cff4e6f4.tar.gz upstream-8d9946530ec6b8d1c571a15473ab4a27cff4e6f4.tar.bz2 upstream-8d9946530ec6b8d1c571a15473ab4a27cff4e6f4.zip |
ath: add a compile time option that gives the user full control over regulatory settings (disabled by default for now)
SVN-Revision: 17828
Diffstat (limited to 'package/mac80211/patches')
-rw-r--r-- | package/mac80211/patches/404-ath_regd_optional.patch | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/package/mac80211/patches/404-ath_regd_optional.patch b/package/mac80211/patches/404-ath_regd_optional.patch new file mode 100644 index 0000000000..eb6743152d --- /dev/null +++ b/package/mac80211/patches/404-ath_regd_optional.patch @@ -0,0 +1,68 @@ +--- a/drivers/net/wireless/ath/regd.c ++++ b/drivers/net/wireless/ath/regd.c +@@ -19,6 +19,9 @@ + #include <net/cfg80211.h> + #include <net/mac80211.h> + #include "regd.h" ++ ++#ifndef ATH_USER_REGD ++ + #include "regd_common.h" + + /* +@@ -588,3 +591,5 @@ u32 ath_regd_get_band_ctl(struct ath_reg + } + } + EXPORT_SYMBOL(ath_regd_get_band_ctl); ++ ++#endif +--- a/drivers/net/wireless/ath/regd.h ++++ b/drivers/net/wireless/ath/regd.h +@@ -236,6 +236,41 @@ enum CountryCode { + CTRY_BELGIUM2 = 5002 + }; + ++#ifdef ATH_USER_REGD ++ ++static inline bool ++ath_is_world_regd(struct ath_regulatory *reg) ++{ ++ return true; ++} ++ ++static inline int ++ath_regd_init(struct ath_regulatory *reg, struct wiphy *wiphy, ++ int (*reg_notifier)(struct wiphy *wiphy, ++ struct regulatory_request *request)) ++{ ++ return 0; ++} ++ ++ ++static inline u32 ++ath_regd_get_band_ctl(struct ath_regulatory *reg, ++ enum ieee80211_band band) ++{ ++ return SD_NO_CTL; ++} ++ ++static inline int ++ath_reg_notifier_apply(struct wiphy *wiphy, ++ struct regulatory_request *request, ++ struct ath_regulatory *reg) ++{ ++ return 0; ++} ++ ++ ++#else ++ + bool ath_is_world_regd(struct ath_regulatory *reg); + int ath_regd_init(struct ath_regulatory *reg, struct wiphy *wiphy, + int (*reg_notifier)(struct wiphy *wiphy, +@@ -247,3 +282,5 @@ int ath_reg_notifier_apply(struct wiphy + struct ath_regulatory *reg); + + #endif ++ ++#endif |