summaryrefslogtreecommitdiff
path: root/kernel/macremapper
diff options
context:
space:
mode:
authorCarey Sonsino <csonsino@gmail.com>2019-09-30 14:14:02 +0000
committerCarey Sonsino <csonsino@gmail.com>2019-10-09 14:53:01 +0000
commit0f00bcb16efabfea0de52b1bcabea764e3396f78 (patch)
tree68becba4871a7fb3d0622ef1a86762ff33d92389 /kernel/macremapper
parentd3012ecf08770171e02e46db38ff6e39d82ba4b5 (diff)
dcwifi: Update component versions
update package versions and hashes remove bzero patches remove uclibc++ patch refactor directory structure relocate mrmctl in menuconfig update macremapper patch Signed-off-by: Carey Sonsino <careys@edgewaterwireless.com> Signed-off-by: Carey Sonsino <csonsino@gmail.com>
Diffstat (limited to 'kernel/macremapper')
-rw-r--r--kernel/macremapper/Makefile42
-rw-r--r--kernel/macremapper/patches/01_fix_nf_hooks.patch27
2 files changed, 69 insertions, 0 deletions
diff --git a/kernel/macremapper/Makefile b/kernel/macremapper/Makefile
new file mode 100644
index 000000000..fc242eee8
--- /dev/null
+++ b/kernel/macremapper/Makefile
@@ -0,0 +1,42 @@
+#
+# Copyright (C) 2019 EWSI
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=macremapper
+PKG_VERSION:=1.1.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/ewsi/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=f9580427803123d13d50f3422623a37212034a5d72a485f9c04904f19509e4bb
+
+PKG_MAINTAINER:=Carey Sonsino <careys@edgewaterwireless.com>
+PKG_LICENSE:=GPL-2.0-only
+PKG_LICENSE_FILES:=kernelmod/COPYING
+
+include $(INCLUDE_DIR)/package.mk
+
+define KernelPackage/macremapper
+ SUBMENU:=Network Support
+ URL:=https://www.edgewaterwireless.com
+ VERSION:=$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE)
+ TITLE:=Dual Channel Wi-Fi macremapper Module
+ DEPENDS:= +kmod-cfg80211 +kmod-br-netfilter
+ FILES:=$(PKG_BUILD_DIR)/kernelmod/$(PKG_NAME).$(LINUX_KMOD_SUFFIX)
+ AUTOLOAD:=$(call AutoProbe,macremapper)
+endef
+
+define KernelPackage/macremapper/description
+ Linux kernel module for implementation the DCW filtering mechanism
+endef
+
+MAKE_FLAGS += KERNEL_SRC=$(LINUX_DIR)
+MAKE_PATH:=kernelmod
+
+$(eval $(call KernelPackage,macremapper))
diff --git a/kernel/macremapper/patches/01_fix_nf_hooks.patch b/kernel/macremapper/patches/01_fix_nf_hooks.patch
new file mode 100644
index 000000000..29cb421f8
--- /dev/null
+++ b/kernel/macremapper/patches/01_fix_nf_hooks.patch
@@ -0,0 +1,27 @@
+--- a/kernelmod/main.c
++++ b/kernelmod/main.c
+@@ -98,8 +98,11 @@ modinit( void ) {
+
+ rv = mrm_rcdb_init();
+ if (rv != 0) return rv;
+-
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,13,0)
+ nf_register_hook(&_hops);
++#else
++ nf_register_net_hook(&init_net, &_hops);
++#endif
+ mrm_init_ctlfile(); /* XXX not checking for failure! */
+
+ printk(KERN_INFO "MRM The MAC Address Re-Mapper is now in the kernel\n");
+@@ -110,7 +113,11 @@ modinit( void ) {
+ static void __exit
+ modexit( void ) {
+ mrm_destroy_ctlfile();
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,13,0)
+ nf_unregister_hook(&_hops);
++#else
++ nf_unregister_net_hook(&init_net, &_hops);
++#endif
+ mrm_rcdb_destroy(); /* imperative that this happens last */
+ printk(KERN_INFO "MRM The MAC Address Re-Mapper gone bye-bye\n");
+ }