diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-10-27 03:03:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-28 05:22:06 -0400 |
commit | 44a0873d52282f24b1894c58c0f157e0f626ddc9 (patch) | |
tree | 2d913650b6c9474f135546cf06fe5e8d174ef478 /include/linux/netdevice.h | |
parent | 83ab50a56e6ea94627fea83ce7b03332bd4c2f02 (diff) |
net: Introduce unregister_netdevice_queue()
This patchs adds an unreg_list anchor to struct net_device, and
introduces an unregister_netdevice_queue() function, able to queue
a net_device to a list instead of immediately unregister it.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 83800091a31a..0ded0a4768a0 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -683,6 +683,7 @@ struct net_device | |||
683 | 683 | ||
684 | struct list_head dev_list; | 684 | struct list_head dev_list; |
685 | struct list_head napi_list; | 685 | struct list_head napi_list; |
686 | struct list_head unreg_list; | ||
686 | 687 | ||
687 | /* Net device features */ | 688 | /* Net device features */ |
688 | unsigned long features; | 689 | unsigned long features; |
@@ -1116,7 +1117,13 @@ extern int dev_close(struct net_device *dev); | |||
1116 | extern void dev_disable_lro(struct net_device *dev); | 1117 | extern void dev_disable_lro(struct net_device *dev); |
1117 | extern int dev_queue_xmit(struct sk_buff *skb); | 1118 | extern int dev_queue_xmit(struct sk_buff *skb); |
1118 | extern int register_netdevice(struct net_device *dev); | 1119 | extern int register_netdevice(struct net_device *dev); |
1119 | extern void unregister_netdevice(struct net_device *dev); | 1120 | extern void unregister_netdevice_queue(struct net_device *dev, |
1121 | struct list_head *head); | ||
1122 | static inline void unregister_netdevice(struct net_device *dev) | ||
1123 | { | ||
1124 | unregister_netdevice_queue(dev, NULL); | ||
1125 | } | ||
1126 | |||
1120 | extern void free_netdev(struct net_device *dev); | 1127 | extern void free_netdev(struct net_device *dev); |
1121 | extern void synchronize_net(void); | 1128 | extern void synchronize_net(void); |
1122 | extern int register_netdevice_notifier(struct notifier_block *nb); | 1129 | extern int register_netdevice_notifier(struct notifier_block *nb); |