#include <linux/dsa/brcm.h>
#include <linux/etherdevice.h>
#include <linux/if_vlan.h>
#include <linux/list.h>
#include <linux/slab.h>
#include "tag.h"
#define BRCM_NAME …
#define BRCM_LEGACY_NAME …
#define BRCM_PREPEND_NAME …
#define BRCM_LEG_TAG_LEN …
#define BRCM_LEG_TYPE_HI …
#define BRCM_LEG_TYPE_LO …
#define BRCM_LEG_UNICAST …
#define BRCM_LEG_MULTICAST …
#define BRCM_LEG_EGRESS …
#define BRCM_LEG_INGRESS …
#define BRCM_LEG_PORT_ID …
#define BRCM_TAG_LEN …
#define BRCM_OPCODE_SHIFT …
#define BRCM_OPCODE_MASK …
#define BRCM_IG_TC_SHIFT …
#define BRCM_IG_TC_MASK …
#define BRCM_IG_TE_MASK …
#define BRCM_IG_TS_SHIFT …
#define BRCM_IG_DSTMAP2_MASK …
#define BRCM_IG_DSTMAP1_MASK …
#define BRCM_EG_CID_MASK …
#define BRCM_EG_RC_MASK …
#define BRCM_EG_RC_RSVD …
#define BRCM_EG_RC_EXCEPTION …
#define BRCM_EG_RC_PROT_SNOOP …
#define BRCM_EG_RC_PROT_TERM …
#define BRCM_EG_RC_SWITCH …
#define BRCM_EG_RC_MAC_LEARN …
#define BRCM_EG_RC_MIRROR …
#define BRCM_EG_TC_SHIFT …
#define BRCM_EG_TC_MASK …
#define BRCM_EG_PID_MASK …
#if IS_ENABLED(CONFIG_NET_DSA_TAG_BRCM) || \
IS_ENABLED(CONFIG_NET_DSA_TAG_BRCM_PREPEND)
static struct sk_buff *brcm_tag_xmit_ll(struct sk_buff *skb,
struct net_device *dev,
unsigned int offset)
{ … }
static struct sk_buff *brcm_tag_rcv_ll(struct sk_buff *skb,
struct net_device *dev,
unsigned int offset)
{ … }
#endif
#if IS_ENABLED(CONFIG_NET_DSA_TAG_BRCM)
static struct sk_buff *brcm_tag_xmit(struct sk_buff *skb,
struct net_device *dev)
{ … }
static struct sk_buff *brcm_tag_rcv(struct sk_buff *skb, struct net_device *dev)
{ … }
static const struct dsa_device_ops brcm_netdev_ops = …;
DSA_TAG_DRIVER(brcm_netdev_ops);
MODULE_ALIAS_DSA_TAG_DRIVER(…);
#endif
#if IS_ENABLED(CONFIG_NET_DSA_TAG_BRCM_LEGACY)
static struct sk_buff *brcm_leg_tag_xmit(struct sk_buff *skb,
struct net_device *dev)
{ … }
static struct sk_buff *brcm_leg_tag_rcv(struct sk_buff *skb,
struct net_device *dev)
{ … }
static const struct dsa_device_ops brcm_legacy_netdev_ops = …;
DSA_TAG_DRIVER(brcm_legacy_netdev_ops);
MODULE_ALIAS_DSA_TAG_DRIVER(…);
#endif
#if IS_ENABLED(CONFIG_NET_DSA_TAG_BRCM_PREPEND)
static struct sk_buff *brcm_tag_xmit_prepend(struct sk_buff *skb,
struct net_device *dev)
{ … }
static struct sk_buff *brcm_tag_rcv_prepend(struct sk_buff *skb,
struct net_device *dev)
{ … }
static const struct dsa_device_ops brcm_prepend_netdev_ops = …;
DSA_TAG_DRIVER(brcm_prepend_netdev_ops);
MODULE_ALIAS_DSA_TAG_DRIVER(…);
#endif
static struct dsa_tag_driver *dsa_tag_driver_array[] = …;
module_dsa_tag_drivers(dsa_tag_driver_array);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;