aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/libertas/main.c')
-rw-r--r--drivers/net/wireless/libertas/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index 6304bd97d399..3feddcc750ed 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -256,7 +256,7 @@ void libertas_remove_rtap(wlan_private *priv);
256static ssize_t libertas_rtap_get(struct device * dev, 256static ssize_t libertas_rtap_get(struct device * dev,
257 struct device_attribute *attr, char * buf) 257 struct device_attribute *attr, char * buf)
258{ 258{
259 wlan_private *priv = (wlan_private *) dev->driver_data; 259 wlan_private *priv = (wlan_private *) (to_net_dev(dev))->priv;
260 wlan_adapter *adapter = priv->adapter; 260 wlan_adapter *adapter = priv->adapter;
261 return snprintf(buf, 5, "0x%X\n", adapter->monitormode); 261 return snprintf(buf, 5, "0x%X\n", adapter->monitormode);
262} 262}
@@ -268,7 +268,7 @@ static ssize_t libertas_rtap_set(struct device * dev,
268 struct device_attribute *attr, const char * buf, size_t count) 268 struct device_attribute *attr, const char * buf, size_t count)
269{ 269{
270 int monitor_mode; 270 int monitor_mode;
271 wlan_private *priv = (wlan_private *) dev->driver_data; 271 wlan_private *priv = (wlan_private *) (to_net_dev(dev))->priv;
272 wlan_adapter *adapter = priv->adapter; 272 wlan_adapter *adapter = priv->adapter;
273 273
274 sscanf(buf, "%x", &monitor_mode); 274 sscanf(buf, "%x", &monitor_mode);
@@ -1138,7 +1138,7 @@ wlan_private *libertas_add_card(void *card, struct device *dmdev)
1138 lbs_pr_err("init ethX device failed\n"); 1138 lbs_pr_err("init ethX device failed\n");
1139 goto done; 1139 goto done;
1140 } 1140 }
1141 dmdev->driver_data = priv = dev->priv; 1141 priv = dev->priv;
1142 1142
1143 /* allocate buffer for wlan_adapter */ 1143 /* allocate buffer for wlan_adapter */
1144 if (!(priv->adapter = kzalloc(sizeof(wlan_adapter), GFP_KERNEL))) { 1144 if (!(priv->adapter = kzalloc(sizeof(wlan_adapter), GFP_KERNEL))) {