From patchwork Sat Jul 9 18:15:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 960082 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p69IGcJH024944 for ; Sat, 9 Jul 2011 18:16:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754046Ab1GISQD (ORCPT ); Sat, 9 Jul 2011 14:16:03 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.125]:39922 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753925Ab1GISQC (ORCPT ); Sat, 9 Jul 2011 14:16:02 -0400 X-Authority-Analysis: v=1.1 cv=PfPQ8rIoTcZsncbPZjVSZ7K0hy8Zc4hmL68r4VPNpKE= c=1 sm=0 a=3rvgeqzMqd0A:10 a=VjYniuIJTN4A:10 a=Zx2FLkwYMp0A:10 a=kj9zAlcOel0A:10 a=mpMdnlmFKti1S5SNY1DT+A==:17 a=69EAbJreAAAA:8 a=yQdBAQUQAAAA:8 a=VwQbUJbxAAAA:8 a=OTyQz6vt40lKZy7f9zQA:9 a=CjuIK1q_8ugA:10 a=EfJqPEOeqlMA:10 a=IcxpeKGZWnEA:10 a=LI9Vle30uBYA:10 a=mpMdnlmFKti1S5SNY1DT+A==:117 X-Cloudmark-Score: 0 X-Originating-IP: 65.28.92.85 Received: from [65.28.92.85] ([65.28.92.85:52060] helo=larrylap.lan) by hrndva-oedge02.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTP id C4/67-01023-FDA981E4; Sat, 09 Jul 2011 18:16:00 +0000 Date: Sat, 09 Jul 2011 13:15:58 -0500 From: Larry Finger To: John W Linville Cc: dcb314@hotmail.com, george0505@realtek.com, linux-wireless@vger.kernel.org Subject: [PATCH] rtlwifi: rtl8192cu: Fix duplicate if test Message-ID: <4e189ade.j4swrYauTmJhQVet%Larry.Finger@lwfinger.net> User-Agent: Heirloom mailx 12.2 01/07/07 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Sat, 09 Jul 2011 18:16:38 +0000 (UTC) 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. Reported-by: David Binderman Signed-off-by: Larry Finger Cc: stable [back to 2.6.39] --- John, Obviously, this is a bug in 3.0 and 2.6.39, but it has a minor impact. I think we should just push it to 3.1 and let stable get it for the earlier versions, but as usual, it is your call. Larry --- -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: wireless-testing-new/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c =================================================================== --- wireless-testing-new.orig/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c +++ wireless-testing-new/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c @@ -104,7 +104,7 @@ void rtl92cu_phy_rf6052_set_cck_txpower( 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{