Commit f0db275a81ef184293ca7ef3646fe065b336efb7
Committed by
David S. Miller
1 parent
cf04a4c764
Exists in
master
and in
7 other branches
netdev: docbook comment update (revised)
Add more docbook comments to network device functions and cleanup the comments. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 1 changed file with 44 additions and 2 deletions Side-by-side Diff
net/core/dev.c
... | ... | @@ -956,6 +956,7 @@ |
956 | 956 | * dev_set_alias - change ifalias of a device |
957 | 957 | * @dev: device |
958 | 958 | * @alias: name up to IFALIASZ |
959 | + * @len: limit of bytes to copy from info | |
959 | 960 | * |
960 | 961 | * Set ifalias for a device, |
961 | 962 | */ |
... | ... | @@ -3330,6 +3331,12 @@ |
3330 | 3331 | netif_addr_unlock_bh(dev); |
3331 | 3332 | } |
3332 | 3333 | |
3334 | +/** | |
3335 | + * dev_get_flags - get flags reported to userspace | |
3336 | + * @dev: device | |
3337 | + * | |
3338 | + * Get the combination of flag bits exported through APIs to userspace. | |
3339 | + */ | |
3333 | 3340 | unsigned dev_get_flags(const struct net_device *dev) |
3334 | 3341 | { |
3335 | 3342 | unsigned flags; |
... | ... | @@ -3354,6 +3361,14 @@ |
3354 | 3361 | return flags; |
3355 | 3362 | } |
3356 | 3363 | |
3364 | +/** | |
3365 | + * dev_change_flags - change device settings | |
3366 | + * @dev: device | |
3367 | + * @flags: device state flags | |
3368 | + * | |
3369 | + * Change settings on device based state flags. The flags are | |
3370 | + * in the userspace exported format. | |
3371 | + */ | |
3357 | 3372 | int dev_change_flags(struct net_device *dev, unsigned flags) |
3358 | 3373 | { |
3359 | 3374 | int ret, changes; |
... | ... | @@ -3423,6 +3438,13 @@ |
3423 | 3438 | return ret; |
3424 | 3439 | } |
3425 | 3440 | |
3441 | +/** | |
3442 | + * dev_set_mtu - Change maximum transfer unit | |
3443 | + * @dev: device | |
3444 | + * @new_mtu: new transfer unit | |
3445 | + * | |
3446 | + * Change the maximum transfer size of the network device. | |
3447 | + */ | |
3426 | 3448 | int dev_set_mtu(struct net_device *dev, int new_mtu) |
3427 | 3449 | { |
3428 | 3450 | int err; |
... | ... | @@ -3447,6 +3469,13 @@ |
3447 | 3469 | return err; |
3448 | 3470 | } |
3449 | 3471 | |
3472 | +/** | |
3473 | + * dev_set_mac_address - Change Media Access Control Address | |
3474 | + * @dev: device | |
3475 | + * @sa: new address | |
3476 | + * | |
3477 | + * Change the hardware (MAC) address of the device | |
3478 | + */ | |
3450 | 3479 | int dev_set_mac_address(struct net_device *dev, struct sockaddr *sa) |
3451 | 3480 | { |
3452 | 3481 | int err; |
... | ... | @@ -4350,7 +4379,12 @@ |
4350 | 4379 | put_device(&dev->dev); |
4351 | 4380 | } |
4352 | 4381 | |
4353 | -/* Synchronize with packet receive processing. */ | |
4382 | +/** | |
4383 | + * synchronize_net - Synchronize with packet receive processing | |
4384 | + * | |
4385 | + * Wait for packets currently being received to be done. | |
4386 | + * Does not block later packets from starting. | |
4387 | + */ | |
4354 | 4388 | void synchronize_net(void) |
4355 | 4389 | { |
4356 | 4390 | might_sleep(); |
... | ... | @@ -4652,7 +4686,7 @@ |
4652 | 4686 | } |
4653 | 4687 | |
4654 | 4688 | /** |
4655 | - * netdev_dma_regiser - register the networking subsystem as a DMA client | |
4689 | + * netdev_dma_register - register the networking subsystem as a DMA client | |
4656 | 4690 | */ |
4657 | 4691 | static int __init netdev_dma_register(void) |
4658 | 4692 | { |
... | ... | @@ -4753,6 +4787,14 @@ |
4753 | 4787 | return -ENOMEM; |
4754 | 4788 | } |
4755 | 4789 | |
4790 | +/** | |
4791 | + * netdev_drivername - network driver for the device | |
4792 | + * @dev: network device | |
4793 | + * @buffer: buffer for resulting name | |
4794 | + * @len: size of buffer | |
4795 | + * | |
4796 | + * Determine network driver for device. | |
4797 | + */ | |
4756 | 4798 | char *netdev_drivername(const struct net_device *dev, char *buffer, int len) |
4757 | 4799 | { |
4758 | 4800 | const struct device_driver *driver; |