diff options
Diffstat (limited to 'drivers/net/wireless/orinoco/main.c')
-rw-r--r-- | drivers/net/wireless/orinoco/main.c | 34 |
1 files changed, 7 insertions, 27 deletions
diff --git a/drivers/net/wireless/orinoco/main.c b/drivers/net/wireless/orinoco/main.c index 7a32bcb0c037..753a1804eee7 100644 --- a/drivers/net/wireless/orinoco/main.c +++ b/drivers/net/wireless/orinoco/main.c | |||
@@ -83,7 +83,6 @@ | |||
83 | #include <linux/device.h> | 83 | #include <linux/device.h> |
84 | #include <linux/netdevice.h> | 84 | #include <linux/netdevice.h> |
85 | #include <linux/etherdevice.h> | 85 | #include <linux/etherdevice.h> |
86 | #include <linux/ethtool.h> | ||
87 | #include <linux/suspend.h> | 86 | #include <linux/suspend.h> |
88 | #include <linux/if_arp.h> | 87 | #include <linux/if_arp.h> |
89 | #include <linux/wireless.h> | 88 | #include <linux/wireless.h> |
@@ -162,8 +161,6 @@ static const u8 encaps_hdr[] = {0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00}; | |||
162 | | HERMES_EV_WTERR | HERMES_EV_INFO \ | 161 | | HERMES_EV_WTERR | HERMES_EV_INFO \ |
163 | | HERMES_EV_INFDROP) | 162 | | HERMES_EV_INFDROP) |
164 | 163 | ||
165 | static const struct ethtool_ops orinoco_ethtool_ops; | ||
166 | |||
167 | /********************************************************************/ | 164 | /********************************************************************/ |
168 | /* Data types */ | 165 | /* Data types */ |
169 | /********************************************************************/ | 166 | /********************************************************************/ |
@@ -1994,7 +1991,9 @@ int orinoco_init(struct orinoco_private *priv) | |||
1994 | goto out; | 1991 | goto out; |
1995 | } | 1992 | } |
1996 | 1993 | ||
1997 | err = determine_fw_capabilities(priv); | 1994 | err = determine_fw_capabilities(priv, wiphy->fw_version, |
1995 | sizeof(wiphy->fw_version), | ||
1996 | &wiphy->hw_version); | ||
1998 | if (err != 0) { | 1997 | if (err != 0) { |
1999 | dev_err(dev, "Incompatible firmware, aborting\n"); | 1998 | dev_err(dev, "Incompatible firmware, aborting\n"); |
2000 | goto out; | 1999 | goto out; |
@@ -2010,7 +2009,9 @@ int orinoco_init(struct orinoco_private *priv) | |||
2010 | priv->do_fw_download = 0; | 2009 | priv->do_fw_download = 0; |
2011 | 2010 | ||
2012 | /* Check firmware version again */ | 2011 | /* Check firmware version again */ |
2013 | err = determine_fw_capabilities(priv); | 2012 | err = determine_fw_capabilities(priv, wiphy->fw_version, |
2013 | sizeof(wiphy->fw_version), | ||
2014 | &wiphy->hw_version); | ||
2014 | if (err != 0) { | 2015 | if (err != 0) { |
2015 | dev_err(dev, "Incompatible firmware, aborting\n"); | 2016 | dev_err(dev, "Incompatible firmware, aborting\n"); |
2016 | goto out; | 2017 | goto out; |
@@ -2212,7 +2213,6 @@ int orinoco_if_add(struct orinoco_private *priv, | |||
2212 | dev->ieee80211_ptr = wdev; | 2213 | dev->ieee80211_ptr = wdev; |
2213 | dev->netdev_ops = &orinoco_netdev_ops; | 2214 | dev->netdev_ops = &orinoco_netdev_ops; |
2214 | dev->watchdog_timeo = HZ; /* 1 second timeout */ | 2215 | dev->watchdog_timeo = HZ; /* 1 second timeout */ |
2215 | dev->ethtool_ops = &orinoco_ethtool_ops; | ||
2216 | dev->wireless_handlers = &orinoco_handler_def; | 2216 | dev->wireless_handlers = &orinoco_handler_def; |
2217 | #ifdef WIRELESS_SPY | 2217 | #ifdef WIRELESS_SPY |
2218 | dev->wireless_data = &priv->wireless_data; | 2218 | dev->wireless_data = &priv->wireless_data; |
@@ -2225,6 +2225,7 @@ int orinoco_if_add(struct orinoco_private *priv, | |||
2225 | netif_carrier_off(dev); | 2225 | netif_carrier_off(dev); |
2226 | 2226 | ||
2227 | memcpy(dev->dev_addr, wiphy->perm_addr, ETH_ALEN); | 2227 | memcpy(dev->dev_addr, wiphy->perm_addr, ETH_ALEN); |
2228 | memcpy(dev->perm_addr, wiphy->perm_addr, ETH_ALEN); | ||
2228 | 2229 | ||
2229 | dev->base_addr = base_addr; | 2230 | dev->base_addr = base_addr; |
2230 | dev->irq = irq; | 2231 | dev->irq = irq; |
@@ -2348,27 +2349,6 @@ void orinoco_down(struct orinoco_private *priv) | |||
2348 | } | 2349 | } |
2349 | EXPORT_SYMBOL(orinoco_down); | 2350 | EXPORT_SYMBOL(orinoco_down); |
2350 | 2351 | ||
2351 | static void orinoco_get_drvinfo(struct net_device *dev, | ||
2352 | struct ethtool_drvinfo *info) | ||
2353 | { | ||
2354 | struct orinoco_private *priv = ndev_priv(dev); | ||
2355 | |||
2356 | strncpy(info->driver, DRIVER_NAME, sizeof(info->driver) - 1); | ||
2357 | strncpy(info->version, DRIVER_VERSION, sizeof(info->version) - 1); | ||
2358 | strncpy(info->fw_version, priv->fw_name, sizeof(info->fw_version) - 1); | ||
2359 | if (dev->dev.parent) | ||
2360 | strncpy(info->bus_info, dev_name(dev->dev.parent), | ||
2361 | sizeof(info->bus_info) - 1); | ||
2362 | else | ||
2363 | snprintf(info->bus_info, sizeof(info->bus_info) - 1, | ||
2364 | "PCMCIA %p", priv->hw.iobase); | ||
2365 | } | ||
2366 | |||
2367 | static const struct ethtool_ops orinoco_ethtool_ops = { | ||
2368 | .get_drvinfo = orinoco_get_drvinfo, | ||
2369 | .get_link = ethtool_op_get_link, | ||
2370 | }; | ||
2371 | |||
2372 | /********************************************************************/ | 2352 | /********************************************************************/ |
2373 | /* Module initialization */ | 2353 | /* Module initialization */ |
2374 | /********************************************************************/ | 2354 | /********************************************************************/ |