From 5037d532b83d7325a2743dffe82882a64697a8e8 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Wed, 27 Aug 2014 17:04:55 -0700 Subject: 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 Signed-off-by: David S. Miller --- net/dsa/slave.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'net/dsa/slave.c') 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 @@ -450,6 +450,11 @@ dsa_slave_create(struct dsa_switch *ds, struct device *parent, case htons(ETH_P_TRAILER): 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 = ¬ag_netdev_ops; -- cgit v1.2.3