diff options
Diffstat (limited to 'drivers/net/wireless/hostap/hostap_cs.c')
-rw-r--r-- | drivers/net/wireless/hostap/hostap_cs.c | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index ba4a7da98cc..866142af7d9 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c | |||
@@ -203,7 +203,7 @@ static int hfa384x_to_bap(struct net_device *dev, u16 bap, void *buf, int len) | |||
203 | 203 | ||
204 | 204 | ||
205 | 205 | ||
206 | static void prism2_detach(dev_link_t *link); | 206 | static void prism2_detach(struct pcmcia_device *p_dev); |
207 | static void prism2_release(u_long arg); | 207 | static void prism2_release(u_long arg); |
208 | static int prism2_event(event_t event, int priority, | 208 | static int prism2_event(event_t event, int priority, |
209 | event_callback_args_t *args); | 209 | event_callback_args_t *args); |
@@ -528,15 +528,16 @@ static dev_link_t *prism2_attach(void) | |||
528 | ret = pcmcia_register_client(&link->handle, &client_reg); | 528 | ret = pcmcia_register_client(&link->handle, &client_reg); |
529 | if (ret != CS_SUCCESS) { | 529 | if (ret != CS_SUCCESS) { |
530 | cs_error(link->handle, RegisterClient, ret); | 530 | cs_error(link->handle, RegisterClient, ret); |
531 | prism2_detach(link); | 531 | prism2_detach(link->handle); |
532 | return NULL; | 532 | return NULL; |
533 | } | 533 | } |
534 | return link; | 534 | return link; |
535 | } | 535 | } |
536 | 536 | ||
537 | 537 | ||
538 | static void prism2_detach(dev_link_t *link) | 538 | static void prism2_detach(struct pcmcia_device *p_dev) |
539 | { | 539 | { |
540 | dev_link_t *link = dev_to_instance(p_dev); | ||
540 | dev_link_t **linkp; | 541 | dev_link_t **linkp; |
541 | 542 | ||
542 | PDEBUG(DEBUG_FLOW, "prism2_detach\n"); | 543 | PDEBUG(DEBUG_FLOW, "prism2_detach\n"); |
@@ -554,14 +555,6 @@ static void prism2_detach(dev_link_t *link) | |||
554 | prism2_release((u_long)link); | 555 | prism2_release((u_long)link); |
555 | } | 556 | } |
556 | 557 | ||
557 | if (link->handle) { | ||
558 | int res = pcmcia_deregister_client(link->handle); | ||
559 | if (res) { | ||
560 | printk("CardService(DeregisterClient) => %d\n", res); | ||
561 | cs_error(link->handle, DeregisterClient, res); | ||
562 | } | ||
563 | } | ||
564 | |||
565 | *linkp = link->next; | 558 | *linkp = link->next; |
566 | /* release net devices */ | 559 | /* release net devices */ |
567 | if (link->priv) { | 560 | if (link->priv) { |
@@ -902,7 +895,6 @@ static int prism2_event(event_t event, int priority, | |||
902 | event_callback_args_t *args) | 895 | event_callback_args_t *args) |
903 | { | 896 | { |
904 | dev_link_t *link = args->client_data; | 897 | dev_link_t *link = args->client_data; |
905 | struct net_device *dev = (struct net_device *) link->priv; | ||
906 | 898 | ||
907 | switch (event) { | 899 | switch (event) { |
908 | case CS_EVENT_CARD_INSERTION: | 900 | case CS_EVENT_CARD_INSERTION: |
@@ -913,16 +905,6 @@ static int prism2_event(event_t event, int priority, | |||
913 | } | 905 | } |
914 | break; | 906 | break; |
915 | 907 | ||
916 | case CS_EVENT_CARD_REMOVAL: | ||
917 | PDEBUG(DEBUG_EXTRA, "%s: CS_EVENT_CARD_REMOVAL\n", dev_info); | ||
918 | link->state &= ~DEV_PRESENT; | ||
919 | if (link->state & DEV_CONFIG) { | ||
920 | netif_stop_queue(dev); | ||
921 | netif_device_detach(dev); | ||
922 | prism2_release((u_long) link); | ||
923 | } | ||
924 | break; | ||
925 | |||
926 | default: | 908 | default: |
927 | PDEBUG(DEBUG_EXTRA, "%s: prism2_event() - unknown event %d\n", | 909 | PDEBUG(DEBUG_EXTRA, "%s: prism2_event() - unknown event %d\n", |
928 | dev_info, event); | 910 | dev_info, event); |
@@ -991,7 +973,7 @@ static struct pcmcia_driver hostap_driver = { | |||
991 | .name = "hostap_cs", | 973 | .name = "hostap_cs", |
992 | }, | 974 | }, |
993 | .attach = prism2_attach, | 975 | .attach = prism2_attach, |
994 | .detach = prism2_detach, | 976 | .remove = prism2_detach, |
995 | .owner = THIS_MODULE, | 977 | .owner = THIS_MODULE, |
996 | .event = prism2_event, | 978 | .event = prism2_event, |
997 | .id_table = hostap_cs_ids, | 979 | .id_table = hostap_cs_ids, |