aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/sja1105
diff options
context:
space:
mode:
authorVladimir Oltean <olteanv@gmail.com>2019-06-08 15:04:31 +0300
committerDavid S. Miller <davem@davemloft.net>2019-06-08 15:20:40 -0700
commitf9a1a7646c0d8351a2529b221c4f5fa46b384ee6 (patch)
treee7367c778048971b97360853906c294676c489de /drivers/net/dsa/sja1105
parentnet: dsa: sja1105: Move sja1105_change_tpid into sja1105_vlan_filtering (diff)
downloadlinux-dev-f9a1a7646c0d8351a2529b221c4f5fa46b384ee6.tar.xz
linux-dev-f9a1a7646c0d8351a2529b221c4f5fa46b384ee6.zip
net: dsa: sja1105: Reverse TPID and TPID2
>From reading the P/Q/R/S user manual, it appears that TPID is used by the switch for detecting S-tags and TPID2 for C-tags. Their meaning is not clear from the E/T manual. Signed-off-by: Vladimir Oltean <olteanv@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/sja1105')
-rw-r--r--drivers/net/dsa/sja1105/sja1105_main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/dsa/sja1105/sja1105_main.c b/drivers/net/dsa/sja1105/sja1105_main.c
index 8ee63f2e6529..ecb54b828593 100644
--- a/drivers/net/dsa/sja1105/sja1105_main.c
+++ b/drivers/net/dsa/sja1105/sja1105_main.c
@@ -1421,8 +1421,8 @@ static int sja1105_vlan_filtering(struct dsa_switch *ds, int port, bool enabled)
if (enabled) {
/* Enable VLAN filtering. */
- tpid = ETH_P_8021Q;
- tpid2 = ETH_P_8021AD;
+ tpid = ETH_P_8021AD;
+ tpid2 = ETH_P_8021Q;
} else {
/* Disable VLAN filtering. */
tpid = ETH_P_SJA1105;
@@ -1431,7 +1431,9 @@ static int sja1105_vlan_filtering(struct dsa_switch *ds, int port, bool enabled)
table = &priv->static_config.tables[BLK_IDX_GENERAL_PARAMS];
general_params = table->entries;
+ /* EtherType used to identify outer tagged (S-tag) VLAN traffic */
general_params->tpid = tpid;
+ /* EtherType used to identify inner tagged (C-tag) VLAN traffic */
general_params->tpid2 = tpid2;
rc = sja1105_static_config_reload(priv);