netdev: docbook comment update
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): 20080923083750.59eaac97@extreme
A message that is not in the archive (sent off-list or not yet received): 20080923091035.102d4106@extreme
Quoted 2 lines · Stephen Hemminger
Add more docbook comments to network device functions and cleanup the comments.
Thanks!
Quoted 6 lines
Signed-off-by Stephen Hemminger <[email protected]>
net/core/dev.c static void dev_addr_discard(struct net_ · line 3330
Quoted 8 lines
net/core/dev.c +5
-0@@ -3322,6 +3323,12 @@ static void dev_addr_discard(struct net_netif_addr_unlock_bh (dev); } +/** +* dev_get_flags - get flags reported to userspace +* @dev: device +* +* Get the combination of flag bits exported throug API's to userspace.
through
and preferably APIs
net/core/dev.c int dev_set_mtu(struct net_device *dev, · line 3465
Quoted 10 lines
net/core/dev.c +3
-0+*/ unsigned dev_get_flags (const struct net_device *dev) {unsigned flags;@@ -3439,6 +3461,13 @@ int dev_set_mtu(struct net_device *dev,return err; } +/** +* dev_set_mtu - Change Media Access Control Address
Wrong func name.
net/core/dev.c int dev_set_mtu(struct net_device *dev, · line 3473
Quoted 8 lines
net/core/dev.c +5
-0+* @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;
cya,
Signature · 1 line
~Randy
PATCH 2/2 netdev: docbook comment update (revised)
Add more docbook comments to network device functions and cleanup the comments.
net/core/dev.c +44 -2
@@ -956,6 +956,7 @@ rollback:* 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, */
@@ -3322,6 +3323,12 @@ static void dev_addr_discard(struct net_netif_addr_unlock_bh (dev); } +/** +* dev_get_flags - get flags reported to userspace +* @dev: device +* +* Get the combination of flag bits exported throug APIs to userspace. +*/ unsigned dev_get_flags (const struct net_device *dev) {unsigned flags;
@@ -3346,6 +3353,14 @@ unsigned dev_get_flags(const struct net_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;
@@ -3415,6 +3430,13 @@ int dev_change_flags(struct net_device *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;
@@ -3439,6 +3461,13 @@ int dev_set_mtu(struct net_device *dev,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;
@@ -4342,7 +4371,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 ();
@@ -4644,7 +4678,7 @@ netdev_dma_event(struct dma_client *clie }/** -* 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 ) {
@@ -4745,6 +4779,14 @@ err_name: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;
Re: [PATCH 2/2] netdev: docbook comment update (revised)
Quoted 7 lines · Stephen Hemminger
Add more docbook comments to network device functions and cleanup the comments.
Signed-off-by Stephen Hemminger <[email protected]>
net/core/dev.c static void dev_addr_discard(struct net_ · line 3330
Quoted 8 lines
net/core/dev.c +5
-0@@ -3322,6 +3323,12 @@ static void dev_addr_discard(struct net_netif_addr_unlock_bh (dev); } +/** +* dev_get_flags - get flags reported to userspace +* @dev: device +* +* Get the combination of flag bits exported throug APIs to userspace.
still needs: through
Quoted 4 lines
net/core/dev.c +1
-0+*/ unsigned dev_get_flags (const struct net_device *dev) {unsigned flags;
Signature · 1 line
~Randy
David Miller
maintainerRe: [PATCH 2/2] netdev: docbook comment update (revised)
From: "Randy.Dunlap" <[email protected]>
Date: Tue, 23 Sep 2008 10:12:04 -0700 (PDT)
Quoted 10 lines · Stephen Hemminger
Quoted 6 lines
+/**
+ *dev_get_flags- get flags reported to userspace
+ * @dev: device
+ *
+ * Get the combination of flag bits exported throug APIs to userspace.still needs: through
I've applied Stephen's patch with this fix.