summaryrefslogtreecommitdiff
path: root/net/dsa/slave.c
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2014-08-28 04:04:55 +0400
committerDavid S. Miller <davem@davemloft.net>2014-08-28 09:59:40 +0400
commit5037d532b83d7325a2743dffe82882a64697a8e8 (patch)
tree6e972e759c9facbcbc7952baa619e991b9fa0343 /net/dsa/slave.c
parentce31b31c68e7e39f29b1257581fbd08ce3ca5589 (diff)
downloadlinux-5037d532b83d7325a2743dffe82882a64697a8e8.tar.xz
net: dsa: add Broadcom tag RX/TX handler
Add support for the 4-bytes Broadcom tag that built-in switches such as the Starfighter 2 might insert when receiving packets, or that we need to insert while targetting specific switch ports. We use a fake local EtherType value for this 4-bytes switch tag: ETH_P_BRCMTAG to make sure we can assign DSA-specific network operations within the DSA drivers. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/slave.c')
-rw-r--r--net/dsa/slave.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 18ff53836fe3..7333a4aebb7d 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -451,6 +451,11 @@ dsa_slave_create(struct dsa_switch *ds, struct device *parent,
ds->dst->ops = &trailer_netdev_ops;
break;
#endif
+#ifdef CONFIG_NET_DSA_TAG_BRCM
+ case htons(ETH_P_BRCMTAG):
+ ds->dst->ops = &brcm_netdev_ops;
+ break;
+#endif
default:
ds->dst->ops = &notag_netdev_ops;
break;