1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * net/dsa/tag_none.c - Traffic handling for switches with no tag
4  * Copyright (c) 2008-2009 Marvell Semiconductor
5  * Copyright (c) 2013 Florian Fainelli <florian@openwrt.org>
6  *
7  * WARNING: do not use this for new switches. In case of no hardware
8  * tagging support, look at tag_8021q.c instead.
9  */
10 
11 #include "tag.h"
12 
13 #define NONE_NAME	"none"
14 
dsa_slave_notag_xmit(struct sk_buff * skb,struct net_device * dev)15 static struct sk_buff *dsa_slave_notag_xmit(struct sk_buff *skb,
16 					    struct net_device *dev)
17 {
18 	/* Just return the original SKB */
19 	return skb;
20 }
21 
22 static const struct dsa_device_ops none_ops = {
23 	.name	= NONE_NAME,
24 	.proto	= DSA_TAG_PROTO_NONE,
25 	.xmit	= dsa_slave_notag_xmit,
26 };
27 
28 module_dsa_tag_driver(none_ops);
29 MODULE_ALIAS_DSA_TAG_DRIVER(DSA_TAG_PROTO_NONE, NONE_NAME);
30 MODULE_LICENSE("GPL");
31