diff options
author | Kiran Divekar <dkiran@marvell.com> | 2009-02-19 19:32:39 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-26 15:15:44 -0500 |
commit | ab65f649d38d910f48843a275f3f0596cdbf28bf (patch) | |
tree | 5e1dbf7d3af66ceae64b5f920df42f920bde6ae3 /drivers/net/wireless/libertas/persistcfg.c | |
parent | 0c9a3aaaf30e1d1994de58c554ef97a719e20892 (diff) |
libertas: fix misuse of netdev_priv() and dev->ml_priv
The mesh and radiotap interfaces need to use the same private data as
the main wifi interface. If the main wifi interface uses netdev_priv(),
but the other interfaces ->ml_priv, there's no way to figure out where
the private data actually is in the WEXT handlers and netdevice
callbacks. So make everything use ->ml_priv.
Fixes botched netdev_priv() conversion introduced by "netdevice
libertas: Fix directly reference of netdev->priv", though admittedly
libertas' use of ->priv was somewhat "special".
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Tested-by: Chris Ball <cjb@laptop.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/persistcfg.c')
-rw-r--r-- | drivers/net/wireless/libertas/persistcfg.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/wireless/libertas/persistcfg.c b/drivers/net/wireless/libertas/persistcfg.c index d42b7a5a1b3f..18fe29faf99b 100644 --- a/drivers/net/wireless/libertas/persistcfg.c +++ b/drivers/net/wireless/libertas/persistcfg.c | |||
@@ -18,7 +18,7 @@ | |||
18 | static int mesh_get_default_parameters(struct device *dev, | 18 | static int mesh_get_default_parameters(struct device *dev, |
19 | struct mrvl_mesh_defaults *defs) | 19 | struct mrvl_mesh_defaults *defs) |
20 | { | 20 | { |
21 | struct lbs_private *priv = netdev_priv(to_net_dev(dev)); | 21 | struct lbs_private *priv = to_net_dev(dev)->ml_priv; |
22 | struct cmd_ds_mesh_config cmd; | 22 | struct cmd_ds_mesh_config cmd; |
23 | int ret; | 23 | int ret; |
24 | 24 | ||
@@ -57,7 +57,7 @@ static ssize_t bootflag_get(struct device *dev, | |||
57 | static ssize_t bootflag_set(struct device *dev, struct device_attribute *attr, | 57 | static ssize_t bootflag_set(struct device *dev, struct device_attribute *attr, |
58 | const char *buf, size_t count) | 58 | const char *buf, size_t count) |
59 | { | 59 | { |
60 | struct lbs_private *priv = netdev_priv(to_net_dev(dev)); | 60 | struct lbs_private *priv = to_net_dev(dev)->ml_priv; |
61 | struct cmd_ds_mesh_config cmd; | 61 | struct cmd_ds_mesh_config cmd; |
62 | uint32_t datum; | 62 | uint32_t datum; |
63 | int ret; | 63 | int ret; |
@@ -100,7 +100,7 @@ static ssize_t boottime_get(struct device *dev, | |||
100 | static ssize_t boottime_set(struct device *dev, | 100 | static ssize_t boottime_set(struct device *dev, |
101 | struct device_attribute *attr, const char *buf, size_t count) | 101 | struct device_attribute *attr, const char *buf, size_t count) |
102 | { | 102 | { |
103 | struct lbs_private *priv = netdev_priv(to_net_dev(dev)); | 103 | struct lbs_private *priv = to_net_dev(dev)->ml_priv; |
104 | struct cmd_ds_mesh_config cmd; | 104 | struct cmd_ds_mesh_config cmd; |
105 | uint32_t datum; | 105 | uint32_t datum; |
106 | int ret; | 106 | int ret; |
@@ -152,7 +152,7 @@ static ssize_t channel_get(struct device *dev, | |||
152 | static ssize_t channel_set(struct device *dev, struct device_attribute *attr, | 152 | static ssize_t channel_set(struct device *dev, struct device_attribute *attr, |
153 | const char *buf, size_t count) | 153 | const char *buf, size_t count) |
154 | { | 154 | { |
155 | struct lbs_private *priv = netdev_priv(to_net_dev(dev)); | 155 | struct lbs_private *priv = to_net_dev(dev)->ml_priv; |
156 | struct cmd_ds_mesh_config cmd; | 156 | struct cmd_ds_mesh_config cmd; |
157 | uint32_t datum; | 157 | uint32_t datum; |
158 | int ret; | 158 | int ret; |
@@ -210,7 +210,7 @@ static ssize_t mesh_id_set(struct device *dev, struct device_attribute *attr, | |||
210 | struct cmd_ds_mesh_config cmd; | 210 | struct cmd_ds_mesh_config cmd; |
211 | struct mrvl_mesh_defaults defs; | 211 | struct mrvl_mesh_defaults defs; |
212 | struct mrvl_meshie *ie; | 212 | struct mrvl_meshie *ie; |
213 | struct lbs_private *priv = netdev_priv(to_net_dev(dev)); | 213 | struct lbs_private *priv = to_net_dev(dev)->ml_priv; |
214 | int len; | 214 | int len; |
215 | int ret; | 215 | int ret; |
216 | 216 | ||
@@ -269,7 +269,7 @@ static ssize_t protocol_id_set(struct device *dev, | |||
269 | struct cmd_ds_mesh_config cmd; | 269 | struct cmd_ds_mesh_config cmd; |
270 | struct mrvl_mesh_defaults defs; | 270 | struct mrvl_mesh_defaults defs; |
271 | struct mrvl_meshie *ie; | 271 | struct mrvl_meshie *ie; |
272 | struct lbs_private *priv = netdev_priv(to_net_dev(dev)); | 272 | struct lbs_private *priv = to_net_dev(dev)->ml_priv; |
273 | uint32_t datum; | 273 | uint32_t datum; |
274 | int ret; | 274 | int ret; |
275 | 275 | ||
@@ -323,7 +323,7 @@ static ssize_t metric_id_set(struct device *dev, struct device_attribute *attr, | |||
323 | struct cmd_ds_mesh_config cmd; | 323 | struct cmd_ds_mesh_config cmd; |
324 | struct mrvl_mesh_defaults defs; | 324 | struct mrvl_mesh_defaults defs; |
325 | struct mrvl_meshie *ie; | 325 | struct mrvl_meshie *ie; |
326 | struct lbs_private *priv = netdev_priv(to_net_dev(dev)); | 326 | struct lbs_private *priv = to_net_dev(dev)->ml_priv; |
327 | uint32_t datum; | 327 | uint32_t datum; |
328 | int ret; | 328 | int ret; |
329 | 329 | ||
@@ -377,7 +377,7 @@ static ssize_t capability_set(struct device *dev, struct device_attribute *attr, | |||
377 | struct cmd_ds_mesh_config cmd; | 377 | struct cmd_ds_mesh_config cmd; |
378 | struct mrvl_mesh_defaults defs; | 378 | struct mrvl_mesh_defaults defs; |
379 | struct mrvl_meshie *ie; | 379 | struct mrvl_meshie *ie; |
380 | struct lbs_private *priv = netdev_priv(to_net_dev(dev)); | 380 | struct lbs_private *priv = to_net_dev(dev)->ml_priv; |
381 | uint32_t datum; | 381 | uint32_t datum; |
382 | int ret; | 382 | int ret; |
383 | 383 | ||