aboutsummaryrefslogtreecommitdiffstats
path: root/debian/patches/debian/wireless-disable-regulatory.db-direct-loading.patch
blob: 60f3ec6e63931dc4d9f9db863723694d9d23878f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
From: Ben Hutchings <ben@decadent.org.uk>
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.

Index: debian-kernel/net/wireless/reg.c
===================================================================
--- debian-kernel.orig/net/wireless/reg.c
+++ debian-kernel/net/wireless/reg.c
@@ -489,6 +489,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;
@@ -508,6 +509,7 @@ static int reg_schedule_apply(const stru
 	schedule_work(&reg_regdb_work);
 	return 0;
 }
+#endif
 
 #ifdef CONFIG_CFG80211_CRDA_SUPPORT
 /* Max number of consecutive attempts to communicate with CRDA  */
@@ -587,6 +589,36 @@ 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;
+}
+
+int reg_query_regdb_wmm(char *alpha2, int freq, u32 *dbptr,
+			struct ieee80211_wmm_rule *rule)
+{
+	return -ENODATA;
+}
+EXPORT_SYMBOL(reg_query_regdb_wmm);
+
+#else /* disabled until we update wireless-regdb */
+
 struct fwdb_country {
 	u8 alpha2[2];
 	__be16 coll_ptr;
@@ -1152,6 +1184,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)