aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/bonding/bond_main.c20
-rw-r--r--include/linux/netdevice.h2
-rw-r--r--net/core/dev.c6
3 files changed, 10 insertions, 18 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 6fae5f3ec7f6..d95fbc34b229 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1120,10 +1120,10 @@ void bond_change_active_slave(struct bonding *bond, struct slave *new_active)
1120 write_unlock_bh(&bond->curr_slave_lock); 1120 write_unlock_bh(&bond->curr_slave_lock);
1121 read_unlock(&bond->lock); 1121 read_unlock(&bond->lock);
1122 1122
1123 netdev_bonding_change(bond->dev, NETDEV_BONDING_FAILOVER); 1123 call_netdevice_notifiers(NETDEV_BONDING_FAILOVER, bond->dev);
1124 if (should_notify_peers) 1124 if (should_notify_peers)
1125 netdev_bonding_change(bond->dev, 1125 call_netdevice_notifiers(NETDEV_NOTIFY_PEERS,
1126 NETDEV_NOTIFY_PEERS); 1126 bond->dev);
1127 1127
1128 read_lock(&bond->lock); 1128 read_lock(&bond->lock);
1129 write_lock_bh(&bond->curr_slave_lock); 1129 write_lock_bh(&bond->curr_slave_lock);
@@ -1560,8 +1560,8 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
1560 bond_dev->name, 1560 bond_dev->name,
1561 bond_dev->type, slave_dev->type); 1561 bond_dev->type, slave_dev->type);
1562 1562
1563 res = netdev_bonding_change(bond_dev, 1563 res = call_netdevice_notifiers(NETDEV_PRE_TYPE_CHANGE,
1564 NETDEV_PRE_TYPE_CHANGE); 1564 bond_dev);
1565 res = notifier_to_errno(res); 1565 res = notifier_to_errno(res);
1566 if (res) { 1566 if (res) {
1567 pr_err("%s: refused to change device type\n", 1567 pr_err("%s: refused to change device type\n",
@@ -1581,8 +1581,8 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
1581 bond_dev->priv_flags &= ~IFF_TX_SKB_SHARING; 1581 bond_dev->priv_flags &= ~IFF_TX_SKB_SHARING;
1582 } 1582 }
1583 1583
1584 netdev_bonding_change(bond_dev, 1584 call_netdevice_notifiers(NETDEV_POST_TYPE_CHANGE,
1585 NETDEV_POST_TYPE_CHANGE); 1585 bond_dev);
1586 } 1586 }
1587 } else if (bond_dev->type != slave_dev->type) { 1587 } else if (bond_dev->type != slave_dev->type) {
1588 pr_err("%s ether type (%d) is different from other slaves (%d), can not enslave it.\n", 1588 pr_err("%s ether type (%d) is different from other slaves (%d), can not enslave it.\n",
@@ -1943,7 +1943,7 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev)
1943 } 1943 }
1944 1944
1945 block_netpoll_tx(); 1945 block_netpoll_tx();
1946 netdev_bonding_change(bond_dev, NETDEV_RELEASE); 1946 call_netdevice_notifiers(NETDEV_RELEASE, bond_dev);
1947 write_lock_bh(&bond->lock); 1947 write_lock_bh(&bond->lock);
1948 1948
1949 slave = bond_get_slave_by_dev(bond, slave_dev); 1949 slave = bond_get_slave_by_dev(bond, slave_dev);
@@ -2586,7 +2586,7 @@ re_arm:
2586 read_unlock(&bond->lock); 2586 read_unlock(&bond->lock);
2587 return; 2587 return;
2588 } 2588 }
2589 netdev_bonding_change(bond->dev, NETDEV_NOTIFY_PEERS); 2589 call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, bond->dev);
2590 rtnl_unlock(); 2590 rtnl_unlock();
2591 } 2591 }
2592} 2592}
@@ -3205,7 +3205,7 @@ re_arm:
3205 read_unlock(&bond->lock); 3205 read_unlock(&bond->lock);
3206 return; 3206 return;
3207 } 3207 }
3208 netdev_bonding_change(bond->dev, NETDEV_NOTIFY_PEERS); 3208 call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, bond->dev);
3209 rtnl_unlock(); 3209 rtnl_unlock();
3210 } 3210 }
3211} 3211}
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 8d4b7316c734..1d6ab69c1f3f 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2595,8 +2595,6 @@ extern int dev_set_promiscuity(struct net_device *dev, int inc);
2595extern int dev_set_allmulti(struct net_device *dev, int inc); 2595extern int dev_set_allmulti(struct net_device *dev, int inc);
2596extern void netdev_state_change(struct net_device *dev); 2596extern void netdev_state_change(struct net_device *dev);
2597extern void netdev_notify_peers(struct net_device *dev); 2597extern void netdev_notify_peers(struct net_device *dev);
2598extern int netdev_bonding_change(struct net_device *dev,
2599 unsigned long event);
2600extern void netdev_features_change(struct net_device *dev); 2598extern void netdev_features_change(struct net_device *dev);
2601/* Load a device via the kmod */ 2599/* Load a device via the kmod */
2602extern void dev_load(struct net *net, const char *name); 2600extern void dev_load(struct net *net, const char *name);
diff --git a/net/core/dev.c b/net/core/dev.c
index 5defcf940005..ce1bccb08de5 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1124,12 +1124,6 @@ void netdev_notify_peers(struct net_device *dev)
1124} 1124}
1125EXPORT_SYMBOL(netdev_notify_peers); 1125EXPORT_SYMBOL(netdev_notify_peers);
1126 1126
1127int netdev_bonding_change(struct net_device *dev, unsigned long event)
1128{
1129 return call_netdevice_notifiers(event, dev);
1130}
1131EXPORT_SYMBOL(netdev_bonding_change);
1132
1133/** 1127/**
1134 * dev_load - load a network module 1128 * dev_load - load a network module
1135 * @net: the applicable net namespace 1129 * @net: the applicable net namespace