mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-30 18:49:23 +02:00
ath: add a compile time option that gives the user full control over regulatory settings (disabled by default for now)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17828 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
53ebb11eaf
commit
d4b7776c0d
@ -270,6 +270,19 @@ define KernelPackage/zd1211rw
|
||||
AUTOLOAD:=$(call AutoLoad,60,zd1211rw)
|
||||
endef
|
||||
|
||||
define KernelPackage/ath/config
|
||||
|
||||
config ATH_USER_REGD
|
||||
bool "Force Atheros drivers to respect the user's regdomain settings"
|
||||
depends on PACKAGE_kmod-ath
|
||||
help
|
||||
Atheros' idea of regulatory handling is that the EEPROM of the card defines
|
||||
the regulatory limits and the user is only allowed to restrict the settings
|
||||
even further, even if the country allows frequencies or power levels that
|
||||
are forbidden by the EEPROM settings.
|
||||
Select this option if you want the driver to respect the user's decision about
|
||||
regulatory settings.
|
||||
endef
|
||||
|
||||
define KernelPackage/ath
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
@ -455,6 +468,7 @@ BUILDFLAGS:= \
|
||||
$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),-DCONFIG_MAC80211_DEBUGFS) \
|
||||
$(if $(CONFIG_PACKAGE_ATH9K_DEBUG),-DCONFIG_ATH9K_DEBUG) \
|
||||
-D__CONFIG_MAC80211_RC_DEFAULT=minstrel \
|
||||
$(if $(CONFIG_ATH_USER_REGD),-DATH_USER_REGD=1)
|
||||
|
||||
MAKE_OPTS:= \
|
||||
CROSS_COMPILE="$(KERNEL_CROSS)" \
|
||||
|
68
package/mac80211/patches/404-ath_regd_optional.patch
Normal file
68
package/mac80211/patches/404-ath_regd_optional.patch
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user