Lines Matching +full:no +full:- +full:memory +full:- +full:wc

1 // SPDX-License-Identifier: GPL-2.0-only
6 * - Host AP driver patch from james@madingley.org
7 * - linux-wlan-ng driver, Copyright (C) AbsoluteValue Systems, Inc.
31 MODULE_DESCRIPTION("Support for Intersil Prism2-based 802.11 wireless LAN "
33 MODULE_SUPPORTED_DEVICE("Intersil Prism2-based WLAN cards (PLX)");
68 PLXDEV(0x1562, 0x0001, "Symbol LA-4123"),
89 { 0x000b, 0x7110 } /* D-Link DWL-650 Rev. P1 */,
95 { 0x026f, 0x030b } /* Buffalo WLI-CF-S11G */,
98 { 0x028a, 0x0002 } /* D-Link DRC-650 */,
99 { 0x0250, 0x0002 } /* Samsung SWL2000-N */,
101 { 0xd601, 0x0002 } /* Z-Com XI300 */,
102 { 0xd601, 0x0005 } /* Zcomax XI-325H 200mW */,
116 local = iface->local; in hfa384x_outb_debug()
118 spin_lock_irqsave(&local->lock, flags); in hfa384x_outb_debug()
120 outb(v, dev->base_addr + a); in hfa384x_outb_debug()
121 spin_unlock_irqrestore(&local->lock, flags); in hfa384x_outb_debug()
132 local = iface->local; in hfa384x_inb_debug()
134 spin_lock_irqsave(&local->lock, flags); in hfa384x_inb_debug()
135 v = inb(dev->base_addr + a); in hfa384x_inb_debug()
137 spin_unlock_irqrestore(&local->lock, flags); in hfa384x_inb_debug()
148 local = iface->local; in hfa384x_outw_debug()
150 spin_lock_irqsave(&local->lock, flags); in hfa384x_outw_debug()
152 outw(v, dev->base_addr + a); in hfa384x_outw_debug()
153 spin_unlock_irqrestore(&local->lock, flags); in hfa384x_outw_debug()
164 local = iface->local; in hfa384x_inw_debug()
166 spin_lock_irqsave(&local->lock, flags); in hfa384x_inw_debug()
167 v = inw(dev->base_addr + a); in hfa384x_inw_debug()
169 spin_unlock_irqrestore(&local->lock, flags); in hfa384x_inw_debug()
174 u8 *buf, int wc) in hfa384x_outsw_debug() argument
181 local = iface->local; in hfa384x_outsw_debug()
183 spin_lock_irqsave(&local->lock, flags); in hfa384x_outsw_debug()
184 prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_OUTSW, a, wc); in hfa384x_outsw_debug()
185 outsw(dev->base_addr + a, buf, wc); in hfa384x_outsw_debug()
186 spin_unlock_irqrestore(&local->lock, flags); in hfa384x_outsw_debug()
190 u8 *buf, int wc) in hfa384x_insw_debug() argument
197 local = iface->local; in hfa384x_insw_debug()
199 spin_lock_irqsave(&local->lock, flags); in hfa384x_insw_debug()
200 prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_INSW, a, wc); in hfa384x_insw_debug()
201 insw(dev->base_addr + a, buf, wc); in hfa384x_insw_debug()
202 spin_unlock_irqrestore(&local->lock, flags); in hfa384x_insw_debug()
209 #define HFA384X_OUTSW(a, buf, wc) hfa384x_outsw_debug(dev, (a), (buf), (wc)) argument
210 #define HFA384X_INSW(a, buf, wc) hfa384x_insw_debug(dev, (a), (buf), (wc)) argument
214 #define HFA384X_OUTB(v,a) outb((v), dev->base_addr + (a))
215 #define HFA384X_INB(a) inb(dev->base_addr + (a))
216 #define HFA384X_OUTW(v,a) outw((v), dev->base_addr + (a))
217 #define HFA384X_INW(a) inw(dev->base_addr + (a))
218 #define HFA384X_INSW(a, buf, wc) insw(dev->base_addr + (a), buf, wc) argument
219 #define HFA384X_OUTSW(a, buf, wc) outsw(dev->base_addr + (a), buf, wc) argument
270 struct hostap_plx_priv *hw_priv = local->hw_priv; in prism2_plx_cor_sreset()
277 if (hw_priv->attr_mem == NULL) { in prism2_plx_cor_sreset()
278 /* TMD7160 - COR at card's first I/O addr */ in prism2_plx_cor_sreset()
279 corsave = inb(hw_priv->cor_offset); in prism2_plx_cor_sreset()
280 outb(corsave | COR_SRESET, hw_priv->cor_offset); in prism2_plx_cor_sreset()
282 outb(corsave & ~COR_SRESET, hw_priv->cor_offset); in prism2_plx_cor_sreset()
286 corsave = readb(hw_priv->attr_mem + hw_priv->cor_offset); in prism2_plx_cor_sreset()
288 hw_priv->attr_mem + hw_priv->cor_offset); in prism2_plx_cor_sreset()
291 hw_priv->attr_mem + hw_priv->cor_offset); in prism2_plx_cor_sreset()
300 struct hostap_plx_priv *hw_priv = local->hw_priv; in prism2_plx_genesis_reset()
302 if (hw_priv->attr_mem == NULL) { in prism2_plx_genesis_reset()
303 /* TMD7160 - COR at card's first I/O addr */ in prism2_plx_genesis_reset()
304 corsave = inb(hw_priv->cor_offset); in prism2_plx_genesis_reset()
305 outb(corsave | COR_SRESET, hw_priv->cor_offset); in prism2_plx_genesis_reset()
307 outb(hcr, hw_priv->cor_offset + 2); in prism2_plx_genesis_reset()
309 outb(corsave & ~COR_SRESET, hw_priv->cor_offset); in prism2_plx_genesis_reset()
313 corsave = readb(hw_priv->attr_mem + hw_priv->cor_offset); in prism2_plx_genesis_reset()
315 hw_priv->attr_mem + hw_priv->cor_offset); in prism2_plx_genesis_reset()
317 writeb(hcr, hw_priv->attr_mem + hw_priv->cor_offset + 2); in prism2_plx_genesis_reset()
320 hw_priv->attr_mem + hw_priv->cor_offset); in prism2_plx_genesis_reset()
350 return -ENOMEM; in prism2_plx_check_cis()
364 while (pos < CIS_MAX_LEN - 1 && cis[pos] != CISTPL_END) { in prism2_plx_check_cis()
387 return -1; in prism2_plx_check_cis()
407 for (manfid = prism2_plx_known_manfids; manfid->manfid1 != 0; manfid++) in prism2_plx_check_cis()
408 if (manfid1 == manfid->manfid1 && manfid2 == manfid->manfid2) { in prism2_plx_check_cis()
413 printk(KERN_INFO "%s: unknown manfid 0x%04x, 0x%04x - assuming this is" in prism2_plx_check_cis()
423 printk(KERN_INFO "%s: ignore_cis parameter set - ignoring " in prism2_plx_check_cis()
427 return -1; in prism2_plx_check_cis()
450 return -ENOMEM; in prism2_plx_probe()
456 tmd7160 = (pdev->vendor == 0x15e8) && (pdev->device == 0x0131); in prism2_plx_probe()
463 attr_mem = NULL; /* no access to PC Card attribute memory */ in prism2_plx_probe()
467 plx_ioaddr, pdev->irq, pccard_ioaddr); in prism2_plx_probe()
498 pccard_attr_mem, plx_ioaddr, pdev->irq, pccard_ioaddr); in prism2_plx_probe()
502 printk(KERN_INFO "Unknown PC Card CIS - not a " in prism2_plx_probe()
537 &pdev->dev); in prism2_plx_probe()
541 local = iface->local; in prism2_plx_probe()
542 local->hw_priv = hw_priv; in prism2_plx_probe()
545 dev->irq = pdev->irq; in prism2_plx_probe()
546 dev->base_addr = pccard_ioaddr; in prism2_plx_probe()
547 hw_priv->attr_mem = attr_mem; in prism2_plx_probe()
548 hw_priv->cor_offset = cor_offset; in prism2_plx_probe()
552 if (request_irq(dev->irq, prism2_interrupt, IRQF_SHARED, dev->name, in prism2_plx_probe()
554 printk(KERN_WARNING "%s: request_irq failed\n", dev->name); in prism2_plx_probe()
569 free_irq(dev->irq, dev); in prism2_plx_probe()
580 return -ENODEV; in prism2_plx_probe()
592 hw_priv = iface->local->hw_priv; in prism2_plx_remove()
595 prism2_plx_cor_sreset(iface->local); in prism2_plx_remove()
598 if (hw_priv->attr_mem) in prism2_plx_remove()
599 iounmap(hw_priv->attr_mem); in prism2_plx_remove()
600 if (dev->irq) in prism2_plx_remove()
601 free_irq(dev->irq, dev); in prism2_plx_remove()