Sophie

Sophie

distrib > Mandriva > current > x86_64 > by-pkgid > d41cc2729f5f0fbbd2607b14a49457f3 > files > 43

kernel-xen-2.6.32.11-2mdv2010.1.src.rpm

From: ksrinivasan@novell.com
Subject: netfront: ethtool -i does not return info about xennet driver
Patch-mainline: n/a
References: bnc#591179

Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>

--- sle11sp1-2010-03-29.orig/drivers/xen/netfront/netfront.c	2009-11-06 10:52:23.000000000 +0100
+++ sle11sp1-2010-03-29/drivers/xen/netfront/netfront.c	2010-03-27 00:18:30.000000000 +0100
@@ -1766,6 +1766,13 @@ static void xennet_set_features(struct n
 		xennet_set_tso(dev, 1);
 }
 
+static void netfront_get_drvinfo(struct net_device *dev,
+				 struct ethtool_drvinfo *info)
+{
+	strcpy(info->driver, "netfront");
+	strcpy(info->bus_info, dev_name(dev->dev.parent));
+}
+
 static int network_connect(struct net_device *dev)
 {
 	struct netfront_info *np = netdev_priv(dev);
@@ -1874,6 +1881,7 @@ static void netif_uninit(struct net_devi
 
 static const struct ethtool_ops network_ethtool_ops =
 {
+	.get_drvinfo = netfront_get_drvinfo,
 	.get_tx_csum = ethtool_op_get_tx_csum,
 	.set_tx_csum = ethtool_op_set_tx_csum,
 	.get_sg = ethtool_op_get_sg,