aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2007-04-17 19:10:10 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-04-27 16:28:40 -0400
commit296c02429271e1b9525b52fed76daa3b1cafefc4 (patch)
tree3b945e3e48a484cf29e905e8e3283bfeaf19b2dd /drivers/usb
parentddda08624013e8435e9f7cfc34a35bd7b3520b6d (diff)
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')
-rw-r--r--drivers/usb/net/usbnet.c8
-rw-r--r--drivers/usb/net/usbnet.h1
2 files changed, 6 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)
734{ 734{
735 struct usbnet *dev = netdev_priv(net); 735 struct usbnet *dev = netdev_priv(net);
736 736
737 /* REVISIT don't always return "usbnet" */ 737 strncpy (info->driver, dev->driver_name, sizeof info->driver);
738 strncpy (info->driver, driver_name, sizeof info->driver);
739 strncpy (info->version, DRIVER_VERSION, sizeof info->version); 738 strncpy (info->version, DRIVER_VERSION, sizeof info->version);
740 strncpy (info->fw_version, dev->driver_info->description, 739 strncpy (info->fw_version, dev->driver_info->description,
741 sizeof info->fw_version); 740 sizeof info->fw_version);
@@ -1115,10 +1114,12 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
1115 struct driver_info *info; 1114 struct driver_info *info;
1116 struct usb_device *xdev; 1115 struct usb_device *xdev;
1117 int status; 1116 int status;
1117 const char *name;
1118 1118
1119 name = udev->dev.driver->name;
1119 info = (struct driver_info *) prod->driver_info; 1120 info = (struct driver_info *) prod->driver_info;
1120 if (!info) { 1121 if (!info) {
1121 dev_dbg (&udev->dev, "blacklisted by %s\n", driver_name); 1122 dev_dbg (&udev->dev, "blacklisted by %s\n", name);
1122 return -ENODEV; 1123 return -ENODEV;
1123 } 1124 }
1124 xdev = interface_to_usbdev (udev); 1125 xdev = interface_to_usbdev (udev);
@@ -1138,6 +1139,7 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
1138 dev = netdev_priv(net); 1139 dev = netdev_priv(net);
1139 dev->udev = xdev; 1140 dev->udev = xdev;
1140 dev->driver_info = info; 1141 dev->driver_info = info;
1142 dev->driver_name = name;
1141 dev->msg_enable = netif_msg_init (msg_level, NETIF_MSG_DRV 1143 dev->msg_enable = netif_msg_init (msg_level, NETIF_MSG_DRV
1142 | NETIF_MSG_PROBE | NETIF_MSG_LINK); 1144 | NETIF_MSG_PROBE | NETIF_MSG_LINK);
1143 skb_queue_head_init (&dev->rxq); 1145 skb_queue_head_init (&dev->rxq);
diff --git a/drivers/usb/net/usbnet.h b/drivers/usb/net/usbnet.h
index 07c70abbe0ec..cbb53e065d6c 100644
--- a/drivers/usb/net/usbnet.h
+++ b/drivers/usb/net/usbnet.h
@@ -29,6 +29,7 @@ struct usbnet {
29 /* housekeeping */ 29 /* housekeeping */
30 struct usb_device *udev; 30 struct usb_device *udev;
31 struct driver_info *driver_info; 31 struct driver_info *driver_info;
32 const char *driver_name;
32 wait_queue_head_t *wait; 33 wait_queue_head_t *wait;
33 struct mutex phy_mutex; 34 struct mutex phy_mutex;
34 35