mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 09:02:06 +00:00
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>
This commit is contained in:
parent
ce31b31c68
commit
5037d532b8
6 changed files with 190 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue