]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/meta-ti-glsdk.git/blob - recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.16/0045-ath9k-fix-max-noise-floor-threshold.patch
618a68a17b28622737ed01a2dd1b65985936b687
[glsdk/meta-ti-glsdk.git] / recipes-kernel / linux / linux-ti33x-psp-3.2 / 3.2.16 / 0045-ath9k-fix-max-noise-floor-threshold.patch
1 From ffdc1eb0a3c60111912b7bfe80c3a9358edd6b42 Mon Sep 17 00:00:00 2001
2 From: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
3 Date: Thu, 15 Mar 2012 06:08:04 +0530
4 Subject: [PATCH 45/69] ath9k: fix max noise floor threshold
6 commit 2ee0a07028d2cde6e131b73f029dae2b93c50f3a upstream.
8 Currently the maximum noise floor limit is set as too high (-60dB). The
9 assumption of having a higher threshold limit is that it would help
10 de-sensitize the receiver (reduce phy errors) from continuous
11 interference. But when we have a bursty interference where there are
12 collisions and then free air time and if the receiver is desensitized too
13 much, it will miss the normal packets too. Lets make use of chips
14 specific min, nom and max limits always. This patch helps to improve the
15 connection stability in congested networks.
17 Cc: Paul Stewart <pstew@google.com>
18 Tested-by: Gary Morain <gmorain@google.com>
19 Signed-off-by: Madhan Jaganathan <madhanj@qca.qualcomm.com>
20 Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
21 Signed-off-by: John W. Linville <linville@tuxdriver.com>
22 [bwh: Backported to 3.0/3.2: adjust context]
23 Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
24 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25 ---
26  drivers/net/wireless/ath/ath9k/calib.c |    5 ++---
27  1 file changed, 2 insertions(+), 3 deletions(-)
29 diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c
30 index 8ddef3e..d771de5 100644
31 --- a/drivers/net/wireless/ath/ath9k/calib.c
32 +++ b/drivers/net/wireless/ath/ath9k/calib.c
33 @@ -20,7 +20,6 @@
34  
35  /* Common calibration code */
36  
37 -#define ATH9K_NF_TOO_HIGH      -60
38  
39  static int16_t ath9k_hw_get_nf_hist_mid(int16_t *nfCalBuffer)
40  {
41 @@ -348,10 +347,10 @@ static void ath9k_hw_nf_sanitize(struct ath_hw *ah, s16 *nf)
42                         "NF calibrated [%s] [chain %d] is %d\n",
43                         (i >= 3 ? "ext" : "ctl"), i % 3, nf[i]);
44  
45 -               if (nf[i] > ATH9K_NF_TOO_HIGH) {
46 +               if (nf[i] > limit->max) {
47                         ath_dbg(common, ATH_DBG_CALIBRATE,
48                                 "NF[%d] (%d) > MAX (%d), correcting to MAX\n",
49 -                               i, nf[i], ATH9K_NF_TOO_HIGH);
50 +                               i, nf[i], limit->max);
51                         nf[i] = limit->max;
52                 } else if (nf[i] < limit->min) {
53                         ath_dbg(common, ATH_DBG_CALIBRATE,
54 -- 
55 1.7.9.5