hostap_cs.c 18 KB

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