From 7d9a7204d421589a9514cf7f56de170e51889f2a Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Wed, 4 May 2022 17:08:45 +0200
Subject: [PATCH] ramips: disable switch/bridge offload

This is breaking win10 laptops when vlan_filtering is enabled

Signed-off-by: John Crispin <john@phrozen.org>
---
 target/linux/ramips/patches-5.4/992-dsa.patch | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 target/linux/ramips/patches-5.4/992-dsa.patch

diff --git a/target/linux/ramips/patches-5.4/992-dsa.patch b/target/linux/ramips/patches-5.4/992-dsa.patch
new file mode 100644
index 0000000000..3c130a5be8
--- /dev/null
+++ b/target/linux/ramips/patches-5.4/992-dsa.patch
@@ -0,0 +1,30 @@
+Index: linux-5.4.158/drivers/net/dsa/mt7530.c
+===================================================================
+--- linux-5.4.158.orig/drivers/net/dsa/mt7530.c
++++ linux-5.4.158/drivers/net/dsa/mt7530.c
+@@ -1608,17 +1608,17 @@ static const struct dsa_switch_ops mt753
+ 	.port_enable		= mt7530_port_enable,
+ 	.port_disable		= mt7530_port_disable,
+ 	.port_stp_state_set	= mt7530_stp_state_set,
+-	.port_bridge_join	= mt7530_port_bridge_join,
+-	.port_bridge_leave	= mt7530_port_bridge_leave,
++//	.port_bridge_join	= mt7530_port_bridge_join,
++//	.port_bridge_leave	= mt7530_port_bridge_leave,
+ 	.port_fdb_add		= mt7530_port_fdb_add,
+ 	.port_fdb_del		= mt7530_port_fdb_del,
+ 	.port_fdb_dump		= mt7530_port_fdb_dump,
+-	.port_vlan_filtering	= mt7530_port_vlan_filtering,
+-	.port_vlan_prepare	= mt7530_port_vlan_prepare,
+-	.port_vlan_add		= mt7530_port_vlan_add,
+-	.port_vlan_del		= mt7530_port_vlan_del,
+-	.port_mirror_add	= mt7530_port_mirror_add,
+-	.port_mirror_del	= mt7530_port_mirror_del,
++//	.port_vlan_filtering	= mt7530_port_vlan_filtering,
++//	.port_vlan_prepare	= mt7530_port_vlan_prepare,
++//	.port_vlan_add		= mt7530_port_vlan_add,
++//	.port_vlan_del		= mt7530_port_vlan_del,
++//	.port_mirror_add	= mt7530_port_mirror_add,
++//	.port_mirror_del	= mt7530_port_mirror_del,
+ 	.phylink_validate	= mt7530_phylink_validate,
+ 	.phylink_mac_link_state = mt7530_phylink_mac_link_state,
+ 	.phylink_mac_config	= mt7530_phylink_mac_config,
-- 
2.25.1

