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
6 From: Rafał Miłecki <zajec5@gmail.com>
8 commit e67dd874e60529dbd2e8232babb1e23479ba2ffa upstream.
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.
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)
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>
24 drivers/net/wireless/b43/phy_n.c | 4 ++--
25 1 file changed, 2 insertions(+), 2 deletions(-)
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
31 for (i = 0; i < 4; i++) {
34 + s32 mind = 0x100000;
38 @@ -1554,7 +1554,7 @@ static void b43_nphy_rev2_rssi_cal(struc
41 for (i = 0; i < 4; i++) {
43 + s32 mind = 0x100000;