• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6.36/drivers/net/wireless/rt2x00/

Lines Matching refs:rt2x00dev

38 int rt2x00pci_regbusy_read(struct rt2x00_dev *rt2x00dev,
45 if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
49 rt2x00pci_register_read(rt2x00dev, offset, reg);
55 ERROR(rt2x00dev, "Indirect register access failed: "
63 void rt2x00pci_rxdone(struct rt2x00_dev *rt2x00dev)
65 struct data_queue *queue = rt2x00dev->rx;
74 if (rt2x00dev->ops->lib->get_entry_state(entry))
87 rt2x00lib_rxdone(rt2x00dev, entry);
95 static int rt2x00pci_alloc_queue_dma(struct rt2x00_dev *rt2x00dev,
106 addr = dma_alloc_coherent(rt2x00dev->dev,
126 static void rt2x00pci_free_queue_dma(struct rt2x00_dev *rt2x00dev,
133 dma_free_coherent(rt2x00dev->dev,
139 int rt2x00pci_initialize(struct rt2x00_dev *rt2x00dev)
147 queue_for_each(rt2x00dev, queue) {
148 status = rt2x00pci_alloc_queue_dma(rt2x00dev, queue);
156 status = request_threaded_irq(rt2x00dev->irq,
157 rt2x00dev->ops->lib->irq_handler,
158 rt2x00dev->ops->lib->irq_handler_thread,
159 IRQF_SHARED, rt2x00dev->name, rt2x00dev);
161 ERROR(rt2x00dev, "IRQ %d allocation failed (error %d).\n",
162 rt2x00dev->irq, status);
169 queue_for_each(rt2x00dev, queue)
170 rt2x00pci_free_queue_dma(rt2x00dev, queue);
176 void rt2x00pci_uninitialize(struct rt2x00_dev *rt2x00dev)
183 free_irq(rt2x00dev->irq, rt2x00dev);
188 queue_for_each(rt2x00dev, queue)
189 rt2x00pci_free_queue_dma(rt2x00dev, queue);
196 static void rt2x00pci_free_reg(struct rt2x00_dev *rt2x00dev)
198 kfree(rt2x00dev->rf);
199 rt2x00dev->rf = NULL;
201 kfree(rt2x00dev->eeprom);
202 rt2x00dev->eeprom = NULL;
204 if (rt2x00dev->csr.base) {
205 iounmap(rt2x00dev->csr.base);
206 rt2x00dev->csr.base = NULL;
210 static int rt2x00pci_alloc_reg(struct rt2x00_dev *rt2x00dev)
212 struct pci_dev *pci_dev = to_pci_dev(rt2x00dev->dev);
214 rt2x00dev->csr.base = pci_ioremap_bar(pci_dev, 0);
215 if (!rt2x00dev->csr.base)
218 rt2x00dev->eeprom = kzalloc(rt2x00dev->ops->eeprom_size, GFP_KERNEL);
219 if (!rt2x00dev->eeprom)
222 rt2x00dev->rf = kzalloc(rt2x00dev->ops->rf_size, GFP_KERNEL);
223 if (!rt2x00dev->rf)
231 rt2x00pci_free_reg(rt2x00dev);
240 struct rt2x00_dev *rt2x00dev;
275 rt2x00dev = hw->priv;
276 rt2x00dev->dev = &pci_dev->dev;
277 rt2x00dev->ops = ops;
278 rt2x00dev->hw = hw;
279 rt2x00dev->irq = pci_dev->irq;
280 rt2x00dev->name = pci_name(pci_dev);
283 rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCIE);
285 rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCI);
287 retval = rt2x00pci_alloc_reg(rt2x00dev);
291 retval = rt2x00lib_probe_dev(rt2x00dev);
298 rt2x00pci_free_reg(rt2x00dev);
318 struct rt2x00_dev *rt2x00dev = hw->priv;
323 rt2x00lib_remove_dev(rt2x00dev);
324 rt2x00pci_free_reg(rt2x00dev);
340 struct rt2x00_dev *rt2x00dev = hw->priv;
343 retval = rt2x00lib_suspend(rt2x00dev, state);
356 struct rt2x00_dev *rt2x00dev = hw->priv;
361 ERROR(rt2x00dev, "Failed to resume device.\n");
365 return rt2x00lib_resume(rt2x00dev);