~ubuntu-branches/debian/sid/ndiswrapper/sid

« back to all changes in this revision

Viewing changes to debian/patches/kernel-3.14.patch

  • Committer: Package Import Robot
  • Author(s): Julian Andres Klode
  • Date: 2014-03-19 16:08:06 UTC
  • Revision ID: package-import@ubuntu.com-20140319160806-ku95isx0yylekdd8
Tags: 1.59-2
* Only support modprobe.d (Closes: #724890)
* debian/control: Set Standards-Version to 3.9.5
* Recommend ndiswrapper-dkms in Ubuntu builds as well
* kernel-3.14.patch: Add support for kernel 3.14

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Kernel 3.14 changes
 
2
 
 
3
This is a diff consisting of upstream revisions 3199, 3201, 3203.
 
4
 
 
5
* Use prandom_seed() instead of net_srandom() on Linux 3.8+
 
6
net_srandom() is going away.
 
7
 
 
8
* Avoid preempt_enable_no_resched(), it's no longer available for modules
 
9
Use preempt_enable() instead. This makes nt_spin_unlock_irqrestore()
 
10
fully complementary to nt_spin_lock_irqsave().
 
11
 
 
12
* Define reinit_completion() based on the kernel version
 
13
Checking for INIT_COMPLETION was a temporary hack needed before Linux
 
14
3.13-rc1 was released.
 
15
 
 
16
The last patch might not be really related to kernel 3.14, but is included
 
17
as well.
 
18
 
 
19
Origin: upstream, http://sourceforge.net/p/ndiswrapper/code/
 
20
 
 
21
--- a/driver/crt.c
 
22
+++ b/driver/crt.c
 
23
@@ -467,7 +467,7 @@ noregparm int WIN_FUNC(_win_memcmp,3)
 
24
 noregparm void WIN_FUNC(_win_srand,1)
 
25
        (UINT seed)
 
26
 {
 
27
-       net_srandom(seed);
 
28
+       prandom_seed((__force u32)(seed));
 
29
 }
 
30
 
 
31
 noregparm int WIN_FUNC(rand,0)
 
32
--- a/driver/ntoskernel.h
 
33
+++ b/driver/ntoskernel.h
 
34
@@ -347,7 +347,7 @@ static inline void netif_poll_disable(st
 
35
 #define netdev_notifier_info_to_dev(x) ((struct net_device *)(x))
 
36
 #endif
 
37
 
 
38
-#ifdef INIT_COMPLETION
 
39
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0)
 
40
 static inline void reinit_completion(struct completion *x)
 
41
 {
 
42
        INIT_COMPLETION(*x);
 
43
@@ -797,9 +797,8 @@ do {                                                                        \
 
44
 #define nt_spin_unlock_irqrestore(lock, flags)                         \
 
45
 do {                                                                   \
 
46
        nt_spin_unlock(lock);                                           \
 
47
-       preempt_enable_no_resched();                                    \
 
48
+       preempt_enable();                                       \
 
49
        local_irq_restore(flags);                                       \
 
50
-       preempt_check_resched();                                        \
 
51
 } while (0)
 
52
 
 
53
 static inline ULONG SPAN_PAGES(void *ptr, SIZE_T length)