Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150665
b: refs/heads/master
c: 3b8bcfd
h: refs/heads/master
i:
  150663: f371af8
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jun 3, 2009
1 parent 91eeaa0 commit 8bd1cf3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 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: bdf6d32f933bf28dfdca325281ee5266c753dc67
refs/heads/master: 3b8bcfd5d31ea0fec58681d035544ace707d2536
1 change: 1 addition & 0 deletions trunk/include/linux/notifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ static inline int notifier_to_errno(int ret)
#define NETDEV_CHANGENAME 0x000A
#define NETDEV_FEAT_CHANGE 0x000B
#define NETDEV_BONDING_FAILOVER 0x000C
#define NETDEV_PRE_UP 0x000D

#define SYS_DOWN 0x0001 /* Notify of system down */
#define SYS_RESTART SYS_DOWN
Expand Down
7 changes: 6 additions & 1 deletion trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@ void dev_load(struct net *net, const char *name)
int dev_open(struct net_device *dev)
{
const struct net_device_ops *ops = dev->netdev_ops;
int ret = 0;
int ret;

ASSERT_RTNL();

Expand All @@ -1065,6 +1065,11 @@ int dev_open(struct net_device *dev)
if (!netif_device_present(dev))
return -ENODEV;

ret = call_netdevice_notifiers(NETDEV_PRE_UP, dev);
ret = notifier_to_errno(ret);
if (ret)
return ret;

/*
* Call device private open method
*/
Expand Down

0 comments on commit 8bd1cf3

Please sign in to comment.