From patchwork Sat Jun 14 13:24:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4352451 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9FD9BBEEAA for ; Sat, 14 Jun 2014 13:24:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D12B520263 for ; Sat, 14 Jun 2014 13:24:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B68092021B for ; Sat, 14 Jun 2014 13:24:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754811AbaFNNXw (ORCPT ); Sat, 14 Jun 2014 09:23:52 -0400 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) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DyrZgvn0KbIFGS2aoTdnEbUZU+1vB1GYzDqIwnwyGo8=; b=SEaTCjvVtic5Yx6AUN+pZAkzn+5ZhomOmCSJmBRuFDiCGA0i1mneYMGI7puC+AKlkv kL0jIh8qhHWvuzbgyi6j9EUU3/w3tM6na8ZQcL3cRw3AXV9+yB/jdOpw92YdNDT/xKcc 8zVoV4/qx2MuykEsoWzcN/U2PVHtNo0Zn2uGQmh2oXyfQT+7MFJ2SC58xcsHywdm4bsh Qpfm6geJWv9L9vG1XOlTY+2FVw9KyN2cQCa4usIAW5Fpj2pv9KT0bGP21IOA5VZ8Nbwe glmvWSGhs24UnNNQpPacGkPON9NcRAnNaMZ2fhGf/Jvxx6nLXzzIs8LRl7oaiGrVy/+f nJZA== X-Gm-Message-State: ALoCoQl9rMjhNv8XrWNZT5+mmoWnl5WMjpa7pvptjEeuLU1/0urQKPLP2aMCakivx2S8iJwZtWm3 X-Received: by 10.152.22.169 with SMTP id e9mr1475621laf.51.1402752217087; Sat, 14 Jun 2014 06:23:37 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id az3sm2060955lab.34.2014.06.14.06.23.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 14 Jun 2014 06:23:36 -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> X-Mailer: git-send-email 1.7.10.4 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 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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);