diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-10-02 01:15:27 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-05 03:43:34 -0400 |
commit | 7ffbe3fdace0bdfcdab8dc6c77506feda0871f79 (patch) | |
tree | 97c0905b309bded1f37f94070315ce16ad65f487 /net | |
parent | 225794f8c33fd32721ae1cd3576db99810351d7b (diff) |
net: introduce NETDEV_POST_INIT notifier
For various purposes including a wireless extensions
bugfix, we need to hook into the netdev creation before
before netdev_register_kobject(). This will also ease
doing the dev type assignment that Marcel was working
on for cfg80211 drivers w/o touching them all.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/dev.c | 6 |
1 files changed, 6 insertions, 0 deletions
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; |