net: dsa: move VLAN filtering setter
Move the DSA port code which sets VLAN filtering on a port in port.c, where it belongs. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.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
cfbed329be
commit
4d61d3043b
@@ -111,3 +111,19 @@ void dsa_port_bridge_leave(struct dsa_port *dp, struct net_device *br)
|
||||
*/
|
||||
dsa_port_set_state_now(dp, BR_STATE_FORWARDING);
|
||||
}
|
||||
|
||||
int dsa_port_vlan_filtering(struct dsa_port *dp, bool vlan_filtering,
|
||||
struct switchdev_trans *trans)
|
||||
{
|
||||
struct dsa_switch *ds = dp->ds;
|
||||
|
||||
/* bridge skips -EOPNOTSUPP, so skip the prepare phase */
|
||||
if (switchdev_trans_ph_prepare(trans))
|
||||
return 0;
|
||||
|
||||
if (ds->ops->port_vlan_filtering)
|
||||
return ds->ops->port_vlan_filtering(ds, dp->index,
|
||||
vlan_filtering);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user