• Home
  • Raw
  • Download

Lines Matching refs:rt2x00dev

25 static void rt2x00pci_free_reg(struct rt2x00_dev *rt2x00dev)  in rt2x00pci_free_reg()  argument
27 kfree(rt2x00dev->rf); in rt2x00pci_free_reg()
28 rt2x00dev->rf = NULL; in rt2x00pci_free_reg()
30 kfree(rt2x00dev->eeprom); in rt2x00pci_free_reg()
31 rt2x00dev->eeprom = NULL; in rt2x00pci_free_reg()
33 if (rt2x00dev->csr.base) { in rt2x00pci_free_reg()
34 iounmap(rt2x00dev->csr.base); in rt2x00pci_free_reg()
35 rt2x00dev->csr.base = NULL; in rt2x00pci_free_reg()
39 static int rt2x00pci_alloc_reg(struct rt2x00_dev *rt2x00dev) in rt2x00pci_alloc_reg() argument
41 struct pci_dev *pci_dev = to_pci_dev(rt2x00dev->dev); in rt2x00pci_alloc_reg()
43 rt2x00dev->csr.base = pci_ioremap_bar(pci_dev, 0); in rt2x00pci_alloc_reg()
44 if (!rt2x00dev->csr.base) in rt2x00pci_alloc_reg()
47 rt2x00dev->eeprom = kzalloc(rt2x00dev->ops->eeprom_size, GFP_KERNEL); in rt2x00pci_alloc_reg()
48 if (!rt2x00dev->eeprom) in rt2x00pci_alloc_reg()
51 rt2x00dev->rf = kzalloc(rt2x00dev->ops->rf_size, GFP_KERNEL); in rt2x00pci_alloc_reg()
52 if (!rt2x00dev->rf) in rt2x00pci_alloc_reg()
60 rt2x00pci_free_reg(rt2x00dev); in rt2x00pci_alloc_reg()
68 struct rt2x00_dev *rt2x00dev; in rt2x00pci_probe() local
104 rt2x00dev = hw->priv; in rt2x00pci_probe()
105 rt2x00dev->dev = &pci_dev->dev; in rt2x00pci_probe()
106 rt2x00dev->ops = ops; in rt2x00pci_probe()
107 rt2x00dev->hw = hw; in rt2x00pci_probe()
108 rt2x00dev->irq = pci_dev->irq; in rt2x00pci_probe()
109 rt2x00dev->name = ops->name; in rt2x00pci_probe()
112 rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCIE); in rt2x00pci_probe()
114 rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCI); in rt2x00pci_probe()
116 retval = rt2x00pci_alloc_reg(rt2x00dev); in rt2x00pci_probe()
126 rt2x00dev->chip.rt = chip; in rt2x00pci_probe()
128 retval = rt2x00lib_probe_dev(rt2x00dev); in rt2x00pci_probe()
135 rt2x00pci_free_reg(rt2x00dev); in rt2x00pci_probe()
154 struct rt2x00_dev *rt2x00dev = hw->priv; in rt2x00pci_remove() local
159 rt2x00lib_remove_dev(rt2x00dev); in rt2x00pci_remove()
160 rt2x00pci_free_reg(rt2x00dev); in rt2x00pci_remove()
175 struct rt2x00_dev *rt2x00dev = hw->priv; in rt2x00pci_suspend() local
177 return rt2x00lib_suspend(rt2x00dev); in rt2x00pci_suspend()
183 struct rt2x00_dev *rt2x00dev = hw->priv; in rt2x00pci_resume() local
185 return rt2x00lib_resume(rt2x00dev); in rt2x00pci_resume()