lkml.org 
[lkml]   [2005]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] 3c59x: support more ethtool_ops
Linux Kernel Mailing List wrote:
> +static void vortex_get_ethtool_stats(struct net_device *dev,
> + struct ethtool_stats *stats, u64 *data)
> +{
> + struct vortex_private *vp = netdev_priv(dev);
> + unsigned long flags;
> +
> + spin_lock_irqsave(&vp->lock, flags);
> + update_stats(dev->base_addr, dev);
> + spin_unlock_irqrestore(&vp->lock, flags);
> +
> + data[0] = vp->stats.rx_packets;
> + data[1] = vp->stats.tx_packets;
> + data[2] = vp->stats.rx_bytes;
> + data[3] = vp->stats.tx_bytes;
> + data[4] = vp->stats.collisions;
> + data[5] = vp->stats.tx_carrier_errors;
> + data[6] = vp->stats.tx_heartbeat_errors;
> + data[7] = vp->stats.tx_window_errors;
> +}

Everything in the patch is correct except for the above.

This is very wrong -- get_ethtool_stats() is for NIC-specific stats.
The above stats are already available through the generic net stack.

Jeff


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:09    [W:0.106 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site