mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 14:37:57 +00:00
5f38d1ad85
Move definitions to header. Replace array size definitions with macro. Signed-off-by: Vitaly Chekryzhev <13hakta@gmail.com> [merged into 0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch] Signed-off-by: Mathias Kresin <dev@kresin.me> Acked-by: John Crispin <john@phrozen.org>
32 lines
859 B
Diff
32 lines
859 B
Diff
--- a/drivers/net/ethernet/mediatek/mt7530.c
|
|
+++ b/drivers/net/ethernet/mediatek/mt7530.c
|
|
@@ -541,6 +541,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) {
|
|
@@ -551,7 +552,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 |
|
|
@@ -571,7 +572,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 */
|