diff options
| author | Stephen Hemminger <shemminger@osdl.org> | 2003-08-19 06:51:39 -0700 |
|---|---|---|
| committer | Stephen Hemminger <shemminger@osdl.org> | 2003-08-19 06:51:39 -0700 |
| commit | 322de39f2a5f723615ea24d6035fbeaffa5465d4 (patch) | |
| tree | d580cf1957e7029cee29c223cab0a815f2f768a3 /include/linux/netdevice.h | |
| parent | ae41b279b70bd2acf43ac682d3124b76e05063e8 (diff) | |
[NET]: free_netdev - free network device on last class_device_usage
This patch adds the free_netdev function and associated
changes so that net_device structures are not freed until
last reference to the network device class is released.
Diffstat (limited to 'include/linux/netdevice.h')
| -rw-r--r-- | include/linux/netdevice.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 7b39dbf331d3..54769afbd2fb 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -384,6 +384,7 @@ struct net_device NETREG_REGISTERED, /* completed register todo */ NETREG_UNREGISTERING, /* called unregister_netdevice */ NETREG_UNREGISTERED, /* completed unregister todo */ + NETREG_RELEASED, /* called free_netdev */ } reg_state; /* Net device features */ @@ -516,6 +517,7 @@ extern int dev_close(struct net_device *dev); extern int dev_queue_xmit(struct sk_buff *skb); extern int register_netdevice(struct net_device *dev); extern int unregister_netdevice(struct net_device *dev); +extern void free_netdev(struct net_device *dev); extern void synchronize_net(void); extern int register_netdevice_notifier(struct notifier_block *nb); extern int unregister_netdevice_notifier(struct notifier_block *nb); |
