aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/ethtool.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-12-08 15:04:36 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:06:19 -0500
commitaa21c004f80bdf943736c62dccf0c0398d7824f3 (patch)
tree6815328775d3b5ec46bb342c4c256cde0f223863 /drivers/net/wireless/libertas/ethtool.c
parentf86a93e1b2d05a7a38a48c91f8fb8fc7e8f1c734 (diff)
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,
25 struct lbs_private *priv = (struct lbs_private *) dev->priv; 25 struct lbs_private *priv = (struct lbs_private *) dev->priv;
26 char fwver[32]; 26 char fwver[32];
27 27
28 lbs_get_fwversion(priv->adapter, fwver, sizeof(fwver) - 1); 28 lbs_get_fwversion(priv, fwver, sizeof(fwver) - 1);
29 29
30 strcpy(info->driver, "libertas"); 30 strcpy(info->driver, "libertas");
31 strcpy(info->version, lbs_driver_version); 31 strcpy(info->version, lbs_driver_version);
@@ -46,7 +46,6 @@ static int lbs_ethtool_get_eeprom(struct net_device *dev,
46 struct ethtool_eeprom *eeprom, u8 * bytes) 46 struct ethtool_eeprom *eeprom, u8 * bytes)
47{ 47{
48 struct lbs_private *priv = (struct lbs_private *) dev->priv; 48 struct lbs_private *priv = (struct lbs_private *) dev->priv;
49 struct lbs_adapter *adapter = priv->adapter;
50 struct lbs_ioctl_regrdwr regctrl; 49 struct lbs_ioctl_regrdwr regctrl;
51 char *ptr; 50 char *ptr;
52 int ret; 51 int ret;
@@ -60,10 +59,10 @@ static int lbs_ethtool_get_eeprom(struct net_device *dev,
60 59
61// mutex_lock(&priv->mutex); 60// mutex_lock(&priv->mutex);
62 61
63 adapter->prdeeprom = kmalloc(eeprom->len+sizeof(regctrl), GFP_KERNEL); 62 priv->prdeeprom = kmalloc(eeprom->len+sizeof(regctrl), GFP_KERNEL);
64 if (!adapter->prdeeprom) 63 if (!priv->prdeeprom)
65 return -ENOMEM; 64 return -ENOMEM;
66 memcpy(adapter->prdeeprom, &regctrl, sizeof(regctrl)); 65 memcpy(priv->prdeeprom, &regctrl, sizeof(regctrl));
67 66
68 /* +14 is for action, offset, and NOB in 67 /* +14 is for action, offset, and NOB in
69 * response */ 68 * response */
@@ -77,14 +76,14 @@ static int lbs_ethtool_get_eeprom(struct net_device *dev,
77 &regctrl); 76 &regctrl);
78 77
79 if (ret) { 78 if (ret) {
80 if (adapter->prdeeprom) 79 if (priv->prdeeprom)
81 kfree(adapter->prdeeprom); 80 kfree(priv->prdeeprom);
82 goto done; 81 goto done;
83 } 82 }
84 83
85 mdelay(10); 84 mdelay(10);
86 85
87 ptr = (char *)adapter->prdeeprom; 86 ptr = (char *)priv->prdeeprom;
88 87
89 /* skip the command header, but include the "value" u32 variable */ 88 /* skip the command header, but include the "value" u32 variable */
90 ptr = ptr + sizeof(struct lbs_ioctl_regrdwr) - 4; 89 ptr = ptr + sizeof(struct lbs_ioctl_regrdwr) - 4;
@@ -94,8 +93,8 @@ static int lbs_ethtool_get_eeprom(struct net_device *dev,
94 */ 93 */
95 memcpy(bytes, ptr, eeprom->len); 94 memcpy(bytes, ptr, eeprom->len);
96 95
97 if (adapter->prdeeprom) 96 if (priv->prdeeprom)
98 kfree(adapter->prdeeprom); 97 kfree(priv->prdeeprom);
99// mutex_unlock(&priv->mutex); 98// mutex_unlock(&priv->mutex);
100 99
101 ret = 0; 100 ret = 0;