Commit 9094537c authored by Vasanthakumar Thiagarajan's avatar Vasanthakumar Thiagarajan Committed by John W. Linville

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: default avatarVasanthakumar Thiagarajan <vasanth@atheros.com>
Cc: stable@kernel.org
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent eb7d3066
...@@ -270,6 +270,7 @@ static void ath_paprd_activate(struct ath_softc *sc) ...@@ -270,6 +270,7 @@ static void ath_paprd_activate(struct ath_softc *sc)
{ {
struct ath_hw *ah = sc->sc_ah; struct ath_hw *ah = sc->sc_ah;
struct ath9k_hw_cal_data *caldata = ah->caldata; struct ath9k_hw_cal_data *caldata = ah->caldata;
struct ath_common *common = ath9k_hw_common(ah);
int chain; int chain;
if (!caldata || !caldata->paprd_done) if (!caldata || !caldata->paprd_done)
...@@ -278,7 +279,7 @@ static void ath_paprd_activate(struct ath_softc *sc) ...@@ -278,7 +279,7 @@ static void ath_paprd_activate(struct ath_softc *sc)
ath9k_ps_wakeup(sc); ath9k_ps_wakeup(sc);
ar9003_paprd_enable(ah, false); ar9003_paprd_enable(ah, false);
for (chain = 0; chain < AR9300_MAX_CHAINS; chain++) { for (chain = 0; chain < AR9300_MAX_CHAINS; chain++) {
if (!(ah->caps.tx_chainmask & BIT(chain))) if (!(common->tx_chainmask & BIT(chain)))
continue; continue;
ar9003_paprd_populate_single_table(ah, caldata, chain); ar9003_paprd_populate_single_table(ah, caldata, chain);
...@@ -300,6 +301,7 @@ void ath_paprd_calibrate(struct work_struct *work) ...@@ -300,6 +301,7 @@ void ath_paprd_calibrate(struct work_struct *work)
struct ieee80211_supported_band *sband = &sc->sbands[band]; struct ieee80211_supported_band *sband = &sc->sbands[band];
struct ath_tx_control txctl; struct ath_tx_control txctl;
struct ath9k_hw_cal_data *caldata = ah->caldata; struct ath9k_hw_cal_data *caldata = ah->caldata;
struct ath_common *common = ath9k_hw_common(ah);
int qnum, ftype; int qnum, ftype;
int chain_ok = 0; int chain_ok = 0;
int chain; int chain;
...@@ -333,7 +335,7 @@ void ath_paprd_calibrate(struct work_struct *work) ...@@ -333,7 +335,7 @@ void ath_paprd_calibrate(struct work_struct *work)
ath9k_ps_wakeup(sc); ath9k_ps_wakeup(sc);
ar9003_paprd_init_table(ah); ar9003_paprd_init_table(ah);
for (chain = 0; chain < AR9300_MAX_CHAINS; chain++) { for (chain = 0; chain < AR9300_MAX_CHAINS; chain++) {
if (!(ah->caps.tx_chainmask & BIT(chain))) if (!(common->tx_chainmask & BIT(chain)))
continue; continue;
chain_ok = 0; chain_ok = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment