hostap_cs.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711
  1. #define PRISM2_PCCARD
  2. #include <linux/module.h>
  3. #include <linux/if.h>
  4. #include <linux/slab.h>
  5. #include <linux/wait.h>
  6. #include <linux/timer.h>
  7. #include <linux/skbuff.h>
  8. #include <linux/netdevice.h>
  9. #include <linux/workqueue.h>
  10. #include <linux/wireless.h>
  11. #include <net/iw_handler.h>
  12. #include <pcmcia/cistpl.h>
  13. #include <pcmcia/cisreg.h>
  14. #include <pcmcia/ds.h>
  15. #include <asm/io.h>
  16. #include "hostap_wlan.h"
  17. static char *dev_info = "hostap_cs";
  18. MODULE_AUTHOR("Jouni Malinen");
  19. MODULE_DESCRIPTION("Support for Intersil Prism2-based 802.11 wireless LAN "
  20. "cards (PC Card).");
  21. MODULE_SUPPORTED_DEVICE("Intersil Prism2-based WLAN cards (PC Card)");
  22. MODULE_LICENSE("GPL");
  23. static int ignore_cis_vcc;
  24. module_param(ignore_cis_vcc, int, 0444);
  25. MODULE_PARM_DESC(ignore_cis_vcc, "Ignore broken CIS VCC entry");
  26. /* struct local_info::hw_priv */
  27. struct hostap_cs_priv {
  28. struct pcmcia_device *link;
  29. int sandisk_connectplus;
  30. };
  31. #ifdef PRISM2_IO_DEBUG
  32. static inline void hfa384x_outb_debug(struct net_device *dev, int a, u8 v)
  33. {
  34. struct hostap_interface *iface;
  35. local_info_t *local;
  36. unsigned long flags;
  37. iface = netdev_priv(dev);
  38. local = iface->local;
  39. spin_lock_irqsave(&local->lock, flags);
  40. prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_OUTB, a, v);
  41. outb(v, dev->base_addr + a);
  42. spin_unlock_irqrestore(&local->lock, flags);
  43. }
  44. static inline u8 hfa384x_inb_debug(struct net_device *dev, int a)
  45. {
  46. struct hostap_interface *iface;
  47. local_info_t *local;
  48. unsigned long flags;
  49. u8 v;
  50. iface = netdev_priv(dev);
  51. local = iface->local;
  52. spin_lock_irqsave(&local->lock, flags);
  53. v = inb(dev->base_addr + a);
  54. prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_INB, a, v);
  55. spin_unlock_irqrestore(&local->lock, flags);
  56. return v;
  57. }
  58. static inline void hfa384x_outw_debug(struct net_device *dev, int a, u16 v)
  59. {
  60. struct hostap_interface *iface;
  61. local_info_t *local;
  62. unsigned long flags;
  63. iface = netdev_priv(dev);
  64. local = iface->local;
  65. spin_lock_irqsave(&local->lock, flags);
  66. prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_OUTW, a, v);
  67. outw(v, dev->base_addr + a);
  68. spin_unlock_irqrestore(&local->lock, flags);
  69. }
  70. static inline u16 hfa384x_inw_debug(struct net_device *dev, int a)
  71. {
  72. struct hostap_interface *iface;
  73. local_info_t *local;
  74. unsigned long flags;
  75. u16 v;
  76. iface = netdev_priv(dev);
  77. local = iface->local;
  78. spin_lock_irqsave(&local->lock, flags);
  79. v = inw(dev->base_addr + a);
  80. prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_INW, a, v);
  81. spin_unlock_irqrestore(&local->lock, flags);
  82. return v;
  83. }
  84. static inline void hfa384x_outsw_debug(struct net_device *dev, int a,
  85. u8 *buf, int wc)
  86. {
  87. struct hostap_interface *iface;
  88. local_info_t *local;
  89. unsigned long flags;
  90. iface = netdev_priv(dev);
  91. local = iface->local;
  92. spin_lock_irqsave(&local->lock, flags);
  93. prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_OUTSW, a, wc);
  94. outsw(dev->base_addr + a, buf, wc);
  95. spin_unlock_irqrestore(&local->lock, flags);
  96. }
  97. static inline void hfa384x_insw_debug(struct net_device *dev, int a,
  98. u8 *buf, int wc)
  99. {
  100. struct hostap_interface *iface;
  101. local_info_t *local;
  102. unsigned long flags;
  103. iface = netdev_priv(dev);
  104. local = iface->local;
  105. spin_lock_irqsave(&local->lock, flags);
  106. prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_INSW, a, wc);
  107. insw(dev->base_addr + a, buf, wc);
  108. spin_unlock_irqrestore(&local->lock, flags);
  109. }
  110. #define HFA384X_OUTB(v,a) hfa384x_outb_debug(dev, (a), (v))
  111. #define HFA384X_INB(a) hfa384x_inb_debug(dev, (a))
  112. #define HFA384X_OUTW(v,a) hfa384x_outw_debug(dev, (a), (v))
  113. #define HFA384X_INW(a) hfa384x_inw_debug(dev, (a))
  114. #define HFA384X_OUTSW(a, buf, wc) hfa384x_outsw_debug(dev, (a), (buf), (wc))
  115. #define HFA384X_INSW(a, buf, wc) hfa384x_insw_debug(dev, (a), (buf), (wc))
  116. #else /* PRISM2_IO_DEBUG */
  117. #define HFA384X_OUTB(v,a) outb((v), dev->base_addr + (a))
  118. #define HFA384X_INB(a) inb(dev->base_addr + (a))
  119. #define HFA384X_OUTW(v,a) outw((v), dev->base_addr + (a))
  120. #define HFA384X_INW(a) inw(dev->base_addr + (a))
  121. #define HFA384X_INSW(a, buf, wc) insw(dev->base_addr + (a), buf, wc)
  122. #define HFA384X_OUTSW(a, buf, wc) outsw(dev->base_addr + (a), buf, wc)
  123. #endif /* PRISM2_IO_DEBUG */
  124. static int hfa384x_from_bap(struct net_device *dev, u16 bap, void *buf,
  125. int len)
  126. {
  127. u16 d_off;
  128. u16 *pos;
  129. d_off = (bap == 1) ? HFA384X_DATA1_OFF : HFA384X_DATA0_OFF;
  130. pos = (u16 *) buf;
  131. if (len / 2)
  132. HFA384X_INSW(d_off, buf, len / 2);
  133. pos += len / 2;
  134. if (len & 1)
  135. *((char *) pos) = HFA384X_INB(d_off);
  136. return 0;
  137. }
  138. static int hfa384x_to_bap(struct net_device *dev, u16 bap, void *buf, int len)
  139. {
  140. u16 d_off;
  141. u16 *pos;
  142. d_off = (bap == 1) ? HFA384X_DATA1_OFF : HFA384X_DATA0_OFF;
  143. pos = (u16 *) buf;
  144. if (len / 2)
  145. HFA384X_OUTSW(d_off, buf, len / 2);
  146. pos += len / 2;
  147. if (len & 1)
  148. HFA384X_OUTB(*((char *) pos), d_off);
  149. return 0;
  150. }
  151. /* FIX: This might change at some point.. */
  152. #include "hostap_hw.c"
  153. static void prism2_detach(struct pcmcia_device *p_dev);
  154. static void prism2_release(u_long arg);
  155. static int prism2_config(struct pcmcia_device *link);
  156. static int prism2_pccard_card_present(local_info_t *local)
  157. {
  158. struct hostap_cs_priv *hw_priv = local->hw_priv;
  159. if (hw_priv != NULL && hw_priv->link != NULL && pcmcia_dev_present(hw_priv->link))
  160. return 1;
  161. return 0;
  162. }
  163. /*
  164. * SanDisk CompactFlash WLAN Flashcard - Product Manual v1.0
  165. * Document No. 20-10-00058, January 2004
  166. * http://www.sandisk.com/pdf/industrial/ProdManualCFWLANv1.0.pdf
  167. */
  168. #define SANDISK_WLAN_ACTIVATION_OFF 0x40
  169. #define SANDISK_HCR_OFF 0x42
  170. static void sandisk_set_iobase(local_info_t *local)
  171. {
  172. int res;
  173. struct hostap_cs_priv *hw_priv = local->hw_priv;
  174. res = pcmcia_write_config_byte(hw_priv->link, 0x10,
  175. hw_priv->link->resource[0]->start & 0x00ff);
  176. if (res != 0) {
  177. printk(KERN_DEBUG "Prism3 SanDisk - failed to set I/O base 0 -"
  178. " res=%d\n", res);
  179. }
  180. udelay(10);
  181. res = pcmcia_write_config_byte(hw_priv->link, 0x12,
  182. (hw_priv->link->resource[0]->start >> 8) & 0x00ff);
  183. if (res != 0) {
  184. printk(KERN_DEBUG "Prism3 SanDisk - failed to set I/O base 1 -"
  185. " res=%d\n", res);
  186. }
  187. }
  188. static void sandisk_write_hcr(local_info_t *local, int hcr)
  189. {
  190. struct net_device *dev = local->dev;
  191. int i;
  192. HFA384X_OUTB(0x80, SANDISK_WLAN_ACTIVATION_OFF);
  193. udelay(50);
  194. for (i = 0; i < 10; i++) {
  195. HFA384X_OUTB(hcr, SANDISK_HCR_OFF);
  196. }
  197. udelay(55);
  198. HFA384X_OUTB(0x45, SANDISK_WLAN_ACTIVATION_OFF);
  199. }
  200. static int sandisk_enable_wireless(struct net_device *dev)
  201. {
  202. int res, ret = 0;
  203. struct hostap_interface *iface = netdev_priv(dev);
  204. local_info_t *local = iface->local;
  205. struct hostap_cs_priv *hw_priv = local->hw_priv;
  206. if (resource_size(hw_priv->link->resource[0]) < 0x42) {
  207. /* Not enough ports to be SanDisk multi-function card */
  208. ret = -ENODEV;
  209. goto done;
  210. }
  211. if (hw_priv->link->manf_id != 0xd601 || hw_priv->link->card_id != 0x0101) {
  212. /* No SanDisk manfid found */
  213. ret = -ENODEV;
  214. goto done;
  215. }
  216. if (hw_priv->link->socket->functions < 2) {
  217. /* No multi-function links found */
  218. ret = -ENODEV;
  219. goto done;
  220. }
  221. printk(KERN_DEBUG "%s: Multi-function SanDisk ConnectPlus detected"
  222. " - using vendor-specific initialization\n", dev->name);
  223. hw_priv->sandisk_connectplus = 1;
  224. res = pcmcia_write_config_byte(hw_priv->link, CISREG_COR,
  225. COR_SOFT_RESET);
  226. if (res != 0) {
  227. printk(KERN_DEBUG "%s: SanDisk - COR sreset failed (%d)\n",
  228. dev->name, res);
  229. goto done;
  230. }
  231. mdelay(5);
  232. /*
  233. * Do not enable interrupts here to avoid some bogus events. Interrupts
  234. * will be enabled during the first cor_sreset call.
  235. */
  236. res = pcmcia_write_config_byte(hw_priv->link, CISREG_COR,
  237. (COR_LEVEL_REQ | 0x8 | COR_ADDR_DECODE |
  238. COR_FUNC_ENA));
  239. if (res != 0) {
  240. printk(KERN_DEBUG "%s: SanDisk - COR sreset failed (%d)\n",
  241. dev->name, res);
  242. goto done;
  243. }
  244. mdelay(5);
  245. sandisk_set_iobase(local);
  246. HFA384X_OUTB(0xc5, SANDISK_WLAN_ACTIVATION_OFF);
  247. udelay(10);
  248. HFA384X_OUTB(0x4b, SANDISK_WLAN_ACTIVATION_OFF);
  249. udelay(10);
  250. done:
  251. return ret;
  252. }
  253. static void prism2_pccard_cor_sreset(local_info_t *local)
  254. {
  255. int res;
  256. u8 val;
  257. struct hostap_cs_priv *hw_priv = local->hw_priv;
  258. if (!prism2_pccard_card_present(local))
  259. return;
  260. res = pcmcia_read_config_byte(hw_priv->link, CISREG_COR, &val);
  261. if (res != 0) {
  262. printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 1 (%d)\n",
  263. res);
  264. return;
  265. }
  266. printk(KERN_DEBUG "prism2_pccard_cor_sreset: original COR %02x\n",
  267. val);
  268. val |= COR_SOFT_RESET;
  269. res = pcmcia_write_config_byte(hw_priv->link, CISREG_COR, val);
  270. if (res != 0) {
  271. printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 2 (%d)\n",
  272. res);
  273. return;
  274. }
  275. mdelay(hw_priv->sandisk_connectplus ? 5 : 2);
  276. val &= ~COR_SOFT_RESET;
  277. if (hw_priv->sandisk_connectplus)
  278. val |= COR_IREQ_ENA;
  279. res = pcmcia_write_config_byte(hw_priv->link, CISREG_COR, val);
  280. if (res != 0) {
  281. printk(KERN_DEBUG "prism2_pccard_cor_sreset failed 3 (%d)\n",
  282. res);
  283. return;
  284. }
  285. mdelay(hw_priv->sandisk_connectplus ? 5 : 2);
  286. if (hw_priv->sandisk_connectplus)
  287. sandisk_set_iobase(local);
  288. }
  289. static void prism2_pccard_genesis_reset(local_info_t *local, int hcr)
  290. {
  291. int res;
  292. u8 old_cor;
  293. struct hostap_cs_priv *hw_priv = local->hw_priv;
  294. if (!prism2_pccard_card_present(local))
  295. return;
  296. if (hw_priv->sandisk_connectplus) {
  297. sandisk_write_hcr(local, hcr);
  298. return;
  299. }
  300. res = pcmcia_read_config_byte(hw_priv->link, CISREG_COR, &old_cor);
  301. if (res != 0) {
  302. printk(KERN_DEBUG "%s failed 1 (%d)\n", __func__, res);
  303. return;
  304. }
  305. printk(KERN_DEBUG "%s: original COR %02x\n", __func__, old_cor);
  306. res = pcmcia_write_config_byte(hw_priv->link, CISREG_COR,
  307. old_cor | COR_SOFT_RESET);
  308. if (res != 0) {
  309. printk(KERN_DEBUG "%s failed 2 (%d)\n", __func__, res);
  310. return;
  311. }
  312. mdelay(10);
  313. /* Setup Genesis mode */
  314. res = pcmcia_write_config_byte(hw_priv->link, CISREG_CCSR, hcr);
  315. if (res != 0) {
  316. printk(KERN_DEBUG "%s failed 3 (%d)\n", __func__, res);
  317. return;
  318. }
  319. mdelay(10);
  320. res = pcmcia_write_config_byte(hw_priv->link, CISREG_COR,
  321. old_cor & ~COR_SOFT_RESET);
  322. if (res != 0) {
  323. printk(KERN_DEBUG "%s failed 4 (%d)\n", __func__, res);
  324. return;
  325. }
  326. mdelay(10);
  327. }
  328. static struct prism2_helper_functions prism2_pccard_funcs =
  329. {
  330. .card_present = prism2_pccard_card_present,
  331. .cor_sreset = prism2_pccard_cor_sreset,
  332. .genesis_reset = prism2_pccard_genesis_reset,
  333. .hw_type = HOSTAP_HW_PCCARD,
  334. };
  335. /* allocate local data and register with CardServices
  336. * initialize dev_link structure, but do not configure the card yet */
  337. static int hostap_cs_probe(struct pcmcia_device *p_dev)
  338. {
  339. int ret;
  340. PDEBUG(DEBUG_HW, "%s: setting Vcc=33 (constant)\n", dev_info);
  341. ret = prism2_config(p_dev);
  342. if (ret) {
  343. PDEBUG(DEBUG_EXTRA, "prism2_config() failed\n");
  344. }
  345. return ret;
  346. }
  347. static void prism2_detach(struct pcmcia_device *link)
  348. {
  349. PDEBUG(DEBUG_FLOW, "prism2_detach\n");
  350. prism2_release((u_long)link);
  351. /* release net devices */
  352. if (link->priv) {
  353. struct hostap_cs_priv *hw_priv;
  354. struct net_device *dev;
  355. struct hostap_interface *iface;
  356. dev = link->priv;
  357. iface = netdev_priv(dev);
  358. hw_priv = iface->local->hw_priv;
  359. prism2_free_local_data(dev);
  360. kfree(hw_priv);
  361. }
  362. }
  363. static int prism2_config_check(struct pcmcia_device *p_dev, void *priv_data)
  364. {
  365. if (p_dev->config_index == 0)
  366. return -EINVAL;
  367. return pcmcia_request_io(p_dev);
  368. }
  369. static int prism2_config(struct pcmcia_device *link)
  370. {
  371. struct net_device *dev;
  372. struct hostap_interface *iface;
  373. local_info_t *local;
  374. int ret;
  375. struct hostap_cs_priv *hw_priv;
  376. unsigned long flags;
  377. PDEBUG(DEBUG_FLOW, "prism2_config()\n");
  378. hw_priv = kzalloc(sizeof(*hw_priv), GFP_KERNEL);
  379. if (hw_priv == NULL) {
  380. ret = -ENOMEM;
  381. goto failed;
  382. }
  383. /* Look for an appropriate configuration table entry in the CIS */
  384. link->config_flags |= CONF_AUTO_SET_VPP | CONF_AUTO_AUDIO |
  385. CONF_AUTO_CHECK_VCC | CONF_AUTO_SET_IO | CONF_ENABLE_IRQ;
  386. if (ignore_cis_vcc)
  387. link->config_flags &= ~CONF_AUTO_CHECK_VCC;
  388. ret = pcmcia_loop_config(link, prism2_config_check, NULL);
  389. if (ret) {
  390. if (!ignore_cis_vcc)
  391. printk(KERN_ERR "GetNextTuple(): No matching "
  392. "CIS configuration. Maybe you need the "
  393. "ignore_cis_vcc=1 parameter.\n");
  394. goto failed;
  395. }
  396. /* Need to allocate net_device before requesting IRQ handler */
  397. dev = prism2_init_local_data(&prism2_pccard_funcs, 0,
  398. &link->dev);
  399. if (!dev) {
  400. ret = -ENOMEM;
  401. goto failed;
  402. }
  403. link->priv = dev;
  404. iface = netdev_priv(dev);
  405. local = iface->local;
  406. local->hw_priv = hw_priv;
  407. hw_priv->link = link;
  408. /*
  409. * We enable IRQ here, but IRQ handler will not proceed
  410. * until dev->base_addr is set below. This protect us from
  411. * receive interrupts when driver is not initialized.
  412. */
  413. ret = pcmcia_request_irq(link, prism2_interrupt);
  414. if (ret)
  415. goto failed;
  416. ret = pcmcia_enable_device(link);
  417. if (ret)
  418. goto failed;
  419. spin_lock_irqsave(&local->irq_init_lock, flags);
  420. dev->irq = link->irq;
  421. dev->base_addr = link->resource[0]->start;
  422. spin_unlock_irqrestore(&local->irq_init_lock, flags);
  423. local->shutdown = 0;
  424. sandisk_enable_wireless(dev);
  425. ret = prism2_hw_config(dev, 1);
  426. if (!ret)
  427. ret = hostap_hw_ready(dev);
  428. return ret;
  429. failed:
  430. kfree(hw_priv);
  431. prism2_release((u_long)link);
  432. return ret;
  433. }
  434. static void prism2_release(u_long arg)
  435. {
  436. struct pcmcia_device *link = (struct pcmcia_device *)arg;
  437. PDEBUG(DEBUG_FLOW, "prism2_release\n");
  438. if (link->priv) {
  439. struct net_device *dev = link->priv;
  440. struct hostap_interface *iface;
  441. iface = netdev_priv(dev);
  442. prism2_hw_shutdown(dev, 0);
  443. iface->local->shutdown = 1;
  444. }
  445. pcmcia_disable_device(link);
  446. PDEBUG(DEBUG_FLOW, "release - done\n");
  447. }
  448. static int hostap_cs_suspend(struct pcmcia_device *link)
  449. {
  450. struct net_device *dev = (struct net_device *) link->priv;
  451. int dev_open = 0;
  452. struct hostap_interface *iface = NULL;
  453. if (!dev)
  454. return -ENODEV;
  455. iface = netdev_priv(dev);
  456. PDEBUG(DEBUG_EXTRA, "%s: CS_EVENT_PM_SUSPEND\n", dev_info);
  457. if (iface && iface->local)
  458. dev_open = iface->local->num_dev_open > 0;
  459. if (dev_open) {
  460. netif_stop_queue(dev);
  461. netif_device_detach(dev);
  462. }
  463. prism2_suspend(dev);
  464. return 0;
  465. }
  466. static int hostap_cs_resume(struct pcmcia_device *link)
  467. {
  468. struct net_device *dev = (struct net_device *) link->priv;
  469. int dev_open = 0;
  470. struct hostap_interface *iface = NULL;
  471. if (!dev)
  472. return -ENODEV;
  473. iface = netdev_priv(dev);
  474. PDEBUG(DEBUG_EXTRA, "%s: CS_EVENT_PM_RESUME\n", dev_info);
  475. if (iface && iface->local)
  476. dev_open = iface->local->num_dev_open > 0;
  477. prism2_hw_shutdown(dev, 1);
  478. prism2_hw_config(dev, dev_open ? 0 : 1);
  479. if (dev_open) {
  480. netif_device_attach(dev);
  481. netif_start_queue(dev);
  482. }
  483. return 0;
  484. }
  485. static const struct pcmcia_device_id hostap_cs_ids[] = {
  486. PCMCIA_DEVICE_MANF_CARD(0x000b, 0x7100),
  487. PCMCIA_DEVICE_MANF_CARD(0x000b, 0x7300),
  488. PCMCIA_DEVICE_MANF_CARD(0x0101, 0x0777),
  489. PCMCIA_DEVICE_MANF_CARD(0x0126, 0x8000),
  490. PCMCIA_DEVICE_MANF_CARD(0x0138, 0x0002),
  491. PCMCIA_DEVICE_MANF_CARD(0x01bf, 0x3301),
  492. PCMCIA_DEVICE_MANF_CARD(0x0250, 0x0002),
  493. PCMCIA_DEVICE_MANF_CARD(0x026f, 0x030b),
  494. PCMCIA_DEVICE_MANF_CARD(0x0274, 0x1612),
  495. PCMCIA_DEVICE_MANF_CARD(0x0274, 0x1613),
  496. PCMCIA_DEVICE_MANF_CARD(0x028a, 0x0002),
  497. PCMCIA_DEVICE_MANF_CARD(0x02aa, 0x0002),
  498. PCMCIA_DEVICE_MANF_CARD(0x02d2, 0x0001),
  499. PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x0001),
  500. PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x7300),
  501. /* PCMCIA_DEVICE_MANF_CARD(0xc00f, 0x0000), conflict with pcnet_cs */
  502. PCMCIA_DEVICE_MANF_CARD(0xc250, 0x0002),
  503. PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0002),
  504. PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0005),
  505. PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0010),
  506. PCMCIA_DEVICE_MANF_CARD(0x0126, 0x0002),
  507. PCMCIA_DEVICE_MANF_CARD_PROD_ID1(0xd601, 0x0005, "ADLINK 345 CF",
  508. 0x2d858104),
  509. PCMCIA_DEVICE_MANF_CARD_PROD_ID1(0x0156, 0x0002, "INTERSIL",
  510. 0x74c5e40d),
  511. PCMCIA_DEVICE_MANF_CARD_PROD_ID1(0x0156, 0x0002, "Intersil",
  512. 0x4b801a17),
  513. PCMCIA_DEVICE_MANF_CARD_PROD_ID3(0x0156, 0x0002, "Version 01.02",
  514. 0x4b74baa0),
  515. PCMCIA_MFC_DEVICE_PROD_ID12(0, "SanDisk", "ConnectPlus",
  516. 0x7a954bd9, 0x74be00c6),
  517. PCMCIA_DEVICE_PROD_ID123(
  518. "Addtron", "AWP-100 Wireless PCMCIA", "Version 01.02",
  519. 0xe6ec52ce, 0x08649af2, 0x4b74baa0),
  520. PCMCIA_DEVICE_PROD_ID123(
  521. "Canon", "Wireless LAN CF Card K30225", "Version 01.00",
  522. 0x96ef6fe2, 0x263fcbab, 0xa57adb8c),
  523. PCMCIA_DEVICE_PROD_ID123(
  524. "D", "Link DWL-650 11Mbps WLAN Card", "Version 01.02",
  525. 0x71b18589, 0xb6f1b0ab, 0x4b74baa0),
  526. PCMCIA_DEVICE_PROD_ID123(
  527. "Instant Wireless ", " Network PC CARD", "Version 01.02",
  528. 0x11d901af, 0x6e9bd926, 0x4b74baa0),
  529. PCMCIA_DEVICE_PROD_ID123(
  530. "SMC", "SMC2632W", "Version 01.02",
  531. 0xc4f8b18b, 0x474a1f2a, 0x4b74baa0),
  532. PCMCIA_DEVICE_PROD_ID12("BUFFALO", "WLI-CF-S11G",
  533. 0x2decece3, 0x82067c18),
  534. PCMCIA_DEVICE_PROD_ID12("Compaq", "WL200_11Mbps_Wireless_PCI_Card",
  535. 0x54f7c49c, 0x15a75e5b),
  536. PCMCIA_DEVICE_PROD_ID12("INTERSIL", "HFA384x/IEEE",
  537. 0x74c5e40d, 0xdb472a18),
  538. PCMCIA_DEVICE_PROD_ID12("Linksys", "Wireless CompactFlash Card",
  539. 0x0733cc81, 0x0c52f395),
  540. PCMCIA_DEVICE_PROD_ID12(
  541. "ZoomAir 11Mbps High", "Rate wireless Networking",
  542. 0x273fe3db, 0x32a1eaee),
  543. PCMCIA_DEVICE_PROD_ID12("NETGEAR MA401 Wireless PC", "Card",
  544. 0xa37434e9, 0x9762e8f1),
  545. PCMCIA_DEVICE_PROD_ID123(
  546. "Pretec", "CompactWLAN Card 802.11b", "2.5",
  547. 0x1cadd3e5, 0xe697636c, 0x7a5bfcf1),
  548. PCMCIA_DEVICE_PROD_ID123(
  549. "U.S. Robotics", "IEEE 802.11b PC-CARD", "Version 01.02",
  550. 0xc7b8df9d, 0x1700d087, 0x4b74baa0),
  551. PCMCIA_DEVICE_PROD_ID123(
  552. "Allied Telesyn", "AT-WCL452 Wireless PCMCIA Radio",
  553. "Ver. 1.00",
  554. 0x5cd01705, 0x4271660f, 0x9d08ee12),
  555. PCMCIA_DEVICE_PROD_ID123(
  556. "Wireless LAN" , "11Mbps PC Card", "Version 01.02",
  557. 0x4b8870ff, 0x70e946d1, 0x4b74baa0),
  558. PCMCIA_DEVICE_PROD_ID3("HFA3863", 0x355cb092),
  559. PCMCIA_DEVICE_PROD_ID3("ISL37100P", 0x630d52b2),
  560. PCMCIA_DEVICE_PROD_ID3("ISL37101P-10", 0xdd97a26b),
  561. PCMCIA_DEVICE_PROD_ID3("ISL37300P", 0xc9049a39),
  562. PCMCIA_DEVICE_NULL
  563. };
  564. MODULE_DEVICE_TABLE(pcmcia, hostap_cs_ids);
  565. static struct pcmcia_driver hostap_driver = {
  566. .name = "hostap_cs",
  567. .probe = hostap_cs_probe,
  568. .remove = prism2_detach,
  569. .owner = THIS_MODULE,
  570. .id_table = hostap_cs_ids,
  571. .suspend = hostap_cs_suspend,
  572. .resume = hostap_cs_resume,
  573. };
  574. module_pcmcia_driver(hostap_driver);