]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.4.39/b43-n-phy-increase-initial-value-of-mind-in-rssi-calibration.patch
5.0-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.4.39 / b43-n-phy-increase-initial-value-of-mind-in-rssi-calibration.patch
1 From e67dd874e60529dbd2e8232babb1e23479ba2ffa Mon Sep 17 00:00:00 2001
2 From: Rafał Miłecki <zajec5@gmail.com>
3 Date: Tue, 19 Mar 2013 07:52:48 +0100
4 Subject: b43: N-PHY: increase initial value of "mind" in RSSI calibration
5
6 From: Rafał Miłecki <zajec5@gmail.com>
7
8 commit e67dd874e60529dbd2e8232babb1e23479ba2ffa upstream.
9
10 We're using "mind" variable to find the VCM that got the best polling
11 results. For each VCM we calculte "currd" which is compared to the
12 "mind". For PHY rev3+ "currd" gets values around 14k-40k. Looking for a
13 value smaller than 40 makes no sense, so increase the initial value.
14
15 This fixes a regression introduced in 3.4 by commit:
16 e0c9a0219a8f542e3946fe972a68aacf8c3f906c
17 (my BCM4322 performance dropped from 18,4Mb/s to 9,26Mb/s)
18
19 Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
20 Signed-off-by: John W. Linville <linville@tuxdriver.com>
21 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22
23 ---
24 drivers/net/wireless/b43/phy_n.c | 4 ++--
25 1 file changed, 2 insertions(+), 2 deletions(-)
26
27 --- a/drivers/net/wireless/b43/phy_n.c
28 +++ b/drivers/net/wireless/b43/phy_n.c
29 @@ -1371,7 +1371,7 @@ static void b43_nphy_rev3_rssi_cal(struc
30 }
31 for (i = 0; i < 4; i++) {
32 s32 curr;
33 - s32 mind = 40;
34 + s32 mind = 0x100000;
35 s32 minpoll = 249;
36 u8 minvcm = 0;
37 if (2 * core != i)
38 @@ -1554,7 +1554,7 @@ static void b43_nphy_rev2_rssi_cal(struc
39 }
40
41 for (i = 0; i < 4; i++) {
42 - s32 mind = 40;
43 + s32 mind = 0x100000;
44 u8 minvcm = 0;
45 s32 minpoll = 249;
46 s32 curr;