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 {
42 struct pcmcia_device *link;
43 int sandisk_connectplus;
47 #ifdef PRISM2_IO_DEBUG
49 static inline void hfa384x_outb_debug(struct net_device *dev, int a, u8 v)
51 struct hostap_interface *iface;
55 iface = netdev_priv(dev);
57 spin_lock_irqsave(&local->lock, flags);
58 prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_OUTB, a, v);
59 outb(v, dev->base_addr + a);
60 spin_unlock_irqrestore(&local->lock, flags);
63 static inline u8 hfa384x_inb_debug(struct net_device *dev, int a)
65 struct hostap_interface *iface;
70 iface = netdev_priv(dev);
72 spin_lock_irqsave(&local->lock, flags);
73 v = inb(dev->base_addr + a);
74 prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_INB, a, v);
75 spin_unlock_irqrestore(&local->lock, flags);
79 static inline void hfa384x_outw_debug(struct net_device *dev, int a, u16 v)
81 struct hostap_interface *iface;
85 iface = netdev_priv(dev);
87 spin_lock_irqsave(&local->lock, flags);
88 prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_OUTW, a, v);
89 outw(v, dev->base_addr + a);
90 spin_unlock_irqrestore(&local->lock, flags);
93 static inline u16 hfa384x_inw_debug(struct net_device *dev, int a)
95 struct hostap_interface *iface;
100 iface = netdev_priv(dev);
101 local = iface->local;
102 spin_lock_irqsave(&local->lock, flags);
103 v = inw(dev->base_addr + a);
104 prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_INW, a, v);
105 spin_unlock_irqrestore(&local->lock, flags);
109 static inline void hfa384x_outsw_debug(struct net_device *dev, int a,
112 struct hostap_interface *iface;
116 iface = netdev_priv(dev);
117 local = iface->local;
118 spin_lock_irqsave(&local->lock, flags);
119 prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_OUTSW, a, wc);
120 outsw(dev->base_addr + a, buf, wc);
121 spin_unlock_irqrestore(&local->lock, flags);
124 static inline void hfa384x_insw_debug(struct net_device *dev, int a,
127 struct hostap_interface *iface;
131 iface = netdev_priv(dev);
132 local = iface->local;
133 spin_lock_irqsave(&local->lock, flags);
134 prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_INSW, a, wc);
135 insw(dev->base_addr + a, buf, wc);
136 spin_unlock_irqrestore(&local->lock, flags);
139 #define HFA384X_OUTB(v,a) hfa384x_outb_debug(dev, (a), (v))
140 #define HFA384X_INB(a) hfa384x_inb_debug(dev, (a))
141 #define HFA384X_OUTW(v,a) hfa384x_outw_debug(dev, (a), (v))
142 #define HFA384X_INW(a) hfa384x_inw_debug(dev, (a))
143 #define HFA384X_OUTSW(a, buf, wc) hfa384x_outsw_debug(dev, (a), (buf), (wc))
144 #define HFA384X_INSW(a, buf, wc) hfa384x_insw_debug(dev, (a), (buf), (wc))
146 #else /* PRISM2_IO_DEBUG */
148 #define HFA384X_OUTB(v,a) outb((v), dev->base_addr + (a))
149 #define HFA384X_INB(a) inb(dev->base_addr + (a))
150 #define HFA384X_OUTW(v,a) outw((v), dev->base_addr + (a))
151 #define HFA384X_INW(a) inw(dev->base_addr + (a))
152 #define HFA384X_INSW(a, buf, wc) insw(dev->base_addr + (a), buf, wc)
153 #define HFA384X_OUTSW(a, buf, wc) outsw(dev->base_addr + (a), buf, wc)
155 #endif /* PRISM2_IO_DEBUG */
158 static int hfa384x_from_bap(struct net_device *dev, u16 bap, void *buf,
164 d_off = (bap == 1) ? HFA384X_DATA1_OFF : HFA384X_DATA0_OFF;
168 HFA384X_INSW(d_off, buf, len / 2);
172 *((char *) pos) = HFA384X_INB(d_off);
178 static int hfa384x_to_bap(struct net_device *dev, u16 bap, void *buf, int len)
183 d_off = (bap == 1) ? HFA384X_DATA1_OFF : HFA384X_DATA0_OFF;
187 HFA384X_OUTSW(d_off, buf, len / 2);
191 HFA384X_OUTB(*((char *) pos), d_off);
197 /* FIX: This might change at some point.. */
198 #include "hostap_hw.c"
202 static void prism2_detach(struct pcmcia_device *p_dev);
203 static void prism2_release(u_long arg);
204 static int prism2_config(struct pcmcia_device *link);
207 static int prism2_pccard_card_present(local_info_t *local)
209 struct hostap_cs_priv *hw_priv = local->hw_priv;
210 if (hw_priv != NULL && hw_priv->link != NULL && pcmcia_dev_present(hw_priv->link))
217 * SanDisk CompactFlash WLAN Flashcard - Product Manual v1.0
218 * Document No. 20-10-00058, January 2004
219 * http://www.sandisk.com/pdf/industrial/ProdManualCFWLANv1.0.pdf
221 #define SANDISK_WLAN_ACTIVATION_OFF 0x40
222 #define SANDISK_HCR_OFF 0x42
225 static void sandisk_set_iobase(local_info_t *local)
229 struct hostap_cs_priv *hw_priv = local->hw_priv;
232 reg.Action = CS_WRITE;
233 reg.Offset = 0x10; /* 0x3f0 IO base 1 */
234 reg.Value = hw_priv->link->io.BasePort1 & 0x00ff;
235 res = pcmcia_access_configuration_register(hw_priv->link,
238 printk(KERN_DEBUG "Prism3 SanDisk - failed to set I/O base 0 -"
244 reg.Action = CS_WRITE;
245 reg.Offset = 0x12; /* 0x3f2 IO base 2 */
246 reg.Value = (hw_priv->link->io.BasePort1 & 0xff00) >> 8;
247 res = pcmcia_access_configuration_register(hw_priv->link,
250 printk(KERN_DEBUG "Prism3 SanDisk - failed to set I/O base 1 -"
256 static void sandisk_write_hcr(local_info_t *local, int hcr)
258 struct net_device *dev = local->dev;
261 HFA384X_OUTB(0x80, SANDISK_WLAN_ACTIVATION_OFF);
263 for (i = 0; i < 10; i++) {
264 HFA384X_OUTB(hcr, SANDISK_HCR_OFF);
267 HFA384X_OUTB(0x45, SANDISK_WLAN_ACTIVATION_OFF);
271 static int sandisk_enable_wireless(struct net_device *dev)
275 struct hostap_interface *iface = netdev_priv(dev);
276 local_info_t *local = iface->local;
277 struct hostap_cs_priv *hw_priv = local->hw_priv;
279 if (hw_priv->link->io.NumPorts1 < 0x42) {
280 /* Not enough ports to be SanDisk multi-function card */
285 if (hw_priv->link->manf_id != 0xd601 || hw_priv->link->card_id != 0x0101) {
286 /* No SanDisk manfid found */
291 if (hw_priv->link->socket->functions < 2) {
292 /* No multi-function links found */
297 printk(KERN_DEBUG "%s: Multi-function SanDisk ConnectPlus detected"
298 " - using vendor-specific initialization\n", dev->name);
299 hw_priv->sandisk_connectplus = 1;
302 reg.Action = CS_WRITE;
303 reg.Offset = CISREG_COR;
304 reg.Value = COR_SOFT_RESET;
305 res = pcmcia_access_configuration_register(hw_priv->link,
308 printk(KERN_DEBUG "%s: SanDisk - COR sreset failed (%d)\n",
315 reg.Action = CS_WRITE;
316 reg.Offset = CISREG_COR;
318 * Do not enable interrupts here to avoid some bogus events. Interrupts
319 * will be enabled during the first cor_sreset call.
321 reg.Value = COR_LEVEL_REQ | 0x8 | COR_ADDR_DECODE | COR_FUNC_ENA;
322 res = pcmcia_access_configuration_register(hw_priv->link,
325 printk(KERN_DEBUG "%s: SanDisk - COR sreset failed (%d)\n",
331 sandisk_set_iobase(local);
333 HFA384X_OUTB(0xc5, SANDISK_WLAN_ACTIVATION_OFF);
335 HFA384X_OUTB(0x4b, SANDISK_WLAN_ACTIVATION_OFF);
343 static void prism2_pccard_cor_sreset(local_info_t *local)
347 struct hostap_cs_priv *hw_priv = local->hw_priv;
349 if (!prism2_pccard_card_present(local))
353 reg.Action = CS_READ;
354 reg.Offset = CISREG_COR;
356 res = pcmcia_access_configuration_register(hw_priv->link,
359 printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 1 (%d)\n",
363 printk(KERN_DEBUG "prism2_pccard_cor_sreset: original COR %02x\n",
366 reg.Action = CS_WRITE;
367 reg.Value |= COR_SOFT_RESET;
368 res = pcmcia_access_configuration_register(hw_priv->link,
371 printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 2 (%d)\n",
376 mdelay(hw_priv->sandisk_connectplus ? 5 : 2);
378 reg.Value &= ~COR_SOFT_RESET;
379 if (hw_priv->sandisk_connectplus)
380 reg.Value |= COR_IREQ_ENA;
381 res = pcmcia_access_configuration_register(hw_priv->link,
384 printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 3 (%d)\n",
389 mdelay(hw_priv->sandisk_connectplus ? 5 : 2);
391 if (hw_priv->sandisk_connectplus)
392 sandisk_set_iobase(local);
396 static void prism2_pccard_genesis_reset(local_info_t *local, int hcr)
401 struct hostap_cs_priv *hw_priv = local->hw_priv;
403 if (!prism2_pccard_card_present(local))
406 if (hw_priv->sandisk_connectplus) {
407 sandisk_write_hcr(local, hcr);
412 reg.Action = CS_READ;
413 reg.Offset = CISREG_COR;
415 res = pcmcia_access_configuration_register(hw_priv->link,
418 printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 1 "
422 printk(KERN_DEBUG "prism2_pccard_genesis_sreset: original COR %02x\n",
426 reg.Action = CS_WRITE;
427 reg.Value |= COR_SOFT_RESET;
428 res = pcmcia_access_configuration_register(hw_priv->link,
431 printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 2 "
438 /* Setup Genesis mode */
439 reg.Action = CS_WRITE;
441 reg.Offset = CISREG_CCSR;
442 res = pcmcia_access_configuration_register(hw_priv->link,
445 printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 3 "
451 reg.Action = CS_WRITE;
452 reg.Offset = CISREG_COR;
453 reg.Value = old_cor & ~COR_SOFT_RESET;
454 res = pcmcia_access_configuration_register(hw_priv->link,
457 printk(KERN_DEBUG "prism2_pccard_genesis_sreset failed 4 "
466 static struct prism2_helper_functions prism2_pccard_funcs =
468 .card_present = prism2_pccard_card_present,
469 .cor_sreset = prism2_pccard_cor_sreset,
470 .genesis_reset = prism2_pccard_genesis_reset,
471 .hw_type = HOSTAP_HW_PCCARD,
475 /* allocate local data and register with CardServices
476 * initialize dev_link structure, but do not configure the card yet */
477 static int hostap_cs_probe(struct pcmcia_device *p_dev)
481 PDEBUG(DEBUG_HW, "%s: setting Vcc=33 (constant)\n", dev_info);
482 p_dev->conf.IntType = INT_MEMORY_AND_IO;
484 ret = prism2_config(p_dev);
486 PDEBUG(DEBUG_EXTRA, "prism2_config() failed\n");
493 static void prism2_detach(struct pcmcia_device *link)
495 PDEBUG(DEBUG_FLOW, "prism2_detach\n");
497 prism2_release((u_long)link);
499 /* release net devices */
501 struct hostap_cs_priv *hw_priv;
502 struct net_device *dev;
503 struct hostap_interface *iface;
505 iface = netdev_priv(dev);
506 hw_priv = iface->local->hw_priv;
507 prism2_free_local_data(dev);
513 /* run after a CARD_INSERTION event is received to configure the PCMCIA
514 * socket and make the device available to the system */
516 static int prism2_config_check(struct pcmcia_device *p_dev,
517 cistpl_cftable_entry_t *cfg,
518 cistpl_cftable_entry_t *dflt,
525 PDEBUG(DEBUG_EXTRA, "Checking CFTABLE_ENTRY 0x%02X "
526 "(default 0x%02X)\n", cfg->index, dflt->index);
528 /* Does this card need audio output? */
529 if (cfg->flags & CISTPL_CFTABLE_AUDIO) {
530 p_dev->conf.Attributes |= CONF_ENABLE_SPKR;
531 p_dev->conf.Status = CCSR_AUDIO_ENA;
534 /* Use power settings for Vcc and Vpp if present */
535 /* Note that the CIS values need to be rescaled */
536 if (cfg->vcc.present & (1 << CISTPL_POWER_VNOM)) {
537 if (vcc != cfg->vcc.param[CISTPL_POWER_VNOM] /
538 10000 && !ignore_cis_vcc) {
539 PDEBUG(DEBUG_EXTRA, " Vcc mismatch - skipping"
543 } else if (dflt->vcc.present & (1 << CISTPL_POWER_VNOM)) {
544 if (vcc != dflt->vcc.param[CISTPL_POWER_VNOM] /
545 10000 && !ignore_cis_vcc) {
546 PDEBUG(DEBUG_EXTRA, " Vcc (default) mismatch "
547 "- skipping this entry\n");
552 if (cfg->vpp1.present & (1 << CISTPL_POWER_VNOM))
553 p_dev->conf.Vpp = cfg->vpp1.param[CISTPL_POWER_VNOM] / 10000;
554 else if (dflt->vpp1.present & (1 << CISTPL_POWER_VNOM))
555 p_dev->conf.Vpp = dflt->vpp1.param[CISTPL_POWER_VNOM] / 10000;
557 /* Do we need to allocate an interrupt? */
558 p_dev->conf.Attributes |= CONF_ENABLE_IRQ;
560 /* IO window settings */
561 PDEBUG(DEBUG_EXTRA, "IO window settings: cfg->io.nwin=%d "
562 "dflt->io.nwin=%d\n",
563 cfg->io.nwin, dflt->io.nwin);
564 p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0;
565 if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) {
566 cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io;
567 p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
568 PDEBUG(DEBUG_EXTRA, "io->flags = 0x%04X, "
569 "io.base=0x%04x, len=%d\n", io->flags,
570 io->win[0].base, io->win[0].len);
571 if (!(io->flags & CISTPL_IO_8BIT))
572 p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_16;
573 if (!(io->flags & CISTPL_IO_16BIT))
574 p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
575 p_dev->io.IOAddrLines = io->flags &
576 CISTPL_IO_LINES_MASK;
577 p_dev->io.BasePort1 = io->win[0].base;
578 p_dev->io.NumPorts1 = io->win[0].len;
580 p_dev->io.Attributes2 = p_dev->io.Attributes1;
581 p_dev->io.BasePort2 = io->win[1].base;
582 p_dev->io.NumPorts2 = io->win[1].len;
586 /* This reserves IO space but doesn't actually enable it */
587 return pcmcia_request_io(p_dev, &p_dev->io);
590 static int prism2_config(struct pcmcia_device *link)
592 struct net_device *dev;
593 struct hostap_interface *iface;
596 struct hostap_cs_priv *hw_priv;
599 PDEBUG(DEBUG_FLOW, "prism2_config()\n");
601 hw_priv = kzalloc(sizeof(*hw_priv), GFP_KERNEL);
602 if (hw_priv == NULL) {
607 /* Look for an appropriate configuration table entry in the CIS */
608 ret = pcmcia_loop_config(link, prism2_config_check, NULL);
611 printk(KERN_ERR "GetNextTuple(): No matching "
612 "CIS configuration. Maybe you need the "
613 "ignore_cis_vcc=1 parameter.\n");
617 /* Need to allocate net_device before requesting IRQ handler */
618 dev = prism2_init_local_data(&prism2_pccard_funcs, 0,
624 iface = netdev_priv(dev);
625 local = iface->local;
626 local->hw_priv = hw_priv;
627 hw_priv->link = link;
630 * Make sure the IRQ handler cannot proceed until at least
631 * dev->base_addr is initialized.
633 spin_lock_irqsave(&local->irq_init_lock, flags);
635 ret = pcmcia_request_irq(link, prism2_interrupt);
640 * This actually configures the PCMCIA socket -- setting up
641 * the I/O windows and the interrupt mapping, and putting the
642 * card and host interface into "Memory and IO" mode.
644 ret = pcmcia_request_configuration(link, &link->conf);
648 dev->irq = link->irq;
649 dev->base_addr = link->io.BasePort1;
651 spin_unlock_irqrestore(&local->irq_init_lock, flags);
653 /* Finally, report what we've done */
654 printk(KERN_INFO "%s: index 0x%02x: ",
655 dev_info, link->conf.ConfigIndex);
657 printk(", Vpp %d.%d", link->conf.Vpp / 10,
658 link->conf.Vpp % 10);
659 if (link->conf.Attributes & CONF_ENABLE_IRQ)
660 printk(", irq %d", link->irq);
661 if (link->io.NumPorts1)
662 printk(", io 0x%04x-0x%04x", link->io.BasePort1,
663 link->io.BasePort1+link->io.NumPorts1-1);
664 if (link->io.NumPorts2)
665 printk(" & 0x%04x-0x%04x", link->io.BasePort2,
666 link->io.BasePort2+link->io.NumPorts2-1);
671 sandisk_enable_wireless(dev);
673 ret = prism2_hw_config(dev, 1);
675 ret = hostap_hw_ready(dev);
680 spin_unlock_irqrestore(&local->irq_init_lock, flags);
683 prism2_release((u_long)link);
688 static void prism2_release(u_long arg)
690 struct pcmcia_device *link = (struct pcmcia_device *)arg;
692 PDEBUG(DEBUG_FLOW, "prism2_release\n");
695 struct net_device *dev = link->priv;
696 struct hostap_interface *iface;
698 iface = netdev_priv(dev);
699 prism2_hw_shutdown(dev, 0);
700 iface->local->shutdown = 1;
703 pcmcia_disable_device(link);
704 PDEBUG(DEBUG_FLOW, "release - done\n");
707 static int hostap_cs_suspend(struct pcmcia_device *link)
709 struct net_device *dev = (struct net_device *) link->priv;
711 struct hostap_interface *iface = NULL;
716 iface = netdev_priv(dev);
718 PDEBUG(DEBUG_EXTRA, "%s: CS_EVENT_PM_SUSPEND\n", dev_info);
719 if (iface && iface->local)
720 dev_open = iface->local->num_dev_open > 0;
722 netif_stop_queue(dev);
723 netif_device_detach(dev);
730 static int hostap_cs_resume(struct pcmcia_device *link)
732 struct net_device *dev = (struct net_device *) link->priv;
734 struct hostap_interface *iface = NULL;
739 iface = netdev_priv(dev);
741 PDEBUG(DEBUG_EXTRA, "%s: CS_EVENT_PM_RESUME\n", dev_info);
743 if (iface && iface->local)
744 dev_open = iface->local->num_dev_open > 0;
746 prism2_hw_shutdown(dev, 1);
747 prism2_hw_config(dev, dev_open ? 0 : 1);
749 netif_device_attach(dev);
750 netif_start_queue(dev);
756 static struct pcmcia_device_id hostap_cs_ids[] = {
757 PCMCIA_DEVICE_MANF_CARD(0x000b, 0x7100),
758 PCMCIA_DEVICE_MANF_CARD(0x000b, 0x7300),
759 PCMCIA_DEVICE_MANF_CARD(0x0101, 0x0777),
760 PCMCIA_DEVICE_MANF_CARD(0x0126, 0x8000),
761 PCMCIA_DEVICE_MANF_CARD(0x0138, 0x0002),
762 PCMCIA_DEVICE_MANF_CARD(0x01bf, 0x3301),
763 PCMCIA_DEVICE_MANF_CARD(0x0250, 0x0002),
764 PCMCIA_DEVICE_MANF_CARD(0x026f, 0x030b),
765 PCMCIA_DEVICE_MANF_CARD(0x0274, 0x1612),
766 PCMCIA_DEVICE_MANF_CARD(0x0274, 0x1613),
767 PCMCIA_DEVICE_MANF_CARD(0x028a, 0x0002),
768 PCMCIA_DEVICE_MANF_CARD(0x02aa, 0x0002),
769 PCMCIA_DEVICE_MANF_CARD(0x02d2, 0x0001),
770 PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x0001),
771 PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x7300),
772 /* PCMCIA_DEVICE_MANF_CARD(0xc00f, 0x0000), conflict with pcnet_cs */
773 PCMCIA_DEVICE_MANF_CARD(0xc250, 0x0002),
774 PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0002),
775 PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0005),
776 PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0010),
777 PCMCIA_DEVICE_MANF_CARD(0x0126, 0x0002),
778 PCMCIA_DEVICE_MANF_CARD_PROD_ID1(0xd601, 0x0005, "ADLINK 345 CF",
780 PCMCIA_DEVICE_MANF_CARD_PROD_ID1(0x0156, 0x0002, "INTERSIL",
782 PCMCIA_DEVICE_MANF_CARD_PROD_ID1(0x0156, 0x0002, "Intersil",
784 PCMCIA_MFC_DEVICE_PROD_ID12(0, "SanDisk", "ConnectPlus",
785 0x7a954bd9, 0x74be00c6),
786 PCMCIA_DEVICE_PROD_ID123(
787 "Addtron", "AWP-100 Wireless PCMCIA", "Version 01.02",
788 0xe6ec52ce, 0x08649af2, 0x4b74baa0),
789 PCMCIA_DEVICE_PROD_ID123(
790 "D", "Link DWL-650 11Mbps WLAN Card", "Version 01.02",
791 0x71b18589, 0xb6f1b0ab, 0x4b74baa0),
792 PCMCIA_DEVICE_PROD_ID123(
793 "Instant Wireless ", " Network PC CARD", "Version 01.02",
794 0x11d901af, 0x6e9bd926, 0x4b74baa0),
795 PCMCIA_DEVICE_PROD_ID123(
796 "SMC", "SMC2632W", "Version 01.02",
797 0xc4f8b18b, 0x474a1f2a, 0x4b74baa0),
798 PCMCIA_DEVICE_PROD_ID12("BUFFALO", "WLI-CF-S11G",
799 0x2decece3, 0x82067c18),
800 PCMCIA_DEVICE_PROD_ID12("Compaq", "WL200_11Mbps_Wireless_PCI_Card",
801 0x54f7c49c, 0x15a75e5b),
802 PCMCIA_DEVICE_PROD_ID12("INTERSIL", "HFA384x/IEEE",
803 0x74c5e40d, 0xdb472a18),
804 PCMCIA_DEVICE_PROD_ID12("Linksys", "Wireless CompactFlash Card",
805 0x0733cc81, 0x0c52f395),
806 PCMCIA_DEVICE_PROD_ID12(
807 "ZoomAir 11Mbps High", "Rate wireless Networking",
808 0x273fe3db, 0x32a1eaee),
809 PCMCIA_DEVICE_PROD_ID123(
810 "Pretec", "CompactWLAN Card 802.11b", "2.5",
811 0x1cadd3e5, 0xe697636c, 0x7a5bfcf1),
812 PCMCIA_DEVICE_PROD_ID123(
813 "U.S. Robotics", "IEEE 802.11b PC-CARD", "Version 01.02",
814 0xc7b8df9d, 0x1700d087, 0x4b74baa0),
815 PCMCIA_DEVICE_PROD_ID123(
816 "Allied Telesyn", "AT-WCL452 Wireless PCMCIA Radio",
818 0x5cd01705, 0x4271660f, 0x9d08ee12),
819 PCMCIA_DEVICE_PROD_ID123(
820 "Wireless LAN" , "11Mbps PC Card", "Version 01.02",
821 0x4b8870ff, 0x70e946d1, 0x4b74baa0),
822 PCMCIA_DEVICE_PROD_ID3("HFA3863", 0x355cb092),
823 PCMCIA_DEVICE_PROD_ID3("ISL37100P", 0x630d52b2),
824 PCMCIA_DEVICE_PROD_ID3("ISL37101P-10", 0xdd97a26b),
825 PCMCIA_DEVICE_PROD_ID3("ISL37300P", 0xc9049a39),
828 MODULE_DEVICE_TABLE(pcmcia, hostap_cs_ids);
831 static struct pcmcia_driver hostap_driver = {
835 .probe = hostap_cs_probe,
836 .remove = prism2_detach,
837 .owner = THIS_MODULE,
838 .id_table = hostap_cs_ids,
839 .suspend = hostap_cs_suspend,
840 .resume = hostap_cs_resume,
843 static int __init init_prism2_pccard(void)
845 return pcmcia_register_driver(&hostap_driver);
848 static void __exit exit_prism2_pccard(void)
850 pcmcia_unregister_driver(&hostap_driver);
854 module_init(init_prism2_pccard);
855 module_exit(exit_prism2_pccard);