Commit f9a1a764 authored by Vladimir Oltean's avatar Vladimir Oltean Committed by David S. Miller

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: default avatarVladimir Oltean <olteanv@gmail.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 070ca3bb
...@@ -1421,8 +1421,8 @@ static int sja1105_vlan_filtering(struct dsa_switch *ds, int port, bool enabled) ...@@ -1421,8 +1421,8 @@ static int sja1105_vlan_filtering(struct dsa_switch *ds, int port, bool enabled)
if (enabled) { if (enabled) {
/* Enable VLAN filtering. */ /* Enable VLAN filtering. */
tpid = ETH_P_8021Q; tpid = ETH_P_8021AD;
tpid2 = ETH_P_8021AD; tpid2 = ETH_P_8021Q;
} else { } else {
/* Disable VLAN filtering. */ /* Disable VLAN filtering. */
tpid = ETH_P_SJA1105; tpid = ETH_P_SJA1105;
...@@ -1431,7 +1431,9 @@ static int sja1105_vlan_filtering(struct dsa_switch *ds, int port, bool enabled) ...@@ -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]; table = &priv->static_config.tables[BLK_IDX_GENERAL_PARAMS];
general_params = table->entries; general_params = table->entries;
/* EtherType used to identify outer tagged (S-tag) VLAN traffic */
general_params->tpid = tpid; general_params->tpid = tpid;
/* EtherType used to identify inner tagged (C-tag) VLAN traffic */
general_params->tpid2 = tpid2; general_params->tpid2 = tpid2;
rc = sja1105_static_config_reload(priv); rc = sja1105_static_config_reload(priv);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment