]>
Commit | Line | Data |
---|---|---|
3c830a11 GKH |
1 | From 74632d11a133b5baf6b9d622dd19d2f944d93d94 Mon Sep 17 00:00:00 2001 |
2 | From: Felix Fietkau <nbd@openwrt.org> | |
3 | Date: Fri, 15 Mar 2013 14:53:31 +0100 | |
4 | Subject: ath9k_hw: revert chainmask to user configuration after calibration | |
5 | ||
6 | From: Felix Fietkau <nbd@openwrt.org> | |
7 | ||
8 | commit 74632d11a133b5baf6b9d622dd19d2f944d93d94 upstream. | |
9 | ||
10 | The commit 'ath9k_hw: fix calibration issues on chainmask that don't | |
11 | include chain 0' changed the hardware chainmask to the chip chainmask | |
12 | for the duration of the calibration, but the revert to user | |
13 | configuration in the reset path runs too early. | |
14 | ||
15 | That causes some issues with limiting the number of antennas (including | |
16 | spurious failure in hardware-generated packets). | |
17 | ||
18 | Fix this by reverting the chainmask after the essential parts of the | |
19 | calibration that need the workaround, and before NF calibration is run. | |
20 | ||
21 | Signed-off-by: Felix Fietkau <nbd@openwrt.org> | |
22 | Reported-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com> | |
23 | Tested-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com> | |
24 | Signed-off-by: John W. Linville <linville@tuxdriver.com> | |
25 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
26 | ||
27 | --- | |
28 | drivers/net/wireless/ath/ath9k/ar9003_calib.c | 4 ++++ | |
29 | 1 file changed, 4 insertions(+) | |
30 | ||
31 | --- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c | |
32 | +++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c | |
33 | @@ -938,6 +938,7 @@ static bool ar9003_hw_init_cal(struct at | |
34 | AR_PHY_CL_TAB_1, | |
35 | AR_PHY_CL_TAB_2 }; | |
36 | ||
37 | + /* Use chip chainmask only for calibration */ | |
38 | ar9003_hw_set_chain_masks(ah, ah->caps.rx_chainmask, ah->caps.tx_chainmask); | |
39 | ||
40 | if (rtt) { | |
41 | @@ -1085,6 +1086,9 @@ skip_tx_iqcal: | |
42 | ar9003_hw_rtt_disable(ah); | |
43 | } | |
44 | ||
45 | + /* Revert chainmask to runtime parameters */ | |
46 | + ar9003_hw_set_chain_masks(ah, ah->rxchainmask, ah->txchainmask); | |
47 | + | |
48 | /* Initialize list pointers */ | |
49 | ah->cal_list = ah->cal_list_last = ah->cal_list_curr = NULL; | |
50 | ah->supp_cals = IQ_MISMATCH_CAL; |