Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 396138f0 authored by Lennert Buytenhek's avatar Lennert Buytenhek Committed by David S. Miller
Browse files

dsa: add support for Trailer tagging format



This adds support for the Trailer switch tagging format.  This is
another tagging that doesn't explicitly mark tagged packets with a
distinct ethertype, so that we need to add a similar hack in the
receive path as for the Original DSA tagging format.

Signed-off-by: default avatarLennert Buytenhek <buytenh@marvell.com>
Tested-by: default avatarByron Bradley <byron.bbradley@gmail.com>
Tested-by: default avatarTim Ellis <tim.ellis@mac.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2e5f0320
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -102,6 +102,7 @@
#define ETH_P_HDLC	0x0019		/* HDLC frames			*/
#define ETH_P_ARCNET	0x001A		/* 1A for ArcNet :-)            */
#define ETH_P_DSA	0x001B		/* Distributed Switch Arch.	*/
#define ETH_P_TRAILER	0x001C		/* Trailer switch tagging	*/
#define ETH_P_PHONET	0x00F5		/* Nokia Phonet frames          */

/*
+10 −0
Original line number Diff line number Diff line
@@ -812,6 +812,16 @@ static inline bool netdev_uses_dsa_tags(struct net_device *dev)
	return 0;
}

static inline bool netdev_uses_trailer_tags(struct net_device *dev)
{
#ifdef CONFIG_NET_DSA_TAG_TRAILER
	if (dev->dsa_ptr != NULL)
		return dsa_uses_trailer_tags(dev->dsa_ptr);
#endif

	return 0;
}

/**
 *	netdev_priv - access network device private data
 *	@dev: network device
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ struct dsa_platform_data {
};

extern bool dsa_uses_dsa_tags(void *dsa_ptr);
extern bool dsa_uses_trailer_tags(void *dsa_ptr);


#endif
+4 −0
Original line number Diff line number Diff line
@@ -18,6 +18,10 @@ config NET_DSA_TAG_EDSA
	bool
	default n

config NET_DSA_TAG_TRAILER
	bool
	default n


# switch drivers
config NET_DSA_MV88E6XXX
+1 −0
Original line number Diff line number Diff line
# tagging formats
obj-$(CONFIG_NET_DSA_TAG_DSA) += tag_dsa.o
obj-$(CONFIG_NET_DSA_TAG_EDSA) += tag_edsa.o
obj-$(CONFIG_NET_DSA_TAG_TRAILER) += tag_trailer.o

# switch drivers
obj-$(CONFIG_NET_DSA_MV88E6XXX) += mv88e6xxx.o
Loading