aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorVasanthakumar Thiagarajan <vasanth@atheros.com>2010-09-21 01:54:46 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-09-24 15:54:31 -0400
commit9094537c3a9ef9e127e844254a74186735c9a90b (patch)
tree22152ac2014faba77fc4def307deedf35d13d389 /drivers
parenteb7d3066cf864342e8ae6a5c1126a1602c4d06c0 (diff)
ath9k: Fix tx struck state with paprd
Paprd needs to be done only on active chains(not for all the chains that hw can support). The paprd training frames which are sent for inactive chains would be hanging on the hw queue without getting transmitted and would make the connection so unstable. This issue happens only with the hw which supports paprd cal(ar9003). Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 8b327bcad69..a1338788263 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -270,6 +270,7 @@ static void ath_paprd_activate(struct ath_softc *sc)
270{ 270{
271 struct ath_hw *ah = sc->sc_ah; 271 struct ath_hw *ah = sc->sc_ah;
272 struct ath9k_hw_cal_data *caldata = ah->caldata; 272 struct ath9k_hw_cal_data *caldata = ah->caldata;
273 struct ath_common *common = ath9k_hw_common(ah);
273 int chain; 274 int chain;
274 275
275 if (!caldata || !caldata->paprd_done) 276 if (!caldata || !caldata->paprd_done)
@@ -278,7 +279,7 @@ static void ath_paprd_activate(struct ath_softc *sc)
278 ath9k_ps_wakeup(sc); 279 ath9k_ps_wakeup(sc);
279 ar9003_paprd_enable(ah, false); 280 ar9003_paprd_enable(ah, false);
280 for (chain = 0; chain < AR9300_MAX_CHAINS; chain++) { 281 for (chain = 0; chain < AR9300_MAX_CHAINS; chain++) {
281 if (!(ah->caps.tx_chainmask & BIT(chain))) 282 if (!(common->tx_chainmask & BIT(chain)))
282 continue; 283 continue;
283 284
284 ar9003_paprd_populate_single_table(ah, caldata, chain); 285 ar9003_paprd_populate_single_table(ah, caldata, chain);
@@ -300,6 +301,7 @@ void ath_paprd_calibrate(struct work_struct *work)
300 struct ieee80211_supported_band *sband = &sc->sbands[band]; 301 struct ieee80211_supported_band *sband = &sc->sbands[band];
301 struct ath_tx_control txctl; 302 struct ath_tx_control txctl;
302 struct ath9k_hw_cal_data *caldata = ah->caldata; 303 struct ath9k_hw_cal_data *caldata = ah->caldata;
304 struct ath_common *common = ath9k_hw_common(ah);
303 int qnum, ftype; 305 int qnum, ftype;
304 int chain_ok = 0; 306 int chain_ok = 0;
305 int chain; 307 int chain;
@@ -333,7 +335,7 @@ void ath_paprd_calibrate(struct work_struct *work)
333 ath9k_ps_wakeup(sc); 335 ath9k_ps_wakeup(sc);
334 ar9003_paprd_init_table(ah); 336 ar9003_paprd_init_table(ah);
335 for (chain = 0; chain < AR9300_MAX_CHAINS; chain++) { 337 for (chain = 0; chain < AR9300_MAX_CHAINS; chain++) {
336 if (!(ah->caps.tx_chainmask & BIT(chain))) 338 if (!(common->tx_chainmask & BIT(chain)))
337 continue; 339 continue;
338 340
339 chain_ok = 0; 341 chain_ok = 0;