aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2010-02-26 01:34:51 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-27 05:43:39 -0500
commita2835763e130c343ace5320c20d33c281e7097b7 (patch)
tree26077aa8aec7a61fd7e3de31c5eeec4960f78079 /include
parent10de05afe01c12cedc42eb9ce05b111eed6c8210 (diff)
rtnetlink: handle rtnl_link netlink notifications manually
In order to support specifying device flags during device creation, we must be able to roll back device registration in case setting the flags fails without sending any notifications related to the device to userspace. This patch changes rollback_registered_many() and register_netdevice() to manually send netlink notifications for devices not handled by rtnl_link and allows to defer notifications for devices handled by rtnl_link until setup is complete. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 7a2aea56f195..1bfda90c2625 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -924,7 +924,12 @@ struct net_device {
924 NETREG_UNREGISTERED, /* completed unregister todo */ 924 NETREG_UNREGISTERED, /* completed unregister todo */
925 NETREG_RELEASED, /* called free_netdev */ 925 NETREG_RELEASED, /* called free_netdev */
926 NETREG_DUMMY, /* dummy device for NAPI poll */ 926 NETREG_DUMMY, /* dummy device for NAPI poll */
927 } reg_state; 927 } reg_state:16;
928
929 enum {
930 RTNL_LINK_INITIALIZED,
931 RTNL_LINK_INITIALIZING,
932 } rtnl_link_state:16;
928 933
929 /* Called from unregister, can be used to call free_netdev */ 934 /* Called from unregister, can be used to call free_netdev */
930 void (*destructor)(struct net_device *dev); 935 void (*destructor)(struct net_device *dev);