summaryrefslogtreecommitdiff
path: root/net/wireless/reg.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2015-10-15 15:35:41 +0300
committerJohannes Berg <johannes.berg@intel.com>2017-10-11 14:18:51 +0300
commitc8c240e284b3d821011b4f680b3eaa99569b3756 (patch)
tree60988d2bd3f547435c0af3b6f428f64ccd20e736 /net/wireless/reg.c
parent1ea4ff3e9f0b8d53e680a2bb9e8e644bf03aeb4d (diff)
downloadlinux-c8c240e284b3d821011b4f680b3eaa99569b3756.tar.xz
cfg80211: reg: remove support for built-in regdb
Parsing and building C structures from a regdb is no longer needed since the "firmware" file (regulatory.db) can be linked into the kernel image to achieve the same effect. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r--net/wireless/reg.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 180addda52af..ebf8267ffbc9 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -59,7 +59,6 @@
#include "core.h"
#include "reg.h"
#include "rdev-ops.h"
-#include "regdb.h"
#include "nl80211.h"
/*
@@ -495,38 +494,6 @@ static int reg_schedule_apply(const struct ieee80211_regdomain *regdom)
return 0;
}
-#ifdef CONFIG_CFG80211_INTERNAL_REGDB
-static int reg_query_builtin(const char *alpha2)
-{
- const struct ieee80211_regdomain *regdom = NULL;
- unsigned int i;
-
- for (i = 0; i < reg_regdb_size; i++) {
- if (alpha2_equal(alpha2, reg_regdb[i]->alpha2)) {
- regdom = reg_copy_regd(reg_regdb[i]);
- break;
- }
- }
- if (!regdom)
- return -ENODATA;
-
- return reg_schedule_apply(regdom);
-}
-
-/* Feel free to add any other sanity checks here */
-static void reg_regdb_size_check(void)
-{
- /* We should ideally BUILD_BUG_ON() but then random builds would fail */
- WARN_ONCE(!reg_regdb_size, "db.txt is empty, you should update it...");
-}
-#else
-static inline void reg_regdb_size_check(void) {}
-static inline int reg_query_builtin(const char *alpha2)
-{
- return -ENODATA;
-}
-#endif /* CONFIG_CFG80211_INTERNAL_REGDB */
-
#ifdef CONFIG_CFG80211_CRDA_SUPPORT
/* Max number of consecutive attempts to communicate with CRDA */
#define REG_MAX_CRDA_TIMEOUTS 10
@@ -885,10 +852,6 @@ int reg_reload_regdb(void)
static bool reg_query_database(struct regulatory_request *request)
{
- /* query internal regulatory database (if it exists) */
- if (reg_query_builtin(request->alpha2) == 0)
- return true;
-
if (query_regdb_file(request->alpha2) == 0)
return true;
@@ -3580,8 +3543,6 @@ int __init regulatory_init(void)
spin_lock_init(&reg_pending_beacons_lock);
spin_lock_init(&reg_indoor_lock);
- reg_regdb_size_check();
-
rcu_assign_pointer(cfg80211_regdomain, cfg80211_world_regdom);
user_alpha2[0] = '9';