1 From 9094537c3a9ef9e127e844254a74186735c9a90b Mon Sep 17 00:00:00 2001
2 From: Vasanthakumar Thiagarajan <vasanth@atheros.com>
3 Date: Mon, 20 Sep 2010 22:54:46 -0700
4 Subject: ath9k: Fix tx struck state with paprd
6 From: Vasanthakumar Thiagarajan <vasanth@atheros.com>
8 commit 9094537c3a9ef9e127e844254a74186735c9a90b upstream.
10 Paprd needs to be done only on active chains(not for all the chains
11 that hw can support). The paprd training frames which are sent
12 for inactive chains would be hanging on the hw queue without
13 getting transmitted and would make the connection so unstable.
14 This issue happens only with the hw which supports paprd cal(ar9003).
16 Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
17 Signed-off-by: John W. Linville <linville@tuxdriver.com>
18 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
21 drivers/net/wireless/ath/ath9k/main.c | 6 ++++--
22 1 file changed, 4 insertions(+), 2 deletions(-)
24 --- a/drivers/net/wireless/ath/ath9k/main.c
25 +++ b/drivers/net/wireless/ath/ath9k/main.c
26 @@ -269,6 +269,7 @@ static void ath_paprd_activate(struct at
28 struct ath_hw *ah = sc->sc_ah;
29 struct ath9k_hw_cal_data *caldata = ah->caldata;
30 + struct ath_common *common = ath9k_hw_common(ah);
33 if (!caldata || !caldata->paprd_done)
34 @@ -277,7 +278,7 @@ static void ath_paprd_activate(struct at
36 ar9003_paprd_enable(ah, false);
37 for (chain = 0; chain < AR9300_MAX_CHAINS; chain++) {
38 - if (!(ah->caps.tx_chainmask & BIT(chain)))
39 + if (!(common->tx_chainmask & BIT(chain)))
42 ar9003_paprd_populate_single_table(ah, caldata, chain);
43 @@ -299,6 +300,7 @@ void ath_paprd_calibrate(struct work_str
44 struct ieee80211_supported_band *sband = &sc->sbands[band];
45 struct ath_tx_control txctl;
46 struct ath9k_hw_cal_data *caldata = ah->caldata;
47 + struct ath_common *common = ath9k_hw_common(ah);
51 @@ -332,7 +334,7 @@ void ath_paprd_calibrate(struct work_str
53 ar9003_paprd_init_table(ah);
54 for (chain = 0; chain < AR9300_MAX_CHAINS; chain++) {
55 - if (!(ah->caps.tx_chainmask & BIT(chain)))
56 + if (!(common->tx_chainmask & BIT(chain)))