summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/ethtool.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-12-08 21:04:36 +0100
committerDavid S. Miller <davem@davemloft.net>2008-01-29 00:06:19 +0100
commitaa21c004f80bdf943736c62dccf0c0398d7824f3 (patch)
tree6815328775d3b5ec46bb342c4c256cde0f223863 /drivers/net/wireless/libertas/ethtool.c
parentlibertas: kill TxLockFlag (diff)
downloadlinux-aa21c004f80bdf943736c62dccf0c0398d7824f3.tar.xz
linux-aa21c004f80bdf943736c62dccf0c0398d7824f3.zip
libertas: kill struct lbs_adapter
There seems to be no reason for a separate structure; move it all into struct lbs_private. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/ethtool.c')
-rw-r--r--drivers/net/wireless/libertas/ethtool.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/net/wireless/libertas/ethtool.c b/drivers/net/wireless/libertas/ethtool.c
index f32fb00129e7..a54b4f406af2 100644
--- a/drivers/net/wireless/libertas/ethtool.c
+++ b/drivers/net/wireless/libertas/ethtool.c
@@ -25,7 +25,7 @@ static void lbs_ethtool_get_drvinfo(struct net_device *dev,
struct lbs_private *priv = (struct lbs_private *) dev->priv;
char fwver[32];
- lbs_get_fwversion(priv->adapter, fwver, sizeof(fwver) - 1);
+ lbs_get_fwversion(priv, fwver, sizeof(fwver) - 1);
strcpy(info->driver, "libertas");
strcpy(info->version, lbs_driver_version);
@@ -46,7 +46,6 @@ static int lbs_ethtool_get_eeprom(struct net_device *dev,
struct ethtool_eeprom *eeprom, u8 * bytes)
{
struct lbs_private *priv = (struct lbs_private *) dev->priv;
- struct lbs_adapter *adapter = priv->adapter;
struct lbs_ioctl_regrdwr regctrl;
char *ptr;
int ret;
@@ -60,10 +59,10 @@ static int lbs_ethtool_get_eeprom(struct net_device *dev,
// mutex_lock(&priv->mutex);
- adapter->prdeeprom = kmalloc(eeprom->len+sizeof(regctrl), GFP_KERNEL);
- if (!adapter->prdeeprom)
+ priv->prdeeprom = kmalloc(eeprom->len+sizeof(regctrl), GFP_KERNEL);
+ if (!priv->prdeeprom)
return -ENOMEM;
- memcpy(adapter->prdeeprom, &regctrl, sizeof(regctrl));
+ memcpy(priv->prdeeprom, &regctrl, sizeof(regctrl));
/* +14 is for action, offset, and NOB in
* response */
@@ -77,14 +76,14 @@ static int lbs_ethtool_get_eeprom(struct net_device *dev,
&regctrl);
if (ret) {
- if (adapter->prdeeprom)
- kfree(adapter->prdeeprom);
+ if (priv->prdeeprom)
+ kfree(priv->prdeeprom);
goto done;
}
mdelay(10);
- ptr = (char *)adapter->prdeeprom;
+ ptr = (char *)priv->prdeeprom;
/* skip the command header, but include the "value" u32 variable */
ptr = ptr + sizeof(struct lbs_ioctl_regrdwr) - 4;
@@ -94,8 +93,8 @@ static int lbs_ethtool_get_eeprom(struct net_device *dev,
*/
memcpy(bytes, ptr, eeprom->len);
- if (adapter->prdeeprom)
- kfree(adapter->prdeeprom);
+ if (priv->prdeeprom)
+ kfree(priv->prdeeprom);
// mutex_unlock(&priv->mutex);
ret = 0;