mirror of https://github.com/hak5/openwrt.git
ramips: fix MT7621 gsw handling
based on https://forum.openwrt.org/viewtopic.php?pid=323671#p323671 Signed-off-by: John Crispin <john@phrozen.org>lede-17.01
parent
69a626b441
commit
2c9073282d
|
@ -0,0 +1,31 @@
|
||||||
|
--- a/drivers/net/ethernet/mediatek/mt7530.c
|
||||||
|
+++ b/drivers/net/ethernet/mediatek/mt7530.c
|
||||||
|
@@ -539,6 +539,7 @@
|
||||||
|
u8 etags = priv->vlan_entries[i].etags;
|
||||||
|
u32 val;
|
||||||
|
|
||||||
|
+#ifndef CONFIG_SOC_MT7621
|
||||||
|
/* vid of vlan */
|
||||||
|
val = mt7530_r32(priv, REG_ESW_VLAN_VTIM(i));
|
||||||
|
if (i % 2 == 0) {
|
||||||
|
@@ -549,7 +550,7 @@
|
||||||
|
val |= (vid << 12);
|
||||||
|
}
|
||||||
|
mt7530_w32(priv, REG_ESW_VLAN_VTIM(i), val);
|
||||||
|
-
|
||||||
|
+#endif
|
||||||
|
/* vlan port membership */
|
||||||
|
if (member)
|
||||||
|
mt7530_w32(priv, REG_ESW_VLAN_VAWD1, REG_ESW_VLAN_VAWD1_IVL_MAC |
|
||||||
|
@@ -569,7 +570,11 @@
|
||||||
|
mt7530_w32(priv, REG_ESW_VLAN_VAWD2, val);
|
||||||
|
|
||||||
|
/* write to vlan table */
|
||||||
|
+#ifdef CONFIG_SOC_MT7621
|
||||||
|
+ mt7530_vtcr(priv, 1, vid);
|
||||||
|
+#else
|
||||||
|
mt7530_vtcr(priv, 1, i);
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Port Default PVID */
|
Loading…
Reference in New Issue