===================================================================
@@ -223,6 +223,7 @@
int ath5k_hw_set_power(struct ath5k_hw *ah, enum ath5k_power_mode mode,
bool set_chip, u16 sleep_duration)
{
+ struct pci_dev *pdev = ah->ah_sc->pdev;
unsigned int i;
u32 staid, data;
@@ -273,7 +274,7 @@
AR5K_SLEEP_CTL);
udelay(15);
- for (i = 200; i > 0; i--) {
+ for (i = 20000; i > 0; i--) {
/* Check if the chip did wake up */
if ((ath5k_hw_reg_read(ah, AR5K_PCICFG) &
AR5K_PCICFG_SPWR_DN) == 0)
@@ -286,8 +287,13 @@
}
/* Fail if the chip didn't wake up */
- if (i == 0)
+ if (i == 0) {
+ u32 val;
+ int res = pci_read_config_dword(pdev, PCI_STATUS, &val);
+ printk("%d, 0x%08X\n", res, val);
return -EIO;
+ }
+ printk("Wakeup %d\n", i);
break;