]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
USB: better ethtool support for kaweth
authorOliver Neukum <oneukum@suse.de>
Tue, 16 Jan 2007 11:01:26 +0000 (12:01 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 7 Feb 2007 23:44:35 +0000 (15:44 -0800)
this implements enough ethtool support to make NetworkManager happy.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/net/kaweth.c

index f29eed30e4f254c3d8f2daf969e681bc4557f49b..36a989160a684ccba108d06a706008d5500a8941 100644 (file)
@@ -742,12 +742,22 @@ static int kaweth_close(struct net_device *net)
 
 static void kaweth_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
 {
+       struct kaweth_device *kaweth = netdev_priv(dev);
 
        strlcpy(info->driver, driver_name, sizeof(info->driver));
+       usb_make_path(kaweth->dev, info->bus_info, sizeof (info->bus_info));
+}
+
+static u32 kaweth_get_link(struct net_device *dev)
+{
+       struct kaweth_device *kaweth = netdev_priv(dev);
+
+       return kaweth->linkstate;
 }
 
 static struct ethtool_ops ops = {
-       .get_drvinfo = kaweth_get_drvinfo
+       .get_drvinfo    = kaweth_get_drvinfo,
+       .get_link       = kaweth_get_link
 };
 
 /****************************************************************