Fresh pull from upstream
[librecmc/librecmc.git] / target / linux / ramips / patches-4.4 / 0519-gsw_mt7621.patch
1 --- a/drivers/net/ethernet/mediatek/mt7530.c
2 +++ b/drivers/net/ethernet/mediatek/mt7530.c
3 @@ -543,6 +543,7 @@ mt7530_apply_config(struct switch_dev *d
4                 u8 etags = priv->vlan_entries[i].etags;
5                 u32 val;
6  
7 +#ifndef CONFIG_SOC_MT7621
8                 /* vid of vlan */
9                 val = mt7530_r32(priv, REG_ESW_VLAN_VTIM(i));
10                 if (i % 2 == 0) {
11 @@ -553,7 +554,7 @@ mt7530_apply_config(struct switch_dev *d
12                         val |= (vid << 12);
13                 }
14                 mt7530_w32(priv, REG_ESW_VLAN_VTIM(i), val);
15 -
16 +#endif
17                 /* vlan port membership */
18                 if (member)
19                         mt7530_w32(priv, REG_ESW_VLAN_VAWD1, REG_ESW_VLAN_VAWD1_IVL_MAC |
20 @@ -573,7 +574,11 @@ mt7530_apply_config(struct switch_dev *d
21                 mt7530_w32(priv, REG_ESW_VLAN_VAWD2, val);
22  
23                 /* write to vlan table */
24 +#ifdef CONFIG_SOC_MT7621
25 +               mt7530_vtcr(priv, 1, vid);
26 +#else
27                 mt7530_vtcr(priv, 1, i);
28 +#endif
29         }
30  
31         /* Port Default PVID */