mirror of
https://github.com/breeze303/nss-packages.git
synced 2025-12-16 16:57:29 +00:00
qca: add mcs
This commit is contained in:
parent
5d9ea1171b
commit
26cbc20e4f
64
qca/qca-mcs/Makefile
Normal file
64
qca/qca-mcs/Makefile
Normal file
@ -0,0 +1,64 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=qca-mcs
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/qca-mcs.git
|
||||
PKG_SOURCE_DATE:=2022-03-16
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=dd8a438
|
||||
PKG_MIRROR_HASH:=1d76eb02641c243a4a9416ff32d2cdc778c3d3095ad101d584fe4dc50661b376
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/qca-mcs
|
||||
SECTION:=kernel
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Support
|
||||
URL:=http://www.qca.qualcomm.com
|
||||
MAINTAINER:=Qualcomm Atheros, Inc.
|
||||
TITLE:=QCA Multicast Snooping Support
|
||||
DEPENDS:=+@KERNEL_IPV6_MROUTE +@KERNEL_IP_MROUTE
|
||||
|
||||
KCONFIG:=CONFIG_NETFILTER=y CONFIG_BRIDGE_NETFILTER=y
|
||||
FILES:=$(PKG_BUILD_DIR)/qca-mcs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,41,qca-mcs)
|
||||
endef
|
||||
|
||||
define KernelPackage/qca-mcs/description
|
||||
This package installs the IGMP/MLD Snooping Module
|
||||
endef
|
||||
|
||||
QCA_MC_SNOOPING_HEADERS= \
|
||||
$(PKG_BUILD_DIR)/mc_api.h \
|
||||
$(PKG_BUILD_DIR)/mc_ecm.h \
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include/qca-mcs
|
||||
$(foreach header_file,$(QCA_MC_SNOOPING_HEADERS), $(CP) $(header_file) $(1)/usr/include/qca-mcs;)
|
||||
$(foreach header_file,$(QCA_MC_SNOOPING_HEADERS), $(CP) $(header_file) $(1)/usr/include/;)
|
||||
endef
|
||||
|
||||
EXTRA_CFLAGS+=-Wno-implicit-fallthrough
|
||||
|
||||
QCA_MC_SNOOPING_MAKE_OPTS:= \
|
||||
$(KERNEL_MAKE_FLAGS) \
|
||||
CONFIG_SUPPORT_MLD=y \
|
||||
MDIR=$(PKG_BUILD_DIR) \
|
||||
KBUILDPATH=$(LINUX_DIR) \
|
||||
KERNELPATH=$(LINUX_SRC_DIR) \
|
||||
KERNELRELEASE=$(LINUX_RELEASE)
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) $(PKG_JOBS) -C $(LINUX_DIR) \
|
||||
$(KERNEL_MAKE_FLAGS) \
|
||||
KBUILDPATH=$(LINUX_DIR) \
|
||||
$(PKG_MAKE_FLAGS) \
|
||||
M=$(PKG_BUILD_DIR) \
|
||||
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
|
||||
$(strip $(QCA_MC_SNOOPING_MAKE_OPTS)) \
|
||||
modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,qca-mcs))
|
||||
40
qca/qca-mcs/patches/0001-kernel-5.10-compat.patch
Normal file
40
qca/qca-mcs/patches/0001-kernel-5.10-compat.patch
Normal file
@ -0,0 +1,40 @@
|
||||
--- a/mc_osdep.h
|
||||
+++ b/mc_osdep.h
|
||||
@@ -189,7 +189,7 @@ static inline struct net_bridge_port *mc
|
||||
|
||||
dst = os_br_fdb_get((struct net_bridge *)br, eth_hdr(*skb)->h_dest);
|
||||
|
||||
- if (dst && !dst->is_local)
|
||||
+ if (dst && !test_bit(BR_FDB_LOCAL, &dst->flags))
|
||||
return dst->dst;
|
||||
|
||||
return NULL;
|
||||
--- a/mc_snooping.c
|
||||
+++ b/mc_snooping.c
|
||||
@@ -3450,6 +3450,18 @@ static int mc_proc_snooper_open(struct i
|
||||
return single_open(file, mc_proc_snooper_show, NULL);
|
||||
}
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)
|
||||
+#define HAVE_PROC_OPS
|
||||
+#endif
|
||||
+
|
||||
+#ifdef HAVE_PROC_OPS
|
||||
+static const struct proc_ops mc_proc_snooper_fops = {
|
||||
+ .proc_open = mc_proc_snooper_open,
|
||||
+ .proc_read = seq_read,
|
||||
+ .proc_lseek = seq_lseek,
|
||||
+ .proc_release = single_release,
|
||||
+};
|
||||
+#else
|
||||
static const struct file_operations mc_proc_snooper_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = mc_proc_snooper_open,
|
||||
@@ -3457,6 +3469,7 @@ static const struct file_operations mc_p
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
};
|
||||
+#endif
|
||||
|
||||
/* mc_proc_create_snooper_entry
|
||||
* create proc entry for information show
|
||||
Loading…
Reference in New Issue
Block a user