diff options
Diffstat (limited to 'drivers/net/wireless/airo_cs.c')
-rw-r--r-- | drivers/net/wireless/airo_cs.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c index 97f41565fca8..af0cbb6c5c0c 100644 --- a/drivers/net/wireless/airo_cs.c +++ b/drivers/net/wireless/airo_cs.c | |||
@@ -170,7 +170,6 @@ static int airo_probe(struct pcmcia_device *p_dev) | |||
170 | } | 170 | } |
171 | p_dev->priv = local; | 171 | p_dev->priv = local; |
172 | 172 | ||
173 | p_dev->state |= DEV_PRESENT | DEV_CONFIG_PENDING; | ||
174 | return airo_config(p_dev); | 173 | return airo_config(p_dev); |
175 | } /* airo_attach */ | 174 | } /* airo_attach */ |
176 | 175 | ||
@@ -187,8 +186,7 @@ static void airo_detach(struct pcmcia_device *link) | |||
187 | { | 186 | { |
188 | DEBUG(0, "airo_detach(0x%p)\n", link); | 187 | DEBUG(0, "airo_detach(0x%p)\n", link); |
189 | 188 | ||
190 | if (link->state & DEV_CONFIG) | 189 | airo_release(link); |
191 | airo_release(link); | ||
192 | 190 | ||
193 | if ( ((local_info_t*)link->priv)->eth_dev ) { | 191 | if ( ((local_info_t*)link->priv)->eth_dev ) { |
194 | stop_airo_card( ((local_info_t*)link->priv)->eth_dev, 0 ); | 192 | stop_airo_card( ((local_info_t*)link->priv)->eth_dev, 0 ); |
@@ -237,10 +235,7 @@ static int airo_config(struct pcmcia_device *link) | |||
237 | CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse)); | 235 | CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse)); |
238 | link->conf.ConfigBase = parse.config.base; | 236 | link->conf.ConfigBase = parse.config.base; |
239 | link->conf.Present = parse.config.rmask[0]; | 237 | link->conf.Present = parse.config.rmask[0]; |
240 | 238 | ||
241 | /* Configure card */ | ||
242 | link->state |= DEV_CONFIG; | ||
243 | |||
244 | /* | 239 | /* |
245 | In this loop, we scan the CIS for configuration table entries, | 240 | In this loop, we scan the CIS for configuration table entries, |
246 | each of which describes a valid card configuration, including | 241 | each of which describes a valid card configuration, including |
@@ -382,8 +377,6 @@ static int airo_config(struct pcmcia_device *link) | |||
382 | printk(", mem 0x%06lx-0x%06lx", req.Base, | 377 | printk(", mem 0x%06lx-0x%06lx", req.Base, |
383 | req.Base+req.Size-1); | 378 | req.Base+req.Size-1); |
384 | printk("\n"); | 379 | printk("\n"); |
385 | |||
386 | link->state &= ~DEV_CONFIG_PENDING; | ||
387 | return 0; | 380 | return 0; |
388 | 381 | ||
389 | cs_failed: | 382 | cs_failed: |
@@ -410,8 +403,7 @@ static int airo_suspend(struct pcmcia_device *link) | |||
410 | { | 403 | { |
411 | local_info_t *local = link->priv; | 404 | local_info_t *local = link->priv; |
412 | 405 | ||
413 | if (link->state & DEV_CONFIG) | 406 | netif_device_detach(local->eth_dev); |
414 | netif_device_detach(local->eth_dev); | ||
415 | 407 | ||
416 | return 0; | 408 | return 0; |
417 | } | 409 | } |
@@ -420,7 +412,7 @@ static int airo_resume(struct pcmcia_device *link) | |||
420 | { | 412 | { |
421 | local_info_t *local = link->priv; | 413 | local_info_t *local = link->priv; |
422 | 414 | ||
423 | if ((link->state & DEV_CONFIG) && (link->open)) { | 415 | if (link->open) { |
424 | reset_airo_card(local->eth_dev); | 416 | reset_airo_card(local->eth_dev); |
425 | netif_device_attach(local->eth_dev); | 417 | netif_device_attach(local->eth_dev); |
426 | } | 418 | } |