Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351285
b: refs/heads/master
c: 8b98a70
h: refs/heads/master
i:
  351283: 924d6f5
v: v3
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Jan 4, 2013
1 parent 20bad28 commit 46f0ff0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 69 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 471cb5a33dcbd7c529684a2ac7ba4451414ee4a7
refs/heads/master: 8b98a70c28a607a02b3c3d41bc9a4c141f421052
6 changes: 1 addition & 5 deletions trunk/include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -858,8 +858,7 @@ struct netdev_fcoe_hbainfo {
* flow_id is a flow ID to be passed to rps_may_expire_flow() later.
* Return the filter ID on success, or a negative error code.
*
* Slave management functions (for bridge, bonding, etc). User should
* call netdev_set_master() to set dev->master properly.
* Slave management functions (for bridge, bonding, etc).
* int (*ndo_add_slave)(struct net_device *dev, struct net_device *slave_dev);
* Called to make another netdev an underling.
*
Expand Down Expand Up @@ -2650,9 +2649,6 @@ extern int netdev_master_upper_dev_link(struct net_device *dev,
struct net_device *upper_dev);
extern void netdev_upper_dev_unlink(struct net_device *dev,
struct net_device *upper_dev);
extern int netdev_set_master(struct net_device *dev, struct net_device *master);
extern int netdev_set_bond_master(struct net_device *dev,
struct net_device *master);
extern int skb_checksum_help(struct sk_buff *skb);
extern struct sk_buff *skb_gso_segment(struct sk_buff *skb,
netdev_features_t features);
Expand Down
63 changes: 0 additions & 63 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -4826,69 +4826,6 @@ void netdev_upper_dev_unlink(struct net_device *dev,
}
EXPORT_SYMBOL(netdev_upper_dev_unlink);

/**
* netdev_set_master - set up master pointer
* @slave: slave device
* @master: new master device
*
* Changes the master device of the slave. Pass %NULL to break the
* bonding. The caller must hold the RTNL semaphore. On a failure
* a negative errno code is returned. On success the reference counts
* are adjusted and the function returns zero.
*/
int netdev_set_master(struct net_device *slave, struct net_device *master)
{
struct net_device *old = slave->master;
int err;

ASSERT_RTNL();

if (master) {
if (old)
return -EBUSY;
err = netdev_master_upper_dev_link(slave, master);
if (err)
return err;
}

slave->master = master;

if (old)
netdev_upper_dev_unlink(slave, master);

return 0;
}
EXPORT_SYMBOL(netdev_set_master);

/**
* netdev_set_bond_master - set up bonding master/slave pair
* @slave: slave device
* @master: new master device
*
* Changes the master device of the slave. Pass %NULL to break the
* bonding. The caller must hold the RTNL semaphore. On a failure
* a negative errno code is returned. On success %RTM_NEWLINK is sent
* to the routing socket and the function returns zero.
*/
int netdev_set_bond_master(struct net_device *slave, struct net_device *master)
{
int err;

ASSERT_RTNL();

err = netdev_set_master(slave, master);
if (err)
return err;
if (master)
slave->flags |= IFF_SLAVE;
else
slave->flags &= ~IFF_SLAVE;

rtmsg_ifinfo(RTM_NEWLINK, slave, IFF_SLAVE);
return 0;
}
EXPORT_SYMBOL(netdev_set_bond_master);

static void dev_change_rx_flags(struct net_device *dev, int flags)
{
const struct net_device_ops *ops = dev->netdev_ops;
Expand Down

0 comments on commit 46f0ff0

Please sign in to comment.