net: dsa: tag_8021q: setup tagging via a single function call
There is no point in calling dsa_port_setup_8021q_tagging for each individual port. Additionally, it will become more difficult to do that when we'll have a context structure to tag_8021q (next patch). So refactor this now. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
568a36a69b
commit
7e092af2f3
@@ -25,8 +25,7 @@ struct dsa_8021q_crosschip_link {
|
||||
|
||||
#if IS_ENABLED(CONFIG_NET_DSA_TAG_8021Q)
|
||||
|
||||
int dsa_port_setup_8021q_tagging(struct dsa_switch *ds, int index,
|
||||
bool enabled);
|
||||
int dsa_8021q_setup(struct dsa_switch *ds, bool enabled);
|
||||
|
||||
int dsa_8021q_crosschip_bridge_join(struct dsa_switch *ds, int port,
|
||||
struct dsa_switch *other_ds,
|
||||
@@ -57,8 +56,7 @@ bool vid_is_dsa_8021q(u16 vid);
|
||||
|
||||
#else
|
||||
|
||||
int dsa_port_setup_8021q_tagging(struct dsa_switch *ds, int index,
|
||||
bool enabled)
|
||||
int dsa_8021q_setup(struct dsa_switch *ds, bool enabled)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user