summaryrefslogtreecommitdiff
path: root/drivers/usb/net/usbnet.c
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2007-04-17 16:10:10 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2007-04-27 13:28:40 -0700
commit296c02429271e1b9525b52fed76daa3b1cafefc4 (patch)
tree3b945e3e48a484cf29e905e8e3283bfeaf19b2dd /drivers/usb/net/usbnet.c
parentddda08624013e8435e9f7cfc34a35bd7b3520b6d (diff)
downloadlwn-296c02429271e1b9525b52fed76daa3b1cafefc4.tar.gz
lwn-296c02429271e1b9525b52fed76daa3b1cafefc4.zip
USB: usbnet reports minidriver name through ethtool
Update "usbnet" so that ethtool reports the name of the minidriver in use (e.g. asix, cdc_ether, dm9601, rndis_host) instead of "usbnet". This is a better match to how other network drivers work, resolving a minor open issue. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/net/usbnet.c')
-rw-r--r--drivers/usb/net/usbnet.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c
index 0c5465a7909b..f9cd42d058b0 100644
--- a/drivers/usb/net/usbnet.c
+++ b/drivers/usb/net/usbnet.c
@@ -734,8 +734,7 @@ void usbnet_get_drvinfo (struct net_device *net, struct ethtool_drvinfo *info)
{
struct usbnet *dev = netdev_priv(net);
- /* REVISIT don't always return "usbnet" */
- strncpy (info->driver, driver_name, sizeof info->driver);
+ strncpy (info->driver, dev->driver_name, sizeof info->driver);
strncpy (info->version, DRIVER_VERSION, sizeof info->version);
strncpy (info->fw_version, dev->driver_info->description,
sizeof info->fw_version);
@@ -1115,10 +1114,12 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
struct driver_info *info;
struct usb_device *xdev;
int status;
+ const char *name;
+ name = udev->dev.driver->name;
info = (struct driver_info *) prod->driver_info;
if (!info) {
- dev_dbg (&udev->dev, "blacklisted by %s\n", driver_name);
+ dev_dbg (&udev->dev, "blacklisted by %s\n", name);
return -ENODEV;
}
xdev = interface_to_usbdev (udev);
@@ -1138,6 +1139,7 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
dev = netdev_priv(net);
dev->udev = xdev;
dev->driver_info = info;
+ dev->driver_name = name;
dev->msg_enable = netif_msg_init (msg_level, NETIF_MSG_DRV
| NETIF_MSG_PROBE | NETIF_MSG_LINK);
skb_queue_head_init (&dev->rxq);