summaryrefslogtreecommitdiff
path: root/network/ndiswrapper-kernel/patches/0002-Add-support-for-kernel-3.9.patch
blob: 3f7516933830d1779a7854558c02c1fa28ab350a (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
From a2577406f5d76ec02562f083e8b345702b74fce5 Mon Sep 17 00:00:00 2001
From: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Date: Tue, 8 Oct 2013 20:51:14 +0300
Subject: [PATCH 2/5] Add support for kernel 3.9

Taken from git://anonscm.debian.org/collab-maint/ndiswrapper.git
debian/patches/support-kernel-3.9.patch
Patch authorship is not clear, the committer was
Julian Andres Klode <jak@debian.org>

Gentoo ebuild uses similar patch, but with LOCKDEP_STILL_OK instead of
LOCKDEP_NOW_UNRELIABLE. I don't know yet which is more correct.

Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
---
 driver/loader.c  | 4 ++++
 driver/wrapper.c | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/driver/loader.c b/driver/loader.c
index 406e6ba..2b27252 100644
--- a/driver/loader.c
+++ b/driver/loader.c
@@ -575,7 +575,11 @@ static int load_user_space_driver(struct load_driver *load_driver)
 	} else {
 		printk(KERN_INFO "%s: driver %s (%s) loaded\n",
 		       DRIVER_NAME, wrap_driver->name, wrap_driver->version);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)
 		add_taint(TAINT_PROPRIETARY_MODULE);
+#else
+		add_taint(TAINT_PROPRIETARY_MODULE, LOCKDEP_NOW_UNRELIABLE);
+#endif
 		EXIT1(return 0);
 	}
 }
diff --git a/driver/wrapper.c b/driver/wrapper.c
index f77c879..1bd3116 100644
--- a/driver/wrapper.c
+++ b/driver/wrapper.c
@@ -72,7 +72,11 @@ static void module_cleanup(void)
 static int __init wrapper_init(void)
 {
 #ifdef TAINT_OOT_MODULE
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)
 	add_taint(TAINT_OOT_MODULE);
+#else
+	add_taint(TAINT_OOT_MODULE, LOCKDEP_NOW_UNRELIABLE);
+#endif
 #endif
 	printk(KERN_INFO "%s version %s loaded (smp=%s, preempt=%s)\n",
 	       DRIVER_NAME, DRIVER_VERSION,
-- 
1.8.4