diff options
author | Phil Sutter <phil.sutter@viprinet.com> | 2012-03-26 05:01:31 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-03-27 22:30:09 -0400 |
commit | b7440892802be38e6eeb0a17897deeb85476eff4 (patch) | |
tree | ce1b4b1e24a7a9558385edc3c9072183ccddc96d /drivers/net/wimax/i2400m | |
parent | 4eee6a3a04e8bb53fbe7de0f64d0524d3fbe3f80 (diff) |
wimax: i2400m-usb - use a private struct ethtool_ops
This way the USB variant of the driver uses usb_make_path in order to
provide bus-info compatible to other USB drivers (like e.g. asix.c).
Signed-off-by: Phil Sutter <phil.sutter@viprinet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wimax/i2400m')
-rw-r--r-- | drivers/net/wimax/i2400m/usb.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/wimax/i2400m/usb.c b/drivers/net/wimax/i2400m/usb.c index 2c1b8b687646..29b1e033a10b 100644 --- a/drivers/net/wimax/i2400m/usb.c +++ b/drivers/net/wimax/i2400m/usb.c | |||
@@ -339,6 +339,23 @@ int i2400mu_bus_reset(struct i2400m *i2400m, enum i2400m_reset_type rt) | |||
339 | return result; | 339 | return result; |
340 | } | 340 | } |
341 | 341 | ||
342 | static void i2400mu_get_drvinfo(struct net_device *net_dev, | ||
343 | struct ethtool_drvinfo *info) | ||
344 | { | ||
345 | struct i2400m *i2400m = net_dev_to_i2400m(net_dev); | ||
346 | struct i2400mu *i2400mu = container_of(i2400m, struct i2400mu, i2400m); | ||
347 | struct usb_device *udev = i2400mu->usb_dev; | ||
348 | |||
349 | strncpy(info->driver, KBUILD_MODNAME, sizeof(info->driver) - 1); | ||
350 | strncpy(info->fw_version, | ||
351 | i2400m->fw_name ? : "", sizeof(info->fw_version) - 1); | ||
352 | usb_make_path(udev, info->bus_info, sizeof(info->bus_info)); | ||
353 | } | ||
354 | |||
355 | static const struct ethtool_ops i2400mu_ethtool_ops = { | ||
356 | .get_drvinfo = i2400mu_get_drvinfo, | ||
357 | .get_link = ethtool_op_get_link, | ||
358 | }; | ||
342 | 359 | ||
343 | static | 360 | static |
344 | void i2400mu_netdev_setup(struct net_device *net_dev) | 361 | void i2400mu_netdev_setup(struct net_device *net_dev) |
@@ -347,6 +364,7 @@ void i2400mu_netdev_setup(struct net_device *net_dev) | |||
347 | struct i2400mu *i2400mu = container_of(i2400m, struct i2400mu, i2400m); | 364 | struct i2400mu *i2400mu = container_of(i2400m, struct i2400mu, i2400m); |
348 | i2400mu_init(i2400mu); | 365 | i2400mu_init(i2400mu); |
349 | i2400m_netdev_setup(net_dev); | 366 | i2400m_netdev_setup(net_dev); |
367 | net_dev->ethtool_ops = &i2400mu_ethtool_ops; | ||
350 | } | 368 | } |
351 | 369 | ||
352 | 370 | ||