2 batman/linux/modules/gateway.c | 19 +++++++++++++++++++
3 1 file changed, 19 insertions(+)
5 --- batmand-r1439.orig/batman/linux/modules/gateway.c
6 +++ batmand-r1439/batman/linux/modules/gateway.c
7 @@ -29,6 +29,7 @@ static struct class *batman_class;
8 static int batgat_open(struct inode *inode, struct file *filp);
9 static int batgat_release(struct inode *inode, struct file *file);
10 static int batgat_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg );
11 +static long batgat_ioctl_unlocked(struct file *file, unsigned int cmd, unsigned long arg );
14 static void udp_data_ready(struct sock *sk, int len);
15 @@ -53,7 +54,11 @@ static int proc_clients_read(char *buf,
16 static struct file_operations fops = {
18 .release = batgat_release,
19 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
20 + .unlocked_ioctl = batgat_ioctl_unlocked,
22 .ioctl = batgat_ioctl,
27 @@ -166,6 +171,20 @@ static int batgat_release(struct inode *
31 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
32 +#include <linux/smp_lock.h>
33 +static long batgat_ioctl_unlocked(struct file *file, unsigned int cmd, unsigned long arg )
38 + ret = batgat_ioctl(file->f_path.dentry->d_inode, file, cmd, arg);
45 static int batgat_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg )