2016-07-04 13:20:25 +00:00
|
|
|
--- a/drivers/net/ethernet/mediatek/mt7530.c
|
|
|
|
+++ b/drivers/net/ethernet/mediatek/mt7530.c
|
2016-11-29 10:59:48 +00:00
|
|
|
@@ -543,6 +543,7 @@ mt7530_apply_config(struct switch_dev *d
|
2016-07-04 13:20:25 +00:00
|
|
|
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) {
|
2016-11-29 10:59:48 +00:00
|
|
|
@@ -553,7 +554,7 @@ mt7530_apply_config(struct switch_dev *d
|
2016-07-04 13:20:25 +00:00
|
|
|
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 |
|
2016-11-29 10:59:48 +00:00
|
|
|
@@ -573,7 +574,11 @@ mt7530_apply_config(struct switch_dev *d
|
2016-07-04 13:20:25 +00:00
|
|
|
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 */
|