3 #include <linux/module.h>
4 #include <linux/init.h>
6 #include <linux/slab.h>
7 #include <linux/wait.h>
8 #include <linux/timer.h>
9 #include <linux/skbuff.h>
10 #include <linux/netdevice.h>
11 #include <linux/workqueue.h>
12 #include <linux/wireless.h>
13 #include <net/iw_handler.h>
15 #include <pcmcia/cs_types.h>
16 #include <pcmcia/cs.h>
17 #include <pcmcia/cistpl.h>
18 #include <pcmcia/cisreg.h>
19 #include <pcmcia/ds.h>
23 #include "hostap_wlan.h"
26 static dev_info_t dev_info = "hostap_cs";
28 MODULE_AUTHOR("Jouni Malinen");
29 MODULE_DESCRIPTION("Support for Intersil Prism2-based 802.11 wireless LAN "
31 MODULE_SUPPORTED_DEVICE("Intersil Prism2-based WLAN cards (PC Card)");
32 MODULE_LICENSE("GPL");
35 static int ignore_cis_vcc;
36 module_param(ignore_cis_vcc, int, 0444);
37 MODULE_PARM_DESC(ignore_cis_vcc, "Ignore broken CIS VCC entry");
40 /* struct local_info::hw_priv */
41 struct hostap_cs_priv {
43 struct pcmcia_device *link;
44 int sandisk_connectplus;
48 #ifdef PRISM2_IO_DEBUG
50 static inline void hfa384x_outb_debug(struct net_device *dev, int a, u8 v)
52 struct hostap_interface *iface;
56 iface = netdev_priv(dev);
58 spin_lock_irqsave(&local->lock, flags);
59 prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_OUTB, a, v);
60 outb(v, dev->base_addr + a);
61 spin_unlock_irqrestore(&local->lock, flags);
64 static inline u8 hfa384x_inb_debug(struct net_device *dev, int a)
66 struct hostap_interface *iface;
71 iface = netdev_priv(dev);
73 spin_lock_irqsave(&local->lock, flags);
74 v = inb(dev->base_addr + a);
75 prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_INB, a, v);
76 spin_unlock_irqrestore(&local->lock, flags);
80 static inline void hfa384x_outw_debug(struct net_device *dev, int a, u16 v)
82 struct hostap_interface *iface;
86 iface = netdev_priv(dev);
88 spin_lock_irqsave(&local->lock, flags);
89 prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_OUTW, a, v);
90 outw(v, dev->base_addr + a);
91 spin_unlock_irqrestore(&local->lock, flags);
94 static inline u16 hfa384x_inw_debug(struct net_device *dev, int a)
96 struct hostap_interface *iface;
101 iface = netdev_priv(dev);
102 local = iface->local;
103 spin_lock_irqsave(&local->lock, flags);
104 v = inw(dev->base_addr + a);
105 prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_INW, a, v);
106 spin_unlock_irqrestore(&local->lock, flags);
110 static inline void hfa384x_outsw_debug(struct net_device *dev, int a,
113 struct hostap_interface *iface;
117 iface = netdev_priv(dev);
118 local = iface->local;
119 spin_lock_irqsave(&local->lock, flags);
120 prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_OUTSW, a, wc);
121 outsw(dev->base_addr + a, buf, wc);
122 spin_unlock_irqrestore(&local->lock, flags);
125 static inline void hfa384x_insw_debug(struct net_device *dev, int a,
128 struct hostap_interface *iface;
132 iface = netdev_priv(dev);
133 local = iface->local;
134 spin_lock_irqsave(&local->lock, flags);
135 prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_INSW, a, wc);
136 insw(dev->base_addr + a, buf, wc);
137 spin_unlock_irqrestore(&local->lock, flags);
140 #define HFA384X_OUTB(v,a) hfa384x_outb_debug(dev, (a), (v))
141 #define HFA384X_INB(a) hfa384x_inb_debug(dev, (a))
142 #define HFA384X_OUTW(v,a) hfa384x_outw_debug(dev, (a), (v))
143 #define HFA384X_INW(a) hfa384x_inw_debug(dev, (a))
144 #define HFA384X_OUTSW(a, buf, wc) hfa384x_outsw_debug(dev, (a), (buf), (wc))
145 #define HFA384X_INSW(a, buf, wc) hfa384x_insw_debug(dev, (a), (buf), (wc))
147 #else /* PRISM2_IO_DEBUG */
149 #define HFA384X_OUTB(v,a) outb((v), dev->base_addr + (a))
150 #define HFA384X_INB(a) inb(dev->base_addr + (a))
151 #define HFA384X_OUTW(v,a) outw((v), dev->base_addr + (a))
152 #define HFA384X_INW(a) inw(dev->base_addr + (a))
153 #define HFA384X_INSW(a, buf, wc) insw(dev->base_addr + (a), buf, wc)
154 #define HFA384X_OUTSW(a, buf, wc) outsw(dev->base_addr + (a), buf, wc)
156 #endif /* PRISM2_IO_DEBUG */
159 static int hfa384x_from_bap(struct net_device *dev, u16 bap, void *buf,
165 d_off = (bap == 1) ? HFA384X_DATA1_OFF : HFA384X_DATA0_OFF;
169 HFA384X_INSW(d_off, buf, len / 2);
173 *((char *) pos) = HFA384X_INB(d_off);
179 static int hfa384x_to_bap(struct net_device *dev, u16 bap, void *buf, int len)
184 d_off = (bap == 1) ? HFA384X_DATA1_OFF : HFA384X_DATA0_OFF;
188 HFA384X_OUTSW(d_off, buf, len / 2);
192 HFA384X_OUTB(*((char *) pos), d_off);
198 /* FIX: This might change at some point.. */
199 #include "hostap_hw.c"
203 static void prism2_detach(struct pcmcia_device *p_dev);
204 static void prism2_release(u_long arg);
205 static int prism2_config(struct pcmcia_device *link);
208 static int prism2_pccard_card_present(local_info_t *local)
210 struct hostap_cs_priv *hw_priv = local->hw_priv;
211 if (hw_priv != NULL && hw_priv->link != NULL && pcmcia_dev_present(hw_priv->link))
218 * SanDisk CompactFlash WLAN Flashcard - Product Manual v1.0
219 * Document No. 20-10-00058, January 2004
220 * http://www.sandisk.com/pdf/industrial/ProdManualCFWLANv1.0.pdf
222 #define SANDISK_WLAN_ACTIVATION_OFF 0x40
223 #define SANDISK_HCR_OFF 0x42
226 static void sandisk_set_iobase(local_info_t *local)
230 struct hostap_cs_priv *hw_priv = local->hw_priv;
233 reg.Action = CS_WRITE;
234 reg.Offset = 0x10; /* 0x3f0 IO base 1 */
235 reg.Value = hw_priv->link->io.BasePort1 & 0x00ff;
236 res = pcmcia_access_configuration_register(hw_priv->link,
239 printk(KERN_DEBUG "Prism3 SanDisk - failed to set I/O base 0 -"
245 reg.Action = CS_WRITE;
246 reg.Offset = 0x12; /* 0x3f2 IO base 2 */
247 reg.Value = (hw_priv->link->io.BasePort1 & 0xff00) >> 8;
248 res = pcmcia_access_configuration_register(hw_priv->link,
251 printk(KERN_DEBUG "Prism3 SanDisk - failed to set I/O base 1 -"
257 static void sandisk_write_hcr(local_info_t *local, int hcr)
259 struct net_device *dev = local->dev;
262 HFA384X_OUTB(0x80, SANDISK_WLAN_ACTIVATION_OFF);
264 for (i = 0; i < 10; i++) {
265 HFA384X_OUTB(hcr, SANDISK_HCR_OFF);
268 HFA384X_OUTB(0x45, SANDISK_WLAN_ACTIVATION_OFF);
272 static int sandisk_enable_wireless(struct net_device *dev)
276 struct hostap_interface *iface = netdev_priv(dev);
277 local_info_t *local = iface->local;
278 struct hostap_cs_priv *hw_priv = local->hw_priv;
280 if (hw_priv->link->io.NumPorts1 < 0x42) {
281 /* Not enough ports to be SanDisk multi-function card */
286 if (hw_priv->link->manf_id != 0xd601 || hw_priv->link->card_id != 0x0101) {
287 /* No SanDisk manfid found */
292 if (hw_priv->link->socket->functions < 2) {
293 /* No multi-function links found */
298 printk(KERN_DEBUG "%s: Multi-function SanDisk ConnectPlus detected"
299 " - using vendor-specific initialization\n", dev->name);
300 hw_priv->sandisk_connectplus = 1;
303 reg.Action = CS_WRITE;
304 reg.Offset = CISREG_COR;
305 reg.Value = COR_SOFT_RESET;
306 res = pcmcia_access_configuration_register(hw_priv->link,
309 printk(KERN_DEBUG "%s: SanDisk - COR sreset failed (%d)\n",
316 reg.Action = CS_WRITE;
317 reg.Offset = CISREG_COR;
319 * Do not enable interrupts here to avoid some bogus events. Interrupts
320 * will be enabled during the first cor_sreset call.
322 reg.Value = COR_LEVEL_REQ | 0x8 | COR_ADDR_DECODE | COR_FUNC_ENA;
323 res = pcmcia_access_configuration_register(hw_priv->link,
326 printk(KERN_DEBUG "%s: SanDisk - COR sreset failed (%d)\n",
332 sandisk_set_iobase(local);
334 HFA384X_OUTB(0xc5, SANDISK_WLAN_ACTIVATION_OFF);
336 HFA384X_OUTB(0x4b, SANDISK_WLAN_ACTIVATION_OFF);
344 static void prism2_pccard_cor_sreset(local_info_t *local)
348 struct hostap_cs_priv *hw_priv = local->hw_priv;
350 if (!prism2_pccard_card_present(local))
354 reg.Action = CS_READ;
355 reg.Offset = CISREG_COR;
357 res = pcmcia_access_configuration_register(hw_priv->link,
360 printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 1 (%d)\n",
364 printk(KERN_DEBUG "prism2_pccard_cor_sreset: original COR %02x\n",
367 reg.Action = CS_WRITE;
368 reg.Value |= COR_SOFT_RESET;
369 res = pcmcia_access_configuration_register(hw_priv->link,
372 printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 2 (%d)\n",
377 mdelay(hw_priv->sandisk_connectplus ? 5 : 2);
379 reg.Value &= ~COR_SOFT_RESET;
380 if (hw_priv->sandisk_connectplus)
381 reg.Value |= COR_IREQ_ENA;
382 res = pcmcia_access_configuration_register(hw_priv->link,
385 printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 3 (%d)\n",
390 mdelay(hw_priv->sandisk_connectplus ? 5 : 2);
392 if (hw_priv->sandisk_connectplus)
393 sandisk_set_iobase(local);
397 static void prism2_pccard_genesis_reset(local_info_t *local, int hcr)
402 struct hostap_cs_priv *hw_priv = local->hw_priv;
404 if (!prism2_pccard_card_present(local))
407 if (hw_priv->sandisk_connectplus) {
408 sandisk_write_hcr(local, hcr);
413 reg.Action = CS_READ;
414 reg.Offset = CISREG_COR;
416 res = pcmcia_access_configuration_register(hw_priv->link,
419 printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 1 "
423 printk(KERN_DEBUG "prism2_pccard_genesis_sreset: original COR %02x\n",
427 reg.Action = CS_WRITE;
428 reg.Value |= COR_SOFT_RESET;
429 res = pcmcia_access_configuration_register(hw_priv->link,
432 printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 2 "
439 /* Setup Genesis mode */
440 reg.Action = CS_WRITE;
442 reg.Offset = CISREG_CCSR;
443 res = pcmcia_access_configuration_register(hw_priv->link,
446 printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 3 "
452 reg.Action = CS_WRITE;
453 reg.Offset = CISREG_COR;
454 reg.Value = old_cor & ~COR_SOFT_RESET;
455 res = pcmcia_access_configuration_register(hw_priv->link,
458 printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 4 "
467 static struct prism2_helper_functions prism2_pccard_funcs =
469 .card_present = prism2_pccard_card_present,
470 .cor_sreset = prism2_pccard_cor_sreset,
471 .genesis_reset = prism2_pccard_genesis_reset,
472 .hw_type = HOSTAP_HW_PCCARD,
476 /* allocate local data and register with CardServices
477 * initialize dev_link structure, but do not configure the card yet */
478 static int hostap_cs_probe(struct pcmcia_device *p_dev)
482 PDEBUG(DEBUG_HW, "%s: setting Vcc=33 (constant)\n", dev_info);
483 p_dev->conf.IntType = INT_MEMORY_AND_IO;
485 ret = prism2_config(p_dev);
487 PDEBUG(DEBUG_EXTRA, "prism2_config() failed\n");
494 static void prism2_detach(struct pcmcia_device *link)
496 PDEBUG(DEBUG_FLOW, "prism2_detach\n");
498 prism2_release((u_long)link);
500 /* release net devices */
502 struct hostap_cs_priv *hw_priv;
503 struct net_device *dev;
504 struct hostap_interface *iface;
506 iface = netdev_priv(dev);
507 hw_priv = iface->local->hw_priv;
508 prism2_free_local_data(dev);
514 /* run after a CARD_INSERTION event is received to configure the PCMCIA
515 * socket and make the device available to the system */
517 static int prism2_config_check(struct pcmcia_device *p_dev,
518 cistpl_cftable_entry_t *cfg,
519 cistpl_cftable_entry_t *dflt,
526 PDEBUG(DEBUG_EXTRA, "Checking CFTABLE_ENTRY 0x%02X "
527 "(default 0x%02X)\n", cfg->index, dflt->index);
529 /* Does this card need audio output? */
530 if (cfg->flags & CISTPL_CFTABLE_AUDIO) {
531 p_dev->conf.Attributes |= CONF_ENABLE_SPKR;
532 p_dev->conf.Status = CCSR_AUDIO_ENA;
535 /* Use power settings for Vcc and Vpp if present */
536 /* Note that the CIS values need to be rescaled */
537 if (cfg->vcc.present & (1 << CISTPL_POWER_VNOM)) {
538 if (vcc != cfg->vcc.param[CISTPL_POWER_VNOM] /
539 10000 && !ignore_cis_vcc) {
540 PDEBUG(DEBUG_EXTRA, " Vcc mismatch - skipping"
544 } else if (dflt->vcc.present & (1 << CISTPL_POWER_VNOM)) {
545 if (vcc != dflt->vcc.param[CISTPL_POWER_VNOM] /
546 10000 && !ignore_cis_vcc) {
547 PDEBUG(DEBUG_EXTRA, " Vcc (default) mismatch "
548 "- skipping this entry\n");
553 if (cfg->vpp1.present & (1 << CISTPL_POWER_VNOM))
554 p_dev->conf.Vpp = cfg->vpp1.param[CISTPL_POWER_VNOM] / 10000;
555 else if (dflt->vpp1.present & (1 << CISTPL_POWER_VNOM))
556 p_dev->conf.Vpp = dflt->vpp1.param[CISTPL_POWER_VNOM] / 10000;
558 /* Do we need to allocate an interrupt? */
559 if (cfg->irq.IRQInfo1 || dflt->irq.IRQInfo1)
560 p_dev->conf.Attributes |= CONF_ENABLE_IRQ;
561 else if (!(p_dev->conf.Attributes & CONF_ENABLE_IRQ)) {
562 /* At least Compaq WL200 does not have IRQInfo1 set,
563 * but it does not work without interrupts.. */
564 printk(KERN_WARNING "Config has no IRQ info, but trying to "
565 "enable IRQ anyway..\n");
566 p_dev->conf.Attributes |= CONF_ENABLE_IRQ;
569 /* IO window settings */
570 PDEBUG(DEBUG_EXTRA, "IO window settings: cfg->io.nwin=%d "
571 "dflt->io.nwin=%d\n",
572 cfg->io.nwin, dflt->io.nwin);
573 p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0;
574 if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) {
575 cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io;
576 p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
577 PDEBUG(DEBUG_EXTRA, "io->flags = 0x%04X, "
578 "io.base=0x%04x, len=%d\n", io->flags,
579 io->win[0].base, io->win[0].len);
580 if (!(io->flags & CISTPL_IO_8BIT))
581 p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_16;
582 if (!(io->flags & CISTPL_IO_16BIT))
583 p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
584 p_dev->io.IOAddrLines = io->flags &
585 CISTPL_IO_LINES_MASK;
586 p_dev->io.BasePort1 = io->win[0].base;
587 p_dev->io.NumPorts1 = io->win[0].len;
589 p_dev->io.Attributes2 = p_dev->io.Attributes1;
590 p_dev->io.BasePort2 = io->win[1].base;
591 p_dev->io.NumPorts2 = io->win[1].len;
595 /* This reserves IO space but doesn't actually enable it */
596 return pcmcia_request_io(p_dev, &p_dev->io);
599 static int prism2_config(struct pcmcia_device *link)
601 struct net_device *dev;
602 struct hostap_interface *iface;
605 struct hostap_cs_priv *hw_priv;
607 PDEBUG(DEBUG_FLOW, "prism2_config()\n");
609 hw_priv = kzalloc(sizeof(*hw_priv), GFP_KERNEL);
610 if (hw_priv == NULL) {
615 /* Look for an appropriate configuration table entry in the CIS */
616 ret = pcmcia_loop_config(link, prism2_config_check, NULL);
619 printk(KERN_ERR "GetNextTuple(): No matching "
620 "CIS configuration. Maybe you need the "
621 "ignore_cis_vcc=1 parameter.\n");
625 /* Need to allocate net_device before requesting IRQ handler */
626 dev = prism2_init_local_data(&prism2_pccard_funcs, 0,
632 iface = netdev_priv(dev);
633 local = iface->local;
634 local->hw_priv = hw_priv;
635 hw_priv->link = link;
636 strcpy(hw_priv->node.dev_name, dev->name);
637 link->dev_node = &hw_priv->node;
640 * Allocate an interrupt line. Note that this does not assign a
641 * handler to the interrupt, unless the 'Handler' member of the
642 * irq structure is initialized.
644 if (link->conf.Attributes & CONF_ENABLE_IRQ) {
645 link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
646 link->irq.Handler = prism2_interrupt;
647 ret = pcmcia_request_irq(link, &link->irq);
653 * This actually configures the PCMCIA socket -- setting up
654 * the I/O windows and the interrupt mapping, and putting the
655 * card and host interface into "Memory and IO" mode.
657 ret = pcmcia_request_configuration(link, &link->conf);
661 dev->irq = link->irq.AssignedIRQ;
662 dev->base_addr = link->io.BasePort1;
664 /* Finally, report what we've done */
665 printk(KERN_INFO "%s: index 0x%02x: ",
666 dev_info, link->conf.ConfigIndex);
668 printk(", Vpp %d.%d", link->conf.Vpp / 10,
669 link->conf.Vpp % 10);
670 if (link->conf.Attributes & CONF_ENABLE_IRQ)
671 printk(", irq %d", link->irq.AssignedIRQ);
672 if (link->io.NumPorts1)
673 printk(", io 0x%04x-0x%04x", link->io.BasePort1,
674 link->io.BasePort1+link->io.NumPorts1-1);
675 if (link->io.NumPorts2)
676 printk(" & 0x%04x-0x%04x", link->io.BasePort2,
677 link->io.BasePort2+link->io.NumPorts2-1);
682 sandisk_enable_wireless(dev);
684 ret = prism2_hw_config(dev, 1);
686 ret = hostap_hw_ready(dev);
687 if (ret == 0 && local->ddev)
688 strcpy(hw_priv->node.dev_name, local->ddev->name);
694 prism2_release((u_long)link);
699 static void prism2_release(u_long arg)
701 struct pcmcia_device *link = (struct pcmcia_device *)arg;
703 PDEBUG(DEBUG_FLOW, "prism2_release\n");
706 struct net_device *dev = link->priv;
707 struct hostap_interface *iface;
709 iface = netdev_priv(dev);
710 prism2_hw_shutdown(dev, 0);
711 iface->local->shutdown = 1;
714 pcmcia_disable_device(link);
715 PDEBUG(DEBUG_FLOW, "release - done\n");
718 static int hostap_cs_suspend(struct pcmcia_device *link)
720 struct net_device *dev = (struct net_device *) link->priv;
722 struct hostap_interface *iface = NULL;
727 iface = netdev_priv(dev);
729 PDEBUG(DEBUG_EXTRA, "%s: CS_EVENT_PM_SUSPEND\n", dev_info);
730 if (iface && iface->local)
731 dev_open = iface->local->num_dev_open > 0;
733 netif_stop_queue(dev);
734 netif_device_detach(dev);
741 static int hostap_cs_resume(struct pcmcia_device *link)
743 struct net_device *dev = (struct net_device *) link->priv;
745 struct hostap_interface *iface = NULL;
750 iface = netdev_priv(dev);
752 PDEBUG(DEBUG_EXTRA, "%s: CS_EVENT_PM_RESUME\n", dev_info);
754 if (iface && iface->local)
755 dev_open = iface->local->num_dev_open > 0;
757 prism2_hw_shutdown(dev, 1);
758 prism2_hw_config(dev, dev_open ? 0 : 1);
760 netif_device_attach(dev);
761 netif_start_queue(dev);
767 static struct pcmcia_device_id hostap_cs_ids[] = {
768 PCMCIA_DEVICE_MANF_CARD(0x000b, 0x7100),
769 PCMCIA_DEVICE_MANF_CARD(0x000b, 0x7300),
770 PCMCIA_DEVICE_MANF_CARD(0x0101, 0x0777),
771 PCMCIA_DEVICE_MANF_CARD(0x0126, 0x8000),
772 PCMCIA_DEVICE_MANF_CARD(0x0138, 0x0002),
773 PCMCIA_DEVICE_MANF_CARD(0x01bf, 0x3301),
774 PCMCIA_DEVICE_MANF_CARD(0x0250, 0x0002),
775 PCMCIA_DEVICE_MANF_CARD(0x026f, 0x030b),
776 PCMCIA_DEVICE_MANF_CARD(0x0274, 0x1612),
777 PCMCIA_DEVICE_MANF_CARD(0x0274, 0x1613),
778 PCMCIA_DEVICE_MANF_CARD(0x028a, 0x0002),
779 PCMCIA_DEVICE_MANF_CARD(0x02aa, 0x0002),
780 PCMCIA_DEVICE_MANF_CARD(0x02d2, 0x0001),
781 PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x0001),
782 PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x7300),
783 /* PCMCIA_DEVICE_MANF_CARD(0xc00f, 0x0000), conflict with pcnet_cs */
784 PCMCIA_DEVICE_MANF_CARD(0xc250, 0x0002),
785 PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0002),
786 PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0005),
787 PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0010),
788 PCMCIA_DEVICE_MANF_CARD(0x0126, 0x0002),
789 PCMCIA_DEVICE_MANF_CARD_PROD_ID1(0xd601, 0x0005, "ADLINK 345 CF",
791 PCMCIA_DEVICE_MANF_CARD_PROD_ID1(0x0156, 0x0002, "INTERSIL",
793 PCMCIA_DEVICE_MANF_CARD_PROD_ID1(0x0156, 0x0002, "Intersil",
795 PCMCIA_MFC_DEVICE_PROD_ID12(0, "SanDisk", "ConnectPlus",
796 0x7a954bd9, 0x74be00c6),
797 PCMCIA_DEVICE_PROD_ID123(
798 "Addtron", "AWP-100 Wireless PCMCIA", "Version 01.02",
799 0xe6ec52ce, 0x08649af2, 0x4b74baa0),
800 PCMCIA_DEVICE_PROD_ID123(
801 "D", "Link DWL-650 11Mbps WLAN Card", "Version 01.02",
802 0x71b18589, 0xb6f1b0ab, 0x4b74baa0),
803 PCMCIA_DEVICE_PROD_ID123(
804 "Instant Wireless ", " Network PC CARD", "Version 01.02",
805 0x11d901af, 0x6e9bd926, 0x4b74baa0),
806 PCMCIA_DEVICE_PROD_ID123(
807 "SMC", "SMC2632W", "Version 01.02",
808 0xc4f8b18b, 0x474a1f2a, 0x4b74baa0),
809 PCMCIA_DEVICE_PROD_ID12("BUFFALO", "WLI-CF-S11G",
810 0x2decece3, 0x82067c18),
811 PCMCIA_DEVICE_PROD_ID12("Compaq", "WL200_11Mbps_Wireless_PCI_Card",
812 0x54f7c49c, 0x15a75e5b),
813 PCMCIA_DEVICE_PROD_ID12("INTERSIL", "HFA384x/IEEE",
814 0x74c5e40d, 0xdb472a18),
815 PCMCIA_DEVICE_PROD_ID12("Linksys", "Wireless CompactFlash Card",
816 0x0733cc81, 0x0c52f395),
817 PCMCIA_DEVICE_PROD_ID12(
818 "ZoomAir 11Mbps High", "Rate wireless Networking",
819 0x273fe3db, 0x32a1eaee),
820 PCMCIA_DEVICE_PROD_ID123(
821 "Pretec", "CompactWLAN Card 802.11b", "2.5",
822 0x1cadd3e5, 0xe697636c, 0x7a5bfcf1),
823 PCMCIA_DEVICE_PROD_ID123(
824 "U.S. Robotics", "IEEE 802.11b PC-CARD", "Version 01.02",
825 0xc7b8df9d, 0x1700d087, 0x4b74baa0),
826 PCMCIA_DEVICE_PROD_ID123(
827 "Allied Telesyn", "AT-WCL452 Wireless PCMCIA Radio",
829 0x5cd01705, 0x4271660f, 0x9d08ee12),
830 PCMCIA_DEVICE_PROD_ID123(
831 "Wireless LAN" , "11Mbps PC Card", "Version 01.02",
832 0x4b8870ff, 0x70e946d1, 0x4b74baa0),
833 PCMCIA_DEVICE_PROD_ID3("HFA3863", 0x355cb092),
834 PCMCIA_DEVICE_PROD_ID3("ISL37100P", 0x630d52b2),
835 PCMCIA_DEVICE_PROD_ID3("ISL37101P-10", 0xdd97a26b),
836 PCMCIA_DEVICE_PROD_ID3("ISL37300P", 0xc9049a39),
839 MODULE_DEVICE_TABLE(pcmcia, hostap_cs_ids);
842 static struct pcmcia_driver hostap_driver = {
846 .probe = hostap_cs_probe,
847 .remove = prism2_detach,
848 .owner = THIS_MODULE,
849 .id_table = hostap_cs_ids,
850 .suspend = hostap_cs_suspend,
851 .resume = hostap_cs_resume,
854 static int __init init_prism2_pccard(void)
856 return pcmcia_register_driver(&hostap_driver);
859 static void __exit exit_prism2_pccard(void)
861 pcmcia_unregister_driver(&hostap_driver);
865 module_init(init_prism2_pccard);
866 module_exit(exit_prism2_pccard);