From 6b8b6f7948e79978e7bbf6b6b50c47b5efe5e279 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 5 Apr 2018 20:32:03 +0200 Subject: [PATCH] wireless: Disable regulatory.db direct loading (see #892229) --- debian/changelog | 3 + ...disable-regulatory.db-direct-loading.patch | 68 +++++++++++++++++++ debian/patches/series | 3 + 3 files changed, 74 insertions(+) create mode 100644 debian/patches/debian/wireless-disable-regulatory.db-direct-loading.patch diff --git a/debian/changelog b/debian/changelog index 097802955..010ced1e5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,9 @@ linux (4.15.11-2) UNRELEASED; urgency=medium - [2ed70eb] "Add empty featuresets for armel to help abiupdate script" - [5f62872] "(Temporarily) disable armel kernel image build" + [ Ben Hutchings ] + * wireless: Disable regulatory.db direct loading (see #892229) + -- Roger Shimizu Fri, 23 Mar 2018 21:10:34 +0900 linux (4.15.11-1) unstable; urgency=medium diff --git a/debian/patches/debian/wireless-disable-regulatory.db-direct-loading.patch b/debian/patches/debian/wireless-disable-regulatory.db-direct-loading.patch new file mode 100644 index 000000000..7e05c66dc --- /dev/null +++ b/debian/patches/debian/wireless-disable-regulatory.db-direct-loading.patch @@ -0,0 +1,68 @@ +From: Ben Hutchings +Date: Thu, 05 Apr 2018 18:13:52 +0200 +Subject: wireless: Disable regulatory.db direct loading +Forwarded: not-needed +Bug-Debian: https://bugs.debian.org/892229 + +Don't complain about being unable to load regulatory.db directly. +This is expected until we generate a signing key and update +wireless-regdb to be signed with it. + +--- +--- a/net/wireless/reg.c ++++ b/net/wireless/reg.c +@@ -475,6 +475,7 @@ static void reg_regdb_apply(struct work_ + + static DECLARE_WORK(reg_regdb_work, reg_regdb_apply); + ++#if 0 + static int reg_schedule_apply(const struct ieee80211_regdomain *regdom) + { + struct reg_regdb_apply_request *request; +@@ -494,6 +495,7 @@ static int reg_schedule_apply(const stru + schedule_work(®_regdb_work); + return 0; + } ++#endif + + #ifdef CONFIG_CFG80211_CRDA_SUPPORT + /* Max number of consecutive attempts to communicate with CRDA */ +@@ -573,6 +575,29 @@ static inline int call_crda(const char * + /* code to directly load a firmware database through request_firmware */ + static const struct fwdb_header *regdb; + ++#if 1 ++ ++static int load_builtin_regdb_keys(void) ++{ ++ return 0; ++} ++ ++static void free_regdb_keyring(void) ++{ ++} ++ ++static int query_regdb_file(const char *alpha2) ++{ ++ return -ENOENT; ++} ++ ++int reg_reload_regdb(void) ++{ ++ return -ENOENT; ++} ++ ++#else /* disabled until we update wireless-regdb */ ++ + struct fwdb_country { + u8 alpha2[2]; + __be16 coll_ptr; +@@ -963,6 +988,8 @@ int reg_reload_regdb(void) + return err; + } + ++#endif ++ + static bool reg_query_database(struct regulatory_request *request) + { + if (query_regdb_file(request->alpha2) == 0) diff --git a/debian/patches/series b/debian/patches/series index d4a97c7f3..3e68eb0cb 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -140,4 +140,7 @@ bugfix/arm64/ARM64-dts-meson-reduce-odroid-c2-eMMC-maximum-rate.patch # Backport patches from linux-next (next-20180103) to support SMP on tegra210 systems features/arm64/tegra210-smp/0001-arm64-tegra-Add-CPU-and-PSCI-nodes-for-NVIDIA-Tegra2.patch +# wireless: Disable regulatory.db direct loading (until we sort out signing) +debian/wireless-disable-regulatory.db-direct-loading.patch + # ABI maintenance