Skip to content

Commit

Permalink
netdev: docbook comment update (revised)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Sep 30, 2008
1 parent cf04a4c commit f0db275
Showing 1 changed file with 44 additions and 2 deletions.
46 changes: 44 additions & 2 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,7 @@ int dev_change_name(struct net_device *dev, const char *newname)
* dev_set_alias - change ifalias of a device
* @dev: device
* @alias: name up to IFALIASZ
* @len: limit of bytes to copy from info
*
* Set ifalias for a device,
*/
Expand Down Expand Up @@ -3330,6 +3331,12 @@ static void dev_addr_discard(struct net_device *dev)
netif_addr_unlock_bh(dev);
}

/**
* dev_get_flags - get flags reported to userspace
* @dev: device
*
* Get the combination of flag bits exported through APIs to userspace.
*/
unsigned dev_get_flags(const struct net_device *dev)
{
unsigned flags;
Expand All @@ -3354,6 +3361,14 @@ unsigned dev_get_flags(const struct net_device *dev)
return flags;
}

/**
* dev_change_flags - change device settings
* @dev: device
* @flags: device state flags
*
* Change settings on device based state flags. The flags are
* in the userspace exported format.
*/
int dev_change_flags(struct net_device *dev, unsigned flags)
{
int ret, changes;
Expand Down Expand Up @@ -3423,6 +3438,13 @@ int dev_change_flags(struct net_device *dev, unsigned flags)
return ret;
}

/**
* dev_set_mtu - Change maximum transfer unit
* @dev: device
* @new_mtu: new transfer unit
*
* Change the maximum transfer size of the network device.
*/
int dev_set_mtu(struct net_device *dev, int new_mtu)
{
int err;
Expand All @@ -3447,6 +3469,13 @@ int dev_set_mtu(struct net_device *dev, int new_mtu)
return err;
}

/**
* dev_set_mac_address - Change Media Access Control Address
* @dev: device
* @sa: new address
*
* Change the hardware (MAC) address of the device
*/
int dev_set_mac_address(struct net_device *dev, struct sockaddr *sa)
{
int err;
Expand Down Expand Up @@ -4350,7 +4379,12 @@ void free_netdev(struct net_device *dev)
put_device(&dev->dev);
}

/* Synchronize with packet receive processing. */
/**
* synchronize_net - Synchronize with packet receive processing
*
* Wait for packets currently being received to be done.
* Does not block later packets from starting.
*/
void synchronize_net(void)
{
might_sleep();
Expand Down Expand Up @@ -4652,7 +4686,7 @@ netdev_dma_event(struct dma_client *client, struct dma_chan *chan,
}

/**
* netdev_dma_regiser - register the networking subsystem as a DMA client
* netdev_dma_register - register the networking subsystem as a DMA client
*/
static int __init netdev_dma_register(void)
{
Expand Down Expand Up @@ -4753,6 +4787,14 @@ static int __net_init netdev_init(struct net *net)
return -ENOMEM;
}

/**
* netdev_drivername - network driver for the device
* @dev: network device
* @buffer: buffer for resulting name
* @len: size of buffer
*
* Determine network driver for device.
*/
char *netdev_drivername(const struct net_device *dev, char *buffer, int len)
{
const struct device_driver *driver;
Expand Down

0 comments on commit f0db275

Please sign in to comment.