ath9k: enable hw manual peak calibration for QCA9561
[openwrt.git] / package / kernel / mac80211 / patches / 308-ath9k-Fix-NF-CCA-limits-for-AR9287-and-AR9227.patch
1 From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2 Date: Wed, 22 Jul 2015 10:42:43 +0200
3 Subject: [PATCH] ath9k: Fix NF CCA limits for AR9287 and AR9227
4
5 The FreeBSD driver [0] uses the same 2G values as for the AR9280 chips.
6 Using the same values in ath9k results in much better throughput for me.
7
8 Before this patch I had a huge amount of packet loss (sometimes up to
9 40%) and the max transfer speed was somewhere around 5Mbit/s. With this
10 patch applied I have zero packet loss and ten times the throughput.
11 My device uses a AR9227 which is the PCI variant of the AR9287.
12
13 [0] http://bxr.su/FreeBSD/sys/dev/ath/ath_hal/ar9002/ar9287.h
14
15 Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
16 ---
17
18 --- a/drivers/net/wireless/ath/ath9k/ar9002_phy.h
19 +++ b/drivers/net/wireless/ath/ath9k/ar9002_phy.h
20 @@ -610,8 +610,8 @@
21  #define AR_PHY_CCA_MIN_GOOD_VAL_9271_2GHZ      -127
22  #define AR_PHY_CCA_MAX_GOOD_VAL_9271_2GHZ      -116
23  
24 -#define AR_PHY_CCA_NOM_VAL_9287_2GHZ           -120
25 +#define AR_PHY_CCA_NOM_VAL_9287_2GHZ           -112
26  #define AR_PHY_CCA_MIN_GOOD_VAL_9287_2GHZ    -127
27 -#define AR_PHY_CCA_MAX_GOOD_VAL_9287_2GHZ    -110
28 +#define AR_PHY_CCA_MAX_GOOD_VAL_9287_2GHZ    -97
29  
30  #endif