Skip to content

Commit 129bd7c

Browse files
ffainellidavem330
authored andcommitted
net: dsa: Prevent usage of NET_DSA_TAG_8021Q as tagging protocol
It is possible for a switch driver to use NET_DSA_TAG_8021Q as a valid DSA tagging protocol since it registers itself as such, unfortunately since there are not xmit or rcv functions provided, the lack of a xmit() function will lead to a NPD in dsa_slave_xmit() to start with. net/dsa/tag_8021q.c is only comprised of a set of helper functions at the moment, but is not a fully autonomous or functional tagging "driver" (though it could become later on). We do not have any users of NET_DSA_TAG_8021Q so now is a good time to make sure there are not issues being encountered by making this file strictly a place holder for helper functions. Reviewed-by: Vladimir Oltean <[email protected]> Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 46cb01e commit 129bd7c

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

net/dsa/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if NET_DSA
2020

2121
# tagging formats
2222
config NET_DSA_TAG_8021Q
23-
tristate "Tag driver for switches using custom 802.1Q VLAN headers"
23+
tristate
2424
select VLAN_8021Q
2525
help
2626
Unlike the other tagging protocols, the 802.1Q config option simply

net/dsa/tag_8021q.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -341,13 +341,4 @@ struct sk_buff *dsa_8021q_remove_header(struct sk_buff *skb)
341341
}
342342
EXPORT_SYMBOL_GPL(dsa_8021q_remove_header);
343343

344-
static const struct dsa_device_ops dsa_8021q_netdev_ops = {
345-
.name = "8021q",
346-
.proto = DSA_TAG_PROTO_8021Q,
347-
.overhead = VLAN_HLEN,
348-
};
349-
350344
MODULE_LICENSE("GPL v2");
351-
MODULE_ALIAS_DSA_TAG_DRIVER(DSA_TAG_PROTO_8021Q);
352-
353-
module_dsa_tag_driver(dsa_8021q_netdev_ops);

0 commit comments

Comments
 (0)