aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorVasanthakumar Thiagarajan <vasanth@atheros.com>2010-12-06 07:27:42 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-07 16:34:53 -0500
commit8060e169e02fe855f5533b5ef6af1f23ae2db0c4 (patch)
treed5a62855ccecce8743cb4fb1b95c3846d20b9571 /drivers/net/wireless
parent7f1c7a6ac57ff0482219aa3f62eb9d0f8fe65867 (diff)
ath9k: Enable extended synch for AR9485 to fix L0s recovery issue
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath/ath.h1
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c5
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.h2
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c3
-rw-r--r--drivers/net/wireless/ath/ath9k/pci.c12
5 files changed, 23 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h
index c914f5213c61..dd78ad13ea03 100644
--- a/drivers/net/wireless/ath/ath.h
+++ b/drivers/net/wireless/ath/ath.h
@@ -131,6 +131,7 @@ struct ath_bus_ops {
131 void (*read_cachesize)(struct ath_common *common, int *csz); 131 void (*read_cachesize)(struct ath_common *common, int *csz);
132 bool (*eeprom_read)(struct ath_common *common, u32 off, u16 *data); 132 bool (*eeprom_read)(struct ath_common *common, u32 off, u16 *data);
133 void (*bt_coex_prep)(struct ath_common *common); 133 void (*bt_coex_prep)(struct ath_common *common);
134 void (*extn_synch_en)(struct ath_common *common);
134}; 135};
135 136
136struct ath_common { 137struct ath_common {
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 66b4a2acafda..49da1849c7fe 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1971,6 +1971,11 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah)
1971 1971
1972 1972
1973 1973
1974 if (AR_SREV_9485_10(ah)) {
1975 pCap->pcie_lcr_extsync_en = true;
1976 pCap->pcie_lcr_offset = 0x80;
1977 }
1978
1974 return 0; 1979 return 0;
1975} 1980}
1976 1981
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 0649ae6b33dd..76ae3296e3fc 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -209,6 +209,8 @@ struct ath9k_hw_capabilities {
209 u8 rx_status_len; 209 u8 rx_status_len;
210 u8 tx_desc_len; 210 u8 tx_desc_len;
211 u8 txs_len; 211 u8 txs_len;
212 u16 pcie_lcr_offset;
213 bool pcie_lcr_extsync_en;
212}; 214};
213 215
214struct ath9k_ops_config { 216struct ath9k_ops_config {
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index a59cfce3335a..3e0c8a1874b4 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1179,6 +1179,9 @@ static int ath9k_start(struct ieee80211_hw *hw)
1179 1179
1180 pm_qos_update_request(&sc->pm_qos_req, 55); 1180 pm_qos_update_request(&sc->pm_qos_req, 55);
1181 1181
1182 if (ah->caps.pcie_lcr_extsync_en && common->bus_ops->extn_synch_en)
1183 common->bus_ops->extn_synch_en(common);
1184
1182mutex_unlock: 1185mutex_unlock:
1183 mutex_unlock(&sc->mutex); 1186 mutex_unlock(&sc->mutex);
1184 1187
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c
index 71339dab0860..38d2221241b8 100644
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
@@ -103,11 +103,23 @@ static void ath_pci_bt_coex_prep(struct ath_common *common)
103 pci_write_config_byte(pdev, ATH_PCIE_CAP_LINK_CTRL, aspm); 103 pci_write_config_byte(pdev, ATH_PCIE_CAP_LINK_CTRL, aspm);
104} 104}
105 105
106static void ath_pci_extn_synch_enable(struct ath_common *common)
107{
108 struct ath_softc *sc = (struct ath_softc *) common->priv;
109 struct pci_dev *pdev = to_pci_dev(sc->dev);
110 u8 lnkctl;
111
112 pci_read_config_byte(pdev, sc->sc_ah->caps.pcie_lcr_offset, &lnkctl);
113 lnkctl |= PCI_EXP_LNKCTL_ES;
114 pci_write_config_byte(pdev, sc->sc_ah->caps.pcie_lcr_offset, lnkctl);
115}
116
106static const struct ath_bus_ops ath_pci_bus_ops = { 117static const struct ath_bus_ops ath_pci_bus_ops = {
107 .ath_bus_type = ATH_PCI, 118 .ath_bus_type = ATH_PCI,
108 .read_cachesize = ath_pci_read_cachesize, 119 .read_cachesize = ath_pci_read_cachesize,
109 .eeprom_read = ath_pci_eeprom_read, 120 .eeprom_read = ath_pci_eeprom_read,
110 .bt_coex_prep = ath_pci_bt_coex_prep, 121 .bt_coex_prep = ath_pci_bt_coex_prep,
122 .extn_synch_en = ath_pci_extn_synch_enable,
111}; 123};
112 124
113static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) 125static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)