diff options
Diffstat (limited to 'drivers/net/wireless/netwave_cs.c')
-rw-r--r-- | drivers/net/wireless/netwave_cs.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c index 23d6b3376e6e..68dfe68ffecf 100644 --- a/drivers/net/wireless/netwave_cs.c +++ b/drivers/net/wireless/netwave_cs.c | |||
@@ -268,7 +268,7 @@ struct site_survey { | |||
268 | }; | 268 | }; |
269 | 269 | ||
270 | typedef struct netwave_private { | 270 | typedef struct netwave_private { |
271 | dev_link_t link; | 271 | struct pcmcia_device *p_dev; |
272 | spinlock_t spinlock; /* Serialize access to the hardware (SMP) */ | 272 | spinlock_t spinlock; /* Serialize access to the hardware (SMP) */ |
273 | dev_node_t node; | 273 | dev_node_t node; |
274 | u_char __iomem *ramBase; | 274 | u_char __iomem *ramBase; |
@@ -378,9 +378,9 @@ static struct iw_statistics *netwave_get_wireless_stats(struct net_device *dev) | |||
378 | */ | 378 | */ |
379 | static int netwave_attach(struct pcmcia_device *p_dev) | 379 | static int netwave_attach(struct pcmcia_device *p_dev) |
380 | { | 380 | { |
381 | dev_link_t *link; | ||
382 | struct net_device *dev; | 381 | struct net_device *dev; |
383 | netwave_private *priv; | 382 | netwave_private *priv; |
383 | dev_link_t *link = dev_to_instance(p_dev); | ||
384 | 384 | ||
385 | DEBUG(0, "netwave_attach()\n"); | 385 | DEBUG(0, "netwave_attach()\n"); |
386 | 386 | ||
@@ -389,7 +389,7 @@ static int netwave_attach(struct pcmcia_device *p_dev) | |||
389 | if (!dev) | 389 | if (!dev) |
390 | return -ENOMEM; | 390 | return -ENOMEM; |
391 | priv = netdev_priv(dev); | 391 | priv = netdev_priv(dev); |
392 | link = &priv->link; | 392 | priv->p_dev = p_dev; |
393 | link->priv = dev; | 393 | link->priv = dev; |
394 | 394 | ||
395 | /* The io structure describes IO port mapping */ | 395 | /* The io structure describes IO port mapping */ |
@@ -429,9 +429,6 @@ static int netwave_attach(struct pcmcia_device *p_dev) | |||
429 | dev->stop = &netwave_close; | 429 | dev->stop = &netwave_close; |
430 | link->irq.Instance = dev; | 430 | link->irq.Instance = dev; |
431 | 431 | ||
432 | link->handle = p_dev; | ||
433 | p_dev->instance = link; | ||
434 | |||
435 | link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; | 432 | link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; |
436 | netwave_pcmcia_config( link); | 433 | netwave_pcmcia_config( link); |
437 | 434 | ||
@@ -456,7 +453,7 @@ static void netwave_detach(struct pcmcia_device *p_dev) | |||
456 | if (link->state & DEV_CONFIG) | 453 | if (link->state & DEV_CONFIG) |
457 | netwave_release(link); | 454 | netwave_release(link); |
458 | 455 | ||
459 | if (link->dev) | 456 | if (link->dev_node) |
460 | unregister_netdev(dev); | 457 | unregister_netdev(dev); |
461 | 458 | ||
462 | free_netdev(dev); | 459 | free_netdev(dev); |
@@ -830,7 +827,7 @@ static void netwave_pcmcia_config(dev_link_t *link) { | |||
830 | } | 827 | } |
831 | 828 | ||
832 | strcpy(priv->node.dev_name, dev->name); | 829 | strcpy(priv->node.dev_name, dev->name); |
833 | link->dev = &priv->node; | 830 | link->dev_node = &priv->node; |
834 | link->state &= ~DEV_CONFIG_PENDING; | 831 | link->state &= ~DEV_CONFIG_PENDING; |
835 | 832 | ||
836 | /* Reset card before reading physical address */ | 833 | /* Reset card before reading physical address */ |
@@ -1103,7 +1100,7 @@ static irqreturn_t netwave_interrupt(int irq, void* dev_id, struct pt_regs *regs | |||
1103 | u_char __iomem *ramBase; | 1100 | u_char __iomem *ramBase; |
1104 | struct net_device *dev = (struct net_device *)dev_id; | 1101 | struct net_device *dev = (struct net_device *)dev_id; |
1105 | struct netwave_private *priv = netdev_priv(dev); | 1102 | struct netwave_private *priv = netdev_priv(dev); |
1106 | dev_link_t *link = &priv->link; | 1103 | dev_link_t *link = priv->p_dev; |
1107 | int i; | 1104 | int i; |
1108 | 1105 | ||
1109 | if (!netif_device_present(dev)) | 1106 | if (!netif_device_present(dev)) |
@@ -1357,7 +1354,7 @@ static int netwave_rx(struct net_device *dev) | |||
1357 | 1354 | ||
1358 | static int netwave_open(struct net_device *dev) { | 1355 | static int netwave_open(struct net_device *dev) { |
1359 | netwave_private *priv = netdev_priv(dev); | 1356 | netwave_private *priv = netdev_priv(dev); |
1360 | dev_link_t *link = &priv->link; | 1357 | dev_link_t *link = priv->p_dev; |
1361 | 1358 | ||
1362 | DEBUG(1, "netwave_open: starting.\n"); | 1359 | DEBUG(1, "netwave_open: starting.\n"); |
1363 | 1360 | ||
@@ -1374,7 +1371,7 @@ static int netwave_open(struct net_device *dev) { | |||
1374 | 1371 | ||
1375 | static int netwave_close(struct net_device *dev) { | 1372 | static int netwave_close(struct net_device *dev) { |
1376 | netwave_private *priv = netdev_priv(dev); | 1373 | netwave_private *priv = netdev_priv(dev); |
1377 | dev_link_t *link = &priv->link; | 1374 | dev_link_t *link = priv->p_dev; |
1378 | 1375 | ||
1379 | DEBUG(1, "netwave_close: finishing.\n"); | 1376 | DEBUG(1, "netwave_close: finishing.\n"); |
1380 | 1377 | ||