Lines Matching +full:total +full:- +full:timeout

2  * Copyright (c) 2008-2009 Atheros Communications Inc.
33 { PCI_VDEVICE(ATHEROS, 0x0011) }, /* 5311 - this is on AHB bus !*/
45 { PCI_VDEVICE(ATHEROS, 0x001a) }, /* 2413 Griffin-lite */
47 { PCI_VDEVICE(ATHEROS, 0x001c) }, /* PCI-E cards */
57 struct ath5k_hw *ah = common->priv; in ath5k_pci_read_cachesize()
60 pci_read_config_byte(ah->pdev, PCI_CACHE_LINE_SIZE, &u8tmp); in ath5k_pci_read_cachesize()
79 struct ath5k_hw *ah = common->ah; in ath5k_pci_eeprom_read()
80 u32 status, timeout; in ath5k_pci_eeprom_read() local
85 if (ah->ah_version == AR5K_AR5210) { in ath5k_pci_eeprom_read()
94 for (timeout = AR5K_TUNE_REGISTER_TIMEOUT; timeout > 0; timeout--) { in ath5k_pci_eeprom_read()
111 ah->ah_mac_srev = ath5k_hw_reg_read(ah, AR5K_SREV); in ath5k_hw_read_srev()
121 u32 total, offset; in ath5k_pci_eeprom_read_mac() local
127 for (offset = 0x1f, octet = 0, total = 0; offset >= 0x1d; offset--) { in ath5k_pci_eeprom_read_mac()
130 total += data; in ath5k_pci_eeprom_read_mac()
136 if (!total || total == 3 * 0xffff) in ath5k_pci_eeprom_read_mac()
137 return -EINVAL; in ath5k_pci_eeprom_read_mac()
189 dev_err(&pdev->dev, "can't enable device\n"); in ath5k_pci_probe()
193 /* XXX 32-bit addressing only */ in ath5k_pci_probe()
194 ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)); in ath5k_pci_probe()
196 dev_err(&pdev->dev, "32-bit DMA not available\n"); in ath5k_pci_probe()
208 * register as a 16-bit wide register which is wrong. in ath5k_pci_probe()
234 dev_err(&pdev->dev, "cannot reserve PCI memory region\n"); in ath5k_pci_probe()
240 dev_err(&pdev->dev, "cannot remap PCI memory region\n"); in ath5k_pci_probe()
241 ret = -EIO; in ath5k_pci_probe()
247 * and hw->priv (driver private data) in ath5k_pci_probe()
251 dev_err(&pdev->dev, "cannot allocate ieee80211_hw\n"); in ath5k_pci_probe()
252 ret = -ENOMEM; in ath5k_pci_probe()
256 dev_info(&pdev->dev, "registered as '%s'\n", wiphy_name(hw->wiphy)); in ath5k_pci_probe()
258 ah = hw->priv; in ath5k_pci_probe()
259 ah->hw = hw; in ath5k_pci_probe()
260 ah->pdev = pdev; in ath5k_pci_probe()
261 ah->dev = &pdev->dev; in ath5k_pci_probe()
262 ah->irq = pdev->irq; in ath5k_pci_probe()
263 ah->devid = id->device; in ath5k_pci_probe()
264 ah->iobase = mem; /* So we can unmap it on detach */ in ath5k_pci_probe()
291 struct ath5k_hw *ah = hw->priv; in ath5k_pci_remove()
294 pci_iounmap(pdev, ah->iobase); in ath5k_pci_remove()
304 struct ath5k_hw *ah = hw->priv; in ath5k_pci_suspend()
314 struct ath5k_hw *ah = hw->priv; in ath5k_pci_resume()
318 * re-disable the RETRY_TIMEOUT register (0x41) to keep in ath5k_pci_resume()