summaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/patches-4.4/0519-gsw_mt7621.patch
blob: 67e9060ea0e9b5c0c57029b74a9092506fe2c97b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--- a/drivers/net/ethernet/mediatek/mt7530.c
+++ b/drivers/net/ethernet/mediatek/mt7530.c
@@ -539,6 +539,7 @@ mt7530_apply_config(struct switch_dev *d
 		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 @@ mt7530_apply_config(struct switch_dev *d
 			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_apply_config(struct switch_dev *d
 		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 */