diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2013-08-25 09:13:09 (GMT) |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-08-26 18:09:05 (GMT) |
commit | b380a43b52bee70f2e31ed573d33191efd82f5ae (patch) | |
tree | 1b05b7dd7a7ec9e85a8cdbdd92d44e65091c251f /drivers/net/wireless/ath/ath9k/pci.c | |
parent | 587b36d3642bdc921f4d624a740b6d91f779324b (diff) | |
download | linux-b380a43b52bee70f2e31ed573d33191efd82f5ae.tar.xz |
ath9k: Fix ASPM for AR9462
If the L1 entrance latency is not calibrated properly
in the EEPROM in WB222 boards, there could be problems
in connectivity. Check and correct the calibrated value
if it doesn't match the optimal value for WB222, 4us.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/pci.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/pci.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c index 3280798..e7996a6 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c @@ -314,6 +314,22 @@ static void ath_pci_aspm_init(struct ath_common *common) return; } + /* + * 0x70c - Ack Frequency Register. + * + * Bits 27:29 - DEFAULT_L1_ENTRANCE_LATENCY. + * + * 000 : 1 us + * 001 : 2 us + * 010 : 4 us + * 011 : 8 us + * 100 : 16 us + * 101 : 32 us + * 110/111 : 64 us + */ + if (AR_SREV_9462(ah)) + pci_read_config_dword(pdev, 0x70c, &ah->config.aspm_l1_fix); + pcie_capability_read_word(parent, PCI_EXP_LNKCTL, &aspm); if (aspm & (PCI_EXP_LNKCTL_ASPM_L0S | PCI_EXP_LNKCTL_ASPM_L1)) { ah->aspm_enabled = true; |