Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=kernel2636.git;a=commitdiff;h=a6e897de9809078aaee84539f979dbe7099d5edd

commit a6e897de9809078aaee84539f979dbe7099d5edd
Author: Miklos Vajna <vmik...@frugalware.org>
Date:   Thu Oct 21 17:11:19 2010 +0200

ndiswrapper-1.56-10-i686

- add kernel-2.6.36.patch

diff --git a/source/network/ndiswrapper/FrugalBuild 
b/source/network/ndiswrapper/FrugalBuild
index a974dc5..cb188fc 100644
--- a/source/network/ndiswrapper/FrugalBuild
+++ b/source/network/ndiswrapper/FrugalBuild
@@ -4,7 +4,7 @@

pkgname=ndiswrapper
pkgver=1.56
-pkgrel=9
+pkgrel=10
pkgdesc="Wrapper for using Windows drivers for some wireless cards"
_F_kernelmod_scriptlet=$pkgname.install
Finclude kernel-module sourceforge
@@ -12,11 +12,12 @@ depends=(${depen...@]} 'pciutils' 'wireless_tools')
groups=('network')
archs=('i686' 'x86_64')
source=(${sour...@]} README.Frugalware ndiswrapper-detect-fix-x86_64.patch \
-       kernel-2.6.35.patch)
+       kernel-2.6.3{5,6}.patch)
sha1sums=('c461cf8e2c1f9e1f87e2a5c5e717f13d2fef5364' \
'c3f24143cb9814326a2c0c3cbc8d58d953bac268' \
'7e46cc4bb72520d911f256748e8c3936498f001b' \
-          '57d2cd99b8a2dc96ec8b136787f947c0426ad992')
+          '57d2cd99b8a2dc96ec8b136787f947c0426ad992' \
+          '41e486d736b9423c73efd35d604a4e6a83eed7bd')

build()
{
diff --git a/source/network/ndiswrapper/kernel-2.6.36.patch 
b/source/network/ndiswrapper/kernel-2.6.36.patch
new file mode 100644
index 0000000..80d4723
--- /dev/null
+++ b/source/network/ndiswrapper/kernel-2.6.36.patch
@@ -0,0 +1,64 @@
+
+BKL is going away...
+
+Push the locking down to the driver.
+
+Signed-off-by: Thomas Backlund <t...@mandriva.org>
+
+diff -Nurp ndiswrapper-1.56.orig/driver/loader.c 
ndiswrapper-1.56/driver/loader.c
+--- ndiswrapper-1.56.orig/driver/loader.c      2010-02-11 04:09:32.000000000 
+0200
++++ ndiswrapper-1.56/driver/loader.c   2010-10-02 18:57:56.971689617 +0300
+@@ -21,6 +21,9 @@
+ #include <linux/module.h>
+ #include <linux/kmod.h>
+ #include <linux/miscdevice.h>
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35)
++#include <linux/smp_lock.h>
++#endif
+ #include <asm/uaccess.h>
+
+ /*
+@@ -750,7 +753,11 @@ struct wrap_device *get_wrap_device(void
+ }
+
+ /* called with loader_mutex is down */
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35)
++static long wrapper_ioctl(struct file *file,
++#else
+ static int wrapper_ioctl(struct inode *inode, struct file *file,
++#endif
+                        unsigned int cmd, unsigned long arg)
+ {
+       struct load_driver *load_driver;
+@@ -759,6 +766,9 @@ static int wrapper_ioctl(struct inode *i
+       int ret;
+       void __user *addr = (void __user *)arg;
+
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35)
++      lock_kernel();
++#endif
+       ENTER1("cmd: %u", cmd);
+
+       ret = 0;
+@@ -820,6 +830,9 @@ static int wrapper_ioctl(struct inode *i
+               break;
+       }
+       complete(&loader_complete);
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35)
++      unlock_kernel();
++#endif
+       EXIT1(return ret);
+ }
+
+@@ -831,7 +844,11 @@ static int wrapper_ioctl_release(struct
+
+ static struct file_operations wrapper_fops = {
+       .owner          = THIS_MODULE,
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35)
++      .unlocked_ioctl = wrapper_ioctl,
++#else
+       .ioctl          = wrapper_ioctl,
++#endif
+       .release        = wrapper_ioctl_release,
+ };
+
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to