aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/team/team.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2011-12-07 23:11:20 -0500
committerDavid S. Miller <davem@davemloft.net>2011-12-08 19:52:43 -0500
commit57459185a19b0246866479522b77cbb9732201d1 (patch)
tree75a0d4ea2b0024428f5f519ab16a5b537d482e62 /drivers/net/team/team.c
parent348a1443cc4303c72cf1ee3b26e476fec8e7b5fa (diff)
team: use vlan_vids_[addr/del]_by_dev
So far when vlan id was added to team device befor port was added, this vid was not added to port's vlan filter. Also after removal, vid stayed in port device's vlan filter. Benefit of new vlan functions to handle this work. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/team/team.c')
-rw-r--r--drivers/net/team/team.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 79c2d1b52eb6..ed2a862b835d 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -588,6 +588,13 @@ static int team_port_add(struct team *team, struct net_device *port_dev)
588 goto err_dev_open; 588 goto err_dev_open;
589 } 589 }
590 590
591 err = vlan_vids_add_by_dev(port_dev, dev);
592 if (err) {
593 netdev_err(dev, "Failed to add vlan ids to device %s\n",
594 portname);
595 goto err_vids_add;
596 }
597
591 err = netdev_set_master(port_dev, dev); 598 err = netdev_set_master(port_dev, dev);
592 if (err) { 599 if (err) {
593 netdev_err(dev, "Device %s failed to set master\n", portname); 600 netdev_err(dev, "Device %s failed to set master\n", portname);
@@ -615,6 +622,9 @@ err_handler_register:
615 netdev_set_master(port_dev, NULL); 622 netdev_set_master(port_dev, NULL);
616 623
617err_set_master: 624err_set_master:
625 vlan_vids_del_by_dev(port_dev, dev);
626
627err_vids_add:
618 dev_close(port_dev); 628 dev_close(port_dev);
619 629
620err_dev_open: 630err_dev_open:
@@ -648,6 +658,7 @@ static int team_port_del(struct team *team, struct net_device *port_dev)
648 team_adjust_ops(team); 658 team_adjust_ops(team);
649 netdev_rx_handler_unregister(port_dev); 659 netdev_rx_handler_unregister(port_dev);
650 netdev_set_master(port_dev, NULL); 660 netdev_set_master(port_dev, NULL);
661 vlan_vids_del_by_dev(port_dev, dev);
651 dev_close(port_dev); 662 dev_close(port_dev);
652 team_port_leave(team, port); 663 team_port_leave(team, port);
653 team_port_set_orig_mac(port); 664 team_port_set_orig_mac(port);