batmand: Drop batgat kernel module

This kernel module is broken since 2013 and doesn't build. It can therefore
be removed.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
This commit is contained in:
Sven Eckelmann 2019-07-27 21:52:58 +02:00
parent cb3f9d2436
commit ec9d4a6c42
2 changed files with 2 additions and 93 deletions

View File

@ -6,7 +6,6 @@
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=batmand
@ -25,17 +24,11 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
PKG_EXTRA_CFLAGS=-DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA -DREVISION_VERSION=\"\ rv$(PKG_REV)\" -D_GNU_SOURCE
PKG_KMOD_BUILD_DIR:=$(PKG_BUILD_DIR)/linux/modules
include $(INCLUDE_DIR)/package.mk
define Package/batmand/Default
define Package/batmand
URL:=https://www.open-mesh.org/
MAINTAINER:=Corinna "Elektra" Aichele <onelektra@gmx.net>
endef
define Package/batmand
$(call Package/batmand/Default)
SECTION:=net
CATEGORY:=Network
SUBMENU:=Routing and Redirection
@ -47,20 +40,6 @@ define Package/batmand/description
B.A.T.M.A.N. layer 3 routing daemon
endef
define KernelPackage/batgat
$(call Package/batmand/Default)
SUBMENU:=Network Support
DEPENDS:=+batmand @BROKEN
TITLE:=B.A.T.M.A.N. gateway module
FILES:=$(PKG_KMOD_BUILD_DIR)/batgat.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,50,batgat)
endef
define KernelPackage/batgat/description
Kernel gateway module for B.A.T.M.A.N. for better tunnel performance
endef
MAKE_BATMAND_ARGS += \
EXTRA_CFLAGS='$(TARGET_CFLAGS) $(PKG_EXTRA_CFLAGS)' \
CCFLAGS="$(TARGET_CFLAGS)" \
@ -73,30 +52,8 @@ MAKE_BATMAND_ARGS += \
STRIP="/bin/true" \
batmand install
MAKE_BATGAT_ARGS += \
CROSS_COMPILE="$(TARGET_CROSS)" \
ARCH="$(LINUX_KARCH)" \
PATH="$(TARGET_PATH)" \
SUBDIRS="$(PKG_KMOD_BUILD_DIR)" \
LINUX_VERSION="$(LINUX_VERSION)" \
REVISION="$(PKG_REV)" modules
define Build/Configure
endef
ifneq ($(DEVELOPER)$(CONFIG_PACKAGE_batmand),)
BUILD_BATMAND := $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_BATMAND_ARGS)
endif
ifneq ($(DEVELOPER)$(CONFIG_PACKAGE_kmod-batgat),)
BUILD_BATGAT := $(MAKE) -C "$(LINUX_DIR)" $(MAKE_BATGAT_ARGS)
endif
define Build/Compile
$(BUILD_BATMAND)
cp $(PKG_KMOD_BUILD_DIR)/Makefile.kbuild $(PKG_KMOD_BUILD_DIR)/Makefile
$(BUILD_BATGAT)
$(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_BATMAND_ARGS)
endef
define Package/batmand/install
@ -111,4 +68,3 @@ define Package/batmand/conffiles
endef
$(eval $(call BuildPackage,batmand))
$(eval $(call KernelPackage,batgat))

View File

@ -1,47 +0,0 @@
---
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];