Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8125446imu; Tue, 4 Dec 2018 03:26:39 -0800 (PST) X-Google-Smtp-Source: AFSGD/XXkyYKP5vsWbvePlH51zl31xpl1A0bwjUJnVd45BYXM90ULqP1PaMcCaxFxu+cm/GZhLjx X-Received: by 2002:a62:509b:: with SMTP id g27mr19918830pfj.48.1543922799211; Tue, 04 Dec 2018 03:26:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543922799; cv=none; d=google.com; s=arc-20160816; b=REKOfb8UyA7NfxFgRkbcVgRhcQDUpYBhrV6zFipQfY6OWI1pOSz5s/4xL6DRbkyd74 WEEZZv/JnNCX2lHPxG5UeV1/f2cGu7N1W9OMy8gcJofCon9AWEqdM/G6vva61zAvHBWT Hc2E+ghkuXcrt0sjBzHTac2caOT3iZI0zuVjSHdO+h64OdQPXn6T9lVZV3OldnNvQJPL xGO2Wt4PfQ4vRNifif64CdJv6+HjECW2imfWzdfgPGkMrrQzDjYuV0UusW6wQdGyfxYa dQTrjbzUj3oXqVEvMfVYvON/P7PFlGEmTUJv+MxfRPeYFKBmfak6GsNJUB9beLOsRiRx JPqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BGEtfRpr+7EYB+A5FYo4z6gmG56gqb+dJKxU8LS0Sso=; b=vlzZGkQ15bNx7NJaJDb5bnNabZt7y7SWPajfSpahSWqW3mtPywmYVS6tGVaezfzJQU z/VYuCBFTU4L9Y1hruEA7bU89w/t/1f/tspT47U9M0jpFfqvaHSzL07E+e6Vm27zxUBO eNH09JEUDaswX6ohvcR5lPEZw/4AcRNCWon43517MPZG1jDXXkbsEtfk5MWdbYkpMnaQ zVcIs7cXZ4JPQLpBQJXWKB/RIFtXMuxIfXymyGSSC4HnDTPjPCJSCv9mu3tuJ+F9c2UD /DixZsXyUY4jQajlSK5Wzu+SdP9GouLW2s5cPzLYnMgO8aQ6TrLrJ/r3XqSoMqvsoHyd h0LA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YcYVzLqA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p185si18338709pfg.112.2018.12.04.03.26.23; Tue, 04 Dec 2018 03:26:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YcYVzLqA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727306AbeLDLAW (ORCPT + 99 others); Tue, 4 Dec 2018 06:00:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:45632 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726187AbeLDLAV (ORCPT ); Tue, 4 Dec 2018 06:00:21 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 59ACC2087F; Tue, 4 Dec 2018 11:00:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543921220; bh=wtVx14OOD1E5wWaajC87aGsT/gfnUSj+mnC2i3nq8kA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YcYVzLqAOkOWmVufZIsCAuENEini0XQ9EqCZRjWwoRQzGNwejNIpmrbU9GDzK0SYu 0qFkb31oy0eCUEAXbBog0uV1qFB76PNxd+NeBl3xUciT192FQab93OIVYK7JnhzK7v 0sJn8CWrMWNu5rUtBLZwmKLdtl/U7e6Z74I/jWdA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, youling257 , u.srikant.patnaik@gmail.com, Larry Finger Subject: [PATCH 4.19 128/139] staging: rtl8723bs: Fix incorrect sense of ether_addr_equal Date: Tue, 4 Dec 2018 11:50:09 +0100 Message-Id: <20181204103656.008256903@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181204103649.950154335@linuxfoundation.org> References: <20181204103649.950154335@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Larry Finger commit c948c6915b620f075496846df8d4487ee0c56121 upstream. In commit b37f9e1c3801 ("staging: rtl8723bs: Fix lines too long in update_recvframe_attrib()."), the refactoring involved replacing two memcmp() calls with ether_addr_equal() calls. What the author missed is that memcmp() returns false when the two strings are equal, whereas ether_addr_equal() returns true when the two addresses are equal. One side effect of this error is that the strength of an unassociated AP was much stronger than the same AP after association. This bug is reported at bko#201611. Fixes: b37f9e1c3801 ("staging: rtl8723bs: Fix lines too long in update_recvframe_attrib().") Cc: Stable Cc: youling257 Cc: u.srikant.patnaik@gmail.com Reported-and-tested-by: youling257 Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c @@ -109,12 +109,12 @@ static void update_recvframe_phyinfo(uni rx_bssid = get_hdr_bssid(wlanhdr); pkt_info.bssid_match = ((!IsFrameTypeCtrl(wlanhdr)) && !pattrib->icv_err && !pattrib->crc_err && - !ether_addr_equal(rx_bssid, my_bssid)); + ether_addr_equal(rx_bssid, my_bssid)); rx_ra = get_ra(wlanhdr); my_hwaddr = myid(&padapter->eeprompriv); pkt_info.to_self = pkt_info.bssid_match && - !ether_addr_equal(rx_ra, my_hwaddr); + ether_addr_equal(rx_ra, my_hwaddr); pkt_info.is_beacon = pkt_info.bssid_match &&