]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.0.1/rtlwifi-rtl8192cu-fix-duplicate-if-test.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.0.1 / rtlwifi-rtl8192cu-fix-duplicate-if-test.patch
CommitLineData
632d9a26
GKH
1From 1288aa4e80145d9f4196df32f717b4c1cf6aab61 Mon Sep 17 00:00:00 2001
2From: Larry Finger <Larry.Finger@lwfinger.net>
3Date: Sat, 9 Jul 2011 13:15:58 -0500
4Subject: rtlwifi: rtl8192cu: Fix duplicate if test
5
6From: Larry Finger <Larry.Finger@lwfinger.net>
7
8commit 1288aa4e80145d9f4196df32f717b4c1cf6aab61 upstream.
9
10A typo causes routine rtl92cu_phy_rf6052_set_cck_txpower() to test the
11same condition twice. The problem was found using cppcheck-1.49, and the
12proper fix was verified against the pre-mac80211 version of the code.
13
14Reported-by: David Binderman <dcb314@hotmail.com>
15Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
16Signed-off-by: John W. Linville <linville@tuxdriver.com>
17Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18
19---
20 drivers/net/wireless/rtlwifi/rtl8192cu/rf.c | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-)
22
23--- a/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
24+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
25@@ -104,7 +104,7 @@ void rtl92cu_phy_rf6052_set_cck_txpower(
26 tx_agc[RF90_PATH_A] = 0x10101010;
27 tx_agc[RF90_PATH_B] = 0x10101010;
28 } else if (rtlpriv->dm.dynamic_txhighpower_lvl ==
29- TXHIGHPWRLEVEL_LEVEL1) {
30+ TXHIGHPWRLEVEL_LEVEL2) {
31 tx_agc[RF90_PATH_A] = 0x00000000;
32 tx_agc[RF90_PATH_B] = 0x00000000;
33 } else{