1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-30 22:49:43 +02:00
openwrt-xburst/package/mac80211/patches/404-ath_regd_optional.patch
nbd 0ec7c74cd2 mac80211: merge version 2010-09-14 from trunk
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@23107 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-09-21 11:50:40 +00:00

69 lines
1.4 KiB
Diff

--- a/drivers/net/wireless/ath/regd.c
+++ b/drivers/net/wireless/ath/regd.c
@@ -18,6 +18,9 @@
#include <net/cfg80211.h>
#include <net/mac80211.h>
#include "regd.h"
+
+#ifndef ATH_USER_REGD
+
#include "regd_common.h"
/*
@@ -587,3 +590,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
@@ -249,6 +249,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,
@@ -260,3 +295,5 @@ int ath_reg_notifier_apply(struct wiphy
struct ath_regulatory *reg);
#endif
+
+#endif