提交 b1cc9850 编写于 作者: J Jiri Pirko 提交者: David S. Miller

team: remove usage of netdev_set_master()

Signed-off-by: NJiri Pirko <jiri@resnulli.us>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 898e5061
...@@ -1055,10 +1055,11 @@ static int team_port_add(struct team *team, struct net_device *port_dev) ...@@ -1055,10 +1055,11 @@ static int team_port_add(struct team *team, struct net_device *port_dev)
} }
} }
err = netdev_set_master(port_dev, dev); err = netdev_master_upper_dev_link(port_dev, dev);
if (err) { if (err) {
netdev_err(dev, "Device %s failed to set master\n", portname); netdev_err(dev, "Device %s failed to set upper link\n",
goto err_set_master; portname);
goto err_set_upper_link;
} }
err = netdev_rx_handler_register(port_dev, team_handle_frame, err = netdev_rx_handler_register(port_dev, team_handle_frame,
...@@ -1091,9 +1092,9 @@ static int team_port_add(struct team *team, struct net_device *port_dev) ...@@ -1091,9 +1092,9 @@ static int team_port_add(struct team *team, struct net_device *port_dev)
netdev_rx_handler_unregister(port_dev); netdev_rx_handler_unregister(port_dev);
err_handler_register: err_handler_register:
netdev_set_master(port_dev, NULL); netdev_upper_dev_unlink(port_dev, dev);
err_set_master: err_set_upper_link:
team_port_disable_netpoll(port); team_port_disable_netpoll(port);
err_enable_netpoll: err_enable_netpoll:
...@@ -1137,7 +1138,7 @@ static int team_port_del(struct team *team, struct net_device *port_dev) ...@@ -1137,7 +1138,7 @@ static int team_port_del(struct team *team, struct net_device *port_dev)
team_port_disable(team, port); team_port_disable(team, port);
list_del_rcu(&port->list); list_del_rcu(&port->list);
netdev_rx_handler_unregister(port_dev); netdev_rx_handler_unregister(port_dev);
netdev_set_master(port_dev, NULL); netdev_upper_dev_unlink(port_dev, dev);
team_port_disable_netpoll(port); team_port_disable_netpoll(port);
vlan_vids_del_by_dev(port_dev, dev); vlan_vids_del_by_dev(port_dev, dev);
dev_close(port_dev); dev_close(port_dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册