summaryrefslogtreecommitdiffstats
path: root/net/dsa/dsa.c
diff options
context:
space:
mode:
authorFlorian Fainelli2017-11-11 00:22:54 +0100
committerDavid S. Miller2017-11-13 02:34:54 +0100
commitb74b70c44986dee87881fbed3d912e02c5dcf78c (patch)
treec3d9d3d5577243c258d27153fdf114f1a7e73ba8 /net/dsa/dsa.c
parentnet: dsa: tag_brcm: Prepare for supporting prepended tag (diff)
downloadkernel-qcow2-linux-b74b70c44986dee87881fbed3d912e02c5dcf78c.tar.gz
kernel-qcow2-linux-b74b70c44986dee87881fbed3d912e02c5dcf78c.tar.xz
kernel-qcow2-linux-b74b70c44986dee87881fbed3d912e02c5dcf78c.zip
net: dsa: Support prepended Broadcom tag
Add a new type: DSA_TAG_PROTO_PREPEND which allows us to support for the 4-bytes Broadcom tag that we already support, but in a format where it is pre-pended to the packet instead of located between the MAC SA and the Ethertyper (DSA_TAG_PROTO_BRCM). Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/dsa.c')
-rw-r--r--net/dsa/dsa.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index b8f2d9f7c3ed..6a9d0f50fbee 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -44,6 +44,9 @@ const struct dsa_device_ops *dsa_device_ops[DSA_TAG_LAST] = {
#ifdef CONFIG_NET_DSA_TAG_BRCM
[DSA_TAG_PROTO_BRCM] = &brcm_netdev_ops,
#endif
+#ifdef CONFIG_NET_DSA_TAG_BRCM_PREPEND
+ [DSA_TAG_PROTO_BRCM_PREPEND] = &brcm_prepend_netdev_ops,
+#endif
#ifdef CONFIG_NET_DSA_TAG_DSA
[DSA_TAG_PROTO_DSA] = &dsa_netdev_ops,
#endif