aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-09-30 05:23:58 -0400
committerDavid S. Miller <davem@davemloft.net>2008-09-30 05:23:58 -0400
commitf0db275a81ef184293ca7ef3646fe065b336efb7 (patch)
treeda2fa1f713de02881faa1705524466409470a04c
parentcf04a4c764cd3e651a64b3e667bb6a673ead99e1 (diff)
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>
-rw-r--r--net/core/dev.c46
1 files changed, 44 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 64f0d5b7cdfc..2cc258b7acce 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -956,6 +956,7 @@ rollback:
956 * dev_set_alias - change ifalias of a device 956 * dev_set_alias - change ifalias of a device
957 * @dev: device 957 * @dev: device
958 * @alias: name up to IFALIASZ 958 * @alias: name up to IFALIASZ
959 * @len: limit of bytes to copy from info
959 * 960 *
960 * Set ifalias for a device, 961 * Set ifalias for a device,
961 */ 962 */
@@ -3330,6 +3331,12 @@ static void dev_addr_discard(struct net_device *dev)
3330 netif_addr_unlock_bh(dev); 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 */
3333unsigned dev_get_flags(const struct net_device *dev) 3340unsigned dev_get_flags(const struct net_device *dev)
3334{ 3341{
3335 unsigned flags; 3342 unsigned flags;
@@ -3354,6 +3361,14 @@ unsigned dev_get_flags(const struct net_device *dev)
3354 return flags; 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 */
3357int dev_change_flags(struct net_device *dev, unsigned flags) 3372int dev_change_flags(struct net_device *dev, unsigned flags)
3358{ 3373{
3359 int ret, changes; 3374 int ret, changes;
@@ -3423,6 +3438,13 @@ int dev_change_flags(struct net_device *dev, unsigned flags)
3423 return ret; 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 */
3426int dev_set_mtu(struct net_device *dev, int new_mtu) 3448int dev_set_mtu(struct net_device *dev, int new_mtu)
3427{ 3449{
3428 int err; 3450 int err;
@@ -3447,6 +3469,13 @@ int dev_set_mtu(struct net_device *dev, int new_mtu)
3447 return err; 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 */
3450int dev_set_mac_address(struct net_device *dev, struct sockaddr *sa) 3479int dev_set_mac_address(struct net_device *dev, struct sockaddr *sa)
3451{ 3480{
3452 int err; 3481 int err;
@@ -4350,7 +4379,12 @@ void free_netdev(struct net_device *dev)
4350 put_device(&dev->dev); 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 */
4354void synchronize_net(void) 4388void synchronize_net(void)
4355{ 4389{
4356 might_sleep(); 4390 might_sleep();
@@ -4652,7 +4686,7 @@ netdev_dma_event(struct dma_client *client, struct dma_chan *chan,
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 */
4657static int __init netdev_dma_register(void) 4691static int __init netdev_dma_register(void)
4658{ 4692{
@@ -4753,6 +4787,14 @@ err_name:
4753 return -ENOMEM; 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 */
4756char *netdev_drivername(const struct net_device *dev, char *buffer, int len) 4798char *netdev_drivername(const struct net_device *dev, char *buffer, int len)
4757{ 4799{
4758 const struct device_driver *driver; 4800 const struct device_driver *driver;