Skip to content
Commit cf85d08f authored by Lennert Buytenhek's avatar Lennert Buytenhek Committed by David S. Miller
Browse files

dsa: add support for original DSA tagging format



Most of the DSA switches currently in the field do not support the
Ethertype DSA tagging format that one of the previous patches added
support for, but only the original DSA tagging format.

The original DSA tagging format carries the same information as the
Ethertype DSA tagging format, but with the difference that it does not
have an ethertype field.  In other words, when receiving a packet that
is tagged with an original DSA tag, there is no way of telling in
eth_type_trans() that this packet is in fact a DSA-tagged packet.

This patch adds a hook into eth_type_trans() which is only compiled in
if support for a switch chip that doesn't support Ethertype DSA is
selected, and which checks whether there is a DSA switch driver
instance attached to this network device which uses the old tag format.
If so, it sets the protocol field to ETH_P_DSA without looking at the
packet, so that the packet ends up in the right place.

Signed-off-by: default avatarLennert Buytenhek <buytenh@marvell.com>
Tested-by: default avatarNicolas Pitre <nico@marvell.com>
Tested-by: default avatarPeter van Valderen <linux@ddcrew.com>
Tested-by: default avatarDirk Teurlings <dirk@upexia.nl>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 91da11f8
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