Return-path: Received: from mail-la0-f43.google.com ([209.85.215.43]:35677 "EHLO mail-la0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754770AbaFNNXj (ORCPT ); Sat, 14 Jun 2014 09:23:39 -0400 Received: by mail-la0-f43.google.com with SMTP id e16so2044389lan.2 for ; Sat, 14 Jun 2014 06:23:37 -0700 (PDT) From: Rickard Strandqvist To: Larry Finger , Chaoming Li Cc: Rickard Strandqvist , "John W. Linville" , Joe Perches , Peter Wu , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] net: wireless: rtlwifi: rtl8188ee: hw.c: Cleaning up if statement that always evaluates to false Date: Sat, 14 Jun 2014 15:24:32 +0200 Message-Id: <1402752272-13696-2-git-send-email-rickard_strandqvist@spectrumdigital.se> (sfid-20140614_152401_017516_3E00BB4E) In-Reply-To: <1402752272-13696-1-git-send-email-rickard_strandqvist@spectrumdigital.se> References: <1402752272-13696-1-git-send-email-rickard_strandqvist@spectrumdigital.se> Sender: linux-wireless-owner@vger.kernel.org List-ID: I found a logical error in an if statement that always evaluates to false. This has after same discussion resulted in that we add a macro to handle this. Signed-off-by: Rickard Strandqvist --- drivers/net/wireless/rtlwifi/rtl8188ee/hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c b/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c index 94cd9df..9bdac68 100644 --- a/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c @@ -1231,7 +1231,7 @@ static int _rtl88ee_set_media_status(struct ieee80211_hw *hw, rtl_write_byte(rtlpriv, (MSR), bt_msr); rtlpriv->cfg->ops->led_control(hw, ledaction); - if ((bt_msr & 0xfc) == MSR_AP) + if ((bt_msr & MSR_MASK) == MSR_AP) rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x00); else rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x66); -- 1.7.10.4