1 /* SPDX-License-Identifier: GPL-2.0
2 * Copyright (c) 2019, Vladimir Oltean <olteanv@gmail.com>
5 #ifndef _NET_DSA_8021Q_H
6 #define _NET_DSA_8021Q_H
8 #include <linux/types.h>
15 #if IS_ENABLED(CONFIG_NET_DSA_TAG_8021Q)
17 int dsa_port_setup_8021q_tagging(struct dsa_switch *ds, int index,
20 struct sk_buff *dsa_8021q_xmit(struct sk_buff *skb, struct net_device *netdev,
23 struct sk_buff *dsa_8021q_rcv(struct sk_buff *skb, struct net_device *netdev,
24 struct packet_type *pt, u16 *tpid, u16 *tci);
26 u16 dsa_8021q_tx_vid(struct dsa_switch *ds, int port);
28 u16 dsa_8021q_rx_vid(struct dsa_switch *ds, int port);
30 int dsa_8021q_rx_switch_id(u16 vid);
32 int dsa_8021q_rx_source_port(u16 vid);
36 int dsa_port_setup_8021q_tagging(struct dsa_switch *ds, int index,
42 struct sk_buff *dsa_8021q_xmit(struct sk_buff *skb, struct net_device *netdev,
48 struct sk_buff *dsa_8021q_rcv(struct sk_buff *skb, struct net_device *netdev,
49 struct packet_type *pt, u16 *tpid, u16 *tci)
54 u16 dsa_8021q_tx_vid(struct dsa_switch *ds, int port)
59 u16 dsa_8021q_rx_vid(struct dsa_switch *ds, int port)
64 int dsa_8021q_rx_switch_id(u16 vid)
69 int dsa_8021q_rx_source_port(u16 vid)
74 #endif /* IS_ENABLED(CONFIG_NET_DSA_TAG_8021Q) */
76 #endif /* _NET_DSA_8021Q_H */