[64/88] rtlwifi: rtl8192cu: Fix duplicate if test

From: Steven Rostedt
Date: Tue Aug 13 2013 - 12:28:03 EST


3.6.11.7-rc1 stable review patch.
If anyone has any objections, please let me know.

------------------

From: Larry Finger <Larry.Finger@xxxxxxxxxxxx>

[ Upstream commit 10d0b9030a3f86e1e26c710c7580524d7787d688 ]

A typo causes routine rtl92cu_phy_rf6052_set_cck_txpower() to test the
same condition twice. The problem was found using cppcheck-1.49, and the
proper fix was verified against the pre-mac80211 version of the code.

This patch was originally included as commit 1288aa4, but was accidentally
reverted in a later patch.

Reported-by: David Binderman <dcb314@xxxxxxxxxxx> [original report]
Reported-by: Andrea Morello <andrea.merello@xxxxxxxxx> [report of accidental reversion]
Signed-off-by: Larry Finger <Larry.Finger@xxxxxxxxxxxx>
Cc: stable <stable@xxxxxxxxxxxxxxx> [back to 2.6.39]
Signed-off-by: John W. Linville <linville@xxxxxxxxxxxxx>
Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
---
drivers/net/wireless/rtlwifi/rtl8192cu/rf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c b/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
index 506b9a0..4763426 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
@@ -104,7 +104,7 @@ void rtl92cu_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw,
tx_agc[RF90_PATH_A] = 0x10101010;
tx_agc[RF90_PATH_B] = 0x10101010;
} else if (rtlpriv->dm.dynamic_txhighpower_lvl ==
- TXHIGHPWRLEVEL_LEVEL1) {
+ TXHIGHPWRLEVEL_LEVEL2) {
tx_agc[RF90_PATH_A] = 0x00000000;
tx_agc[RF90_PATH_B] = 0x00000000;
} else{
--
1.7.10.4


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/