From: Oliver Neukum Date: Tue, 16 Jan 2007 11:01:26 +0000 (+0100) Subject: USB: better ethtool support for kaweth X-Git-Tag: v2.6.21-rc2~42^2~9^2~35 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=b3ebd5222141efa489d95592b7d4536766530e56;p=linux-2.6-omap-h63xx.git USB: better ethtool support for kaweth this implements enough ethtool support to make NetworkManager happy. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/net/kaweth.c b/drivers/usb/net/kaweth.c index f29eed30e4f..36a989160a6 100644 --- a/drivers/usb/net/kaweth.c +++ b/drivers/usb/net/kaweth.c @@ -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 }; /****************************************************************