diff options
-rw-r--r-- | include/linux/notifier.h | 1 | ||||
-rw-r--r-- | net/core/dev.c | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/notifier.h b/include/linux/notifier.h index 44428d247dbe..29714b8441b1 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h | |||
@@ -201,6 +201,7 @@ static inline int notifier_to_errno(int ret) | |||
201 | #define NETDEV_PRE_UP 0x000D | 201 | #define NETDEV_PRE_UP 0x000D |
202 | #define NETDEV_BONDING_OLDTYPE 0x000E | 202 | #define NETDEV_BONDING_OLDTYPE 0x000E |
203 | #define NETDEV_BONDING_NEWTYPE 0x000F | 203 | #define NETDEV_BONDING_NEWTYPE 0x000F |
204 | #define NETDEV_POST_INIT 0x0010 | ||
204 | 205 | ||
205 | #define SYS_DOWN 0x0001 /* Notify of system down */ | 206 | #define SYS_DOWN 0x0001 /* Notify of system down */ |
206 | #define SYS_RESTART SYS_DOWN | 207 | #define SYS_RESTART SYS_DOWN |
diff --git a/net/core/dev.c b/net/core/dev.c index b8f74cfb1bfd..a74c8fd69556 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -4836,6 +4836,12 @@ int register_netdevice(struct net_device *dev) | |||
4836 | dev->features |= NETIF_F_GSO; | 4836 | dev->features |= NETIF_F_GSO; |
4837 | 4837 | ||
4838 | netdev_initialize_kobject(dev); | 4838 | netdev_initialize_kobject(dev); |
4839 | |||
4840 | ret = call_netdevice_notifiers(NETDEV_POST_INIT, dev); | ||
4841 | ret = notifier_to_errno(ret); | ||
4842 | if (ret) | ||
4843 | goto err_uninit; | ||
4844 | |||
4839 | ret = netdev_register_kobject(dev); | 4845 | ret = netdev_register_kobject(dev); |
4840 | if (ret) | 4846 | if (ret) |
4841 | goto err_uninit; | 4847 | goto err_uninit; |