Commit 7ffbe3fd authored by Johannes Berg's avatar Johannes Berg Committed by David S. Miller
Browse files

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: default avatarJohannes Berg <>
Signed-off-by: default avatarMarcel Holtmann <>
Signed-off-by: default avatarDavid S. Miller <>
parent 225794f8
......@@ -201,6 +201,7 @@ static inline int notifier_to_errno(int ret)
#define NETDEV_PRE_UP 0x000D
#define NETDEV_POST_INIT 0x0010
#define SYS_DOWN 0x0001 /* Notify of system down */
......@@ -4836,6 +4836,12 @@ int register_netdevice(struct net_device *dev)
dev->features |= NETIF_F_GSO;
ret = call_netdevice_notifiers(NETDEV_POST_INIT, dev);
ret = notifier_to_errno(ret);
if (ret)
goto err_uninit;
ret = netdev_register_kobject(dev);
if (ret)
goto err_uninit;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment