aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/xen-netback
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@citrix.com>2015-03-04 11:14:46 +0000
committerDavid S. Miller <davem@davemloft.net>2015-03-05 14:58:17 -0500
commitd63951d7442982ef81df585a9c08c2b5fd49f898 (patch)
tree58f4f7162bd742fce4a5da2e6d531b5debc5fc75 /drivers/net/xen-netback
parentARM: fix typos in smc91x platform data (diff)
downloadlinux-dev-d63951d7442982ef81df585a9c08c2b5fd49f898.tar.xz
linux-dev-d63951d7442982ef81df585a9c08c2b5fd49f898.zip
xen-netback: return correct ethtool stats
Use correct pointer arithmetic to get the pointer to each stat. Signed-off-by: David Vrabel <david.vrabel@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/xen-netback')
-rw-r--r--drivers/net/xen-netback/interface.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
index f38227afe099..3aa8648080c8 100644
--- a/drivers/net/xen-netback/interface.c
+++ b/drivers/net/xen-netback/interface.c
@@ -340,12 +340,11 @@ static void xenvif_get_ethtool_stats(struct net_device *dev,
unsigned int num_queues = vif->num_queues;
int i;
unsigned int queue_index;
- struct xenvif_stats *vif_stats;
for (i = 0; i < ARRAY_SIZE(xenvif_stats); i++) {
unsigned long accum = 0;
for (queue_index = 0; queue_index < num_queues; ++queue_index) {
- vif_stats = &vif->queues[queue_index].stats;
+ void *vif_stats = &vif->queues[queue_index].stats;
accum += *(unsigned long *)(vif_stats + xenvif_stats[i].offset);
}
data[i] = accum;