1
0
mirror of https://git.openwrt.org/feed/routing.git synced 2024-06-21 16:18:30 +02:00
openwrt-routing/batmand/patches/100-2.6.36.patch
Sven Eckelmann 55890241f5 batmand: Use git repository to retrieve sources
The current package is build around the subversion repository which does
not exist anymore. The package can therefore be moved to the git repository
to have an official source for the revision used in OpenWrt.

The SVN version of batman r1439 was actually r1435. The git export of revision
r1435 is referenced by this commit. The version number was only increased
to 1440 to create a new source tarball. SVN revision r1440 is not a commit
for batman and therefore no code changes in batman was done in r1440.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2017-01-23 19:47:52 +01:00

48 lines
1.4 KiB
Diff

---
batman/linux/modules/gateway.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
--- batmand-r1439.orig/linux/modules/gateway.c
+++ batmand-r1439/linux/modules/gateway.c
@@ -29,6 +29,7 @@ static struct class *batman_class;
static int batgat_open(struct inode *inode, struct file *filp);
static int batgat_release(struct inode *inode, struct file *file);
static int batgat_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg );
+static long batgat_ioctl_unlocked(struct file *file, unsigned int cmd, unsigned long arg );
static void udp_data_ready(struct sock *sk, int len);
@@ -53,7 +54,11 @@ static int proc_clients_read(char *buf,
static struct file_operations fops = {
.open = batgat_open,
.release = batgat_release,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
+ .unlocked_ioctl = batgat_ioctl_unlocked,
+#else
.ioctl = batgat_ioctl,
+#endif
};
@@ -166,6 +171,20 @@ static int batgat_release(struct inode *
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
+#include <linux/smp_lock.h>
+static long batgat_ioctl_unlocked(struct file *file, unsigned int cmd, unsigned long arg )
+{
+ int ret;
+
+ lock_kernel();
+ ret = batgat_ioctl(file->f_path.dentry->d_inode, file, cmd, arg);
+ unlock_kernel();
+
+ return ret;
+}
+#endif
+
static int batgat_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg )
{
uint8_t tmp_ip[4];