]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.4.39/ath9k_hw-revert-chainmask-to-user-configuration-after-calibration.patch
5.0-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.4.39 / ath9k_hw-revert-chainmask-to-user-configuration-after-calibration.patch
CommitLineData
3c830a11
GKH
1From 74632d11a133b5baf6b9d622dd19d2f944d93d94 Mon Sep 17 00:00:00 2001
2From: Felix Fietkau <nbd@openwrt.org>
3Date: Fri, 15 Mar 2013 14:53:31 +0100
4Subject: ath9k_hw: revert chainmask to user configuration after calibration
5
6From: Felix Fietkau <nbd@openwrt.org>
7
8commit 74632d11a133b5baf6b9d622dd19d2f944d93d94 upstream.
9
10The commit 'ath9k_hw: fix calibration issues on chainmask that don't
11include chain 0' changed the hardware chainmask to the chip chainmask
12for the duration of the calibration, but the revert to user
13configuration in the reset path runs too early.
14
15That causes some issues with limiting the number of antennas (including
16spurious failure in hardware-generated packets).
17
18Fix this by reverting the chainmask after the essential parts of the
19calibration that need the workaround, and before NF calibration is run.
20
21Signed-off-by: Felix Fietkau <nbd@openwrt.org>
22Reported-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
23Tested-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
24Signed-off-by: John W. Linville <linville@tuxdriver.com>
25Signed-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;