diff options
Diffstat (limited to 'Documentation/networking/netdevices.txt')
| -rw-r--r-- | Documentation/networking/netdevices.txt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Documentation/networking/netdevices.txt b/Documentation/networking/netdevices.txt index c7ecc7080494..0b1cf6b2a592 100644 --- a/Documentation/networking/netdevices.txt +++ b/Documentation/networking/netdevices.txt | |||
| @@ -10,12 +10,12 @@ network devices. | |||
| 10 | struct net_device allocation rules | 10 | struct net_device allocation rules |
| 11 | ================================== | 11 | ================================== |
| 12 | Network device structures need to persist even after module is unloaded and | 12 | Network device structures need to persist even after module is unloaded and |
| 13 | must be allocated with kmalloc. If device has registered successfully, | 13 | must be allocated with alloc_netdev_mqs() and friends. |
| 14 | it will be freed on last use by free_netdev. This is required to handle the | 14 | If device has registered successfully, it will be freed on last use |
| 15 | pathologic case cleanly (example: rmmod mydriver </sys/class/net/myeth/mtu ) | 15 | by free_netdev(). This is required to handle the pathologic case cleanly |
| 16 | (example: rmmod mydriver </sys/class/net/myeth/mtu ) | ||
| 16 | 17 | ||
| 17 | There are routines in net_init.c to handle the common cases of | 18 | alloc_netdev_mqs()/alloc_netdev() reserve extra space for driver |
| 18 | alloc_etherdev, alloc_netdev. These reserve extra space for driver | ||
| 19 | private data which gets freed when the network device is freed. If | 19 | private data which gets freed when the network device is freed. If |
| 20 | separately allocated data is attached to the network device | 20 | separately allocated data is attached to the network device |
| 21 | (netdev_priv(dev)) then it is up to the module exit handler to free that. | 21 | (netdev_priv(dev)) then it is up to the module exit handler to free that. |
