aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2016-07-04 15:20:25 +0200
committerJohn Crispin <john@phrozen.org>2016-07-05 22:59:13 +0200
commit2c9073282d59533a25a783fe2fa6a69e5d7aa247 (patch)
tree18cbf745ee38de3b2f67ee56c22b8902b54ec0b3 /target/linux
parent69a626b4419d58b319e5080ca4aab397b58d5dce (diff)
downloadupstream-2c9073282d59533a25a783fe2fa6a69e5d7aa247.tar.gz
upstream-2c9073282d59533a25a783fe2fa6a69e5d7aa247.tar.bz2
upstream-2c9073282d59533a25a783fe2fa6a69e5d7aa247.zip
ramips: fix MT7621 gsw handling
based on https://forum.openwrt.org/viewtopic.php?pid=323671#p323671 Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ramips/patches-4.4/0519-gsw_mt7621.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/target/linux/ramips/patches-4.4/0519-gsw_mt7621.patch b/target/linux/ramips/patches-4.4/0519-gsw_mt7621.patch
new file mode 100644
index 0000000000..c5e73d5ca8
--- /dev/null
+++ b/target/linux/ramips/patches-4.4/0519-gsw_mt7621.patch
@@ -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 */