mirror of
https://github.com/ukui/kernel.git
synced 2026-03-09 10:07:04 -07:00
net: dsa: make tag_8021q operations part of the core
Make tag_8021q a more central element of DSA and move the 2 driver specific operations outside of struct dsa_8021q_context (which is supposed to hold dynamic data and not really constant function pointers). Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
d7b1fd520d
commit
5da11eb407
@@ -21,22 +21,14 @@ struct dsa_8021q_crosschip_link {
|
||||
refcount_t refcount;
|
||||
};
|
||||
|
||||
struct dsa_8021q_ops {
|
||||
int (*vlan_add)(struct dsa_switch *ds, int port, u16 vid, u16 flags);
|
||||
int (*vlan_del)(struct dsa_switch *ds, int port, u16 vid);
|
||||
};
|
||||
|
||||
struct dsa_8021q_context {
|
||||
const struct dsa_8021q_ops *ops;
|
||||
struct dsa_switch *ds;
|
||||
struct list_head crosschip_links;
|
||||
/* EtherType of RX VID, used for filtering on master interface */
|
||||
__be16 proto;
|
||||
};
|
||||
|
||||
int dsa_tag_8021q_register(struct dsa_switch *ds,
|
||||
const struct dsa_8021q_ops *ops,
|
||||
__be16 proto);
|
||||
int dsa_tag_8021q_register(struct dsa_switch *ds, __be16 proto);
|
||||
|
||||
void dsa_tag_8021q_unregister(struct dsa_switch *ds);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user