lede/package/qca/qca-mcs/patches/0001-kernel-5.10-compat.patch
2024-06-14 17:15:13 +08:00

41 lines
1.1 KiB
Diff

--- 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
@@ -3453,6 +3453,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,
@@ -3460,6 +3472,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