Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 66604
b: refs/heads/master
c: 056925a
h: refs/heads/master
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Oct 10, 2007
1 parent 21440b6 commit d65b7d4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 20 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: 30d97d35851f40fd1c108d1b8904aca3c38d0126
refs/heads/master: 056925ab3145713e5e83cf8e05ae6fb2f4ace41e
32 changes: 13 additions & 19 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ int dev_change_name(struct net_device *dev, char *newname)
hlist_add_head(&dev->name_hlist, dev_name_hash(net, dev->name));
write_unlock_bh(&dev_base_lock);

ret = raw_notifier_call_chain(&netdev_chain, NETDEV_CHANGENAME, dev);
ret = call_netdevice_notifiers(NETDEV_CHANGENAME, dev);
ret = notifier_to_errno(ret);

if (ret) {
Expand All @@ -932,7 +932,7 @@ int dev_change_name(struct net_device *dev, char *newname)
*/
void netdev_features_change(struct net_device *dev)
{
raw_notifier_call_chain(&netdev_chain, NETDEV_FEAT_CHANGE, dev);
call_netdevice_notifiers(NETDEV_FEAT_CHANGE, dev);
}
EXPORT_SYMBOL(netdev_features_change);

Expand All @@ -947,8 +947,7 @@ EXPORT_SYMBOL(netdev_features_change);
void netdev_state_change(struct net_device *dev)
{
if (dev->flags & IFF_UP) {
raw_notifier_call_chain(&netdev_chain,
NETDEV_CHANGE, dev);
call_netdevice_notifiers(NETDEV_CHANGE, dev);
rtmsg_ifinfo(RTM_NEWLINK, dev, 0);
}
}
Expand Down Expand Up @@ -1044,7 +1043,7 @@ int dev_open(struct net_device *dev)
/*
* ... and announce new interface.
*/
raw_notifier_call_chain(&netdev_chain, NETDEV_UP, dev);
call_netdevice_notifiers(NETDEV_UP, dev);
}
return ret;
}
Expand All @@ -1069,7 +1068,7 @@ int dev_close(struct net_device *dev)
* Tell people we are going down, so that they can
* prepare to death, when device is still operating.
*/
raw_notifier_call_chain(&netdev_chain, NETDEV_GOING_DOWN, dev);
call_netdevice_notifiers(NETDEV_GOING_DOWN, dev);

dev_deactivate(dev);

Expand Down Expand Up @@ -1102,7 +1101,7 @@ int dev_close(struct net_device *dev)
/*
* Tell people we are down
*/
raw_notifier_call_chain(&netdev_chain, NETDEV_DOWN, dev);
call_netdevice_notifiers(NETDEV_DOWN, dev);

return 0;
}
Expand Down Expand Up @@ -3031,8 +3030,7 @@ int dev_change_flags(struct net_device *dev, unsigned flags)
if (dev->flags & IFF_UP &&
((old_flags ^ dev->flags) &~ (IFF_UP | IFF_PROMISC | IFF_ALLMULTI |
IFF_VOLATILE)))
raw_notifier_call_chain(&netdev_chain,
NETDEV_CHANGE, dev);
call_netdevice_notifiers(NETDEV_CHANGE, dev);

if ((flags ^ dev->gflags) & IFF_PROMISC) {
int inc = (flags & IFF_PROMISC) ? +1 : -1;
Expand Down Expand Up @@ -3078,8 +3076,7 @@ int dev_set_mtu(struct net_device *dev, int new_mtu)
else
dev->mtu = new_mtu;
if (!err && dev->flags & IFF_UP)
raw_notifier_call_chain(&netdev_chain,
NETDEV_CHANGEMTU, dev);
call_netdevice_notifiers(NETDEV_CHANGEMTU, dev);
return err;
}

Expand All @@ -3095,8 +3092,7 @@ int dev_set_mac_address(struct net_device *dev, struct sockaddr *sa)
return -ENODEV;
err = dev->set_mac_address(dev, sa);
if (!err)
raw_notifier_call_chain(&netdev_chain,
NETDEV_CHANGEADDR, dev);
call_netdevice_notifiers(NETDEV_CHANGEADDR, dev);
return err;
}

Expand Down Expand Up @@ -3152,8 +3148,7 @@ static int dev_ifsioc(struct net *net, struct ifreq *ifr, unsigned int cmd)
return -EINVAL;
memcpy(dev->broadcast, ifr->ifr_hwaddr.sa_data,
min(sizeof ifr->ifr_hwaddr.sa_data, (size_t) dev->addr_len));
raw_notifier_call_chain(&netdev_chain,
NETDEV_CHANGEADDR, dev);
call_netdevice_notifiers(NETDEV_CHANGEADDR, dev);
return 0;

case SIOCGIFMAP:
Expand Down Expand Up @@ -3597,7 +3592,7 @@ int register_netdevice(struct net_device *dev)
list_netdevice(dev);

/* Notify protocols, that a new device appeared. */
ret = raw_notifier_call_chain(&netdev_chain, NETDEV_REGISTER, dev);
ret = call_netdevice_notifiers(NETDEV_REGISTER, dev);
ret = notifier_to_errno(ret);
if (ret)
unregister_netdevice(dev);
Expand Down Expand Up @@ -3668,8 +3663,7 @@ static void netdev_wait_allrefs(struct net_device *dev)
rtnl_lock();

/* Rebroadcast unregister notification */
raw_notifier_call_chain(&netdev_chain,
NETDEV_UNREGISTER, dev);
call_netdevice_notifiers(NETDEV_UNREGISTER, dev);

if (test_bit(__LINK_STATE_LINKWATCH_PENDING,
&dev->state)) {
Expand Down Expand Up @@ -3914,7 +3908,7 @@ void unregister_netdevice(struct net_device *dev)
/* Notify protocols, that we are about to destroy
this device. They should clean all the things.
*/
raw_notifier_call_chain(&netdev_chain, NETDEV_UNREGISTER, dev);
call_netdevice_notifiers(NETDEV_UNREGISTER, dev);

/*
* Flush the unicast and multicast chains
Expand Down

0 comments on commit d65b7d4

Please sign in to comment.