Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1335521ybp; Thu, 17 Oct 2019 11:13:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqw1UNbK2mitYsdXkg2D4UvO2BiC5EFx5iGERi7ckBhZmf9OZSJxBuutUs4zAIRqQYt1q+U/ X-Received: by 2002:a17:906:7e0c:: with SMTP id e12mr4791540ejr.20.1571336036418; Thu, 17 Oct 2019 11:13:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571336036; cv=none; d=google.com; s=arc-20160816; b=Fp6Qhtux1OfrZIONVh2ukakXI57nnhlbfMjD44ZU7ma2JGUnL+IAE3Drt+O3IO+7jO SL2U+wGbnil66fJZl9TtvPlMMiPbgq8oCBIA4Zca9P0qeBVYthodS5HTGNAOmIhZ6nMT TxrqOQuRydAGW+zcx1EbfuQcr334BDOr3sSRH3107y33O6Mm3ccnufpxqpUCcLW83lp1 d6SswYTfdd5jTNCj8wD/GhI/77YTrIsHa+iOapEIhGcbiLCWkvobj0nlXLO3CMViLbqD mJs2ARVIEmaO+9m0cMRo1K03nAW44jkBmcAPeg4zlBIK1WB7+VS7koDvujZtc2noRHKS 0JyQ== 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=7Aoxon9RR8R1XilLQOEYf/fttoKeGpcddNrUZMAo6eI=; b=ELhm4LSMQfF49xdtym7R1RO0jXSz2Nev3YZrjZKmPkjfjQN2a4vPr6Y3NCxHrE6XjP 4MlLBkW3loPMIPCcpJPTITmNj97dMHwsxtFHzFIWNO0oVbTFs0Z2gTZdt+CAP6X4alwc CQuQtL16LbDUWR5sPNJsrSc0xurER1BBlzi4JHRcANRWf2pyXtVMh3EA0e4jPTvVOIUU YRYHKz7nfau59kb5XYTX/Gd8SbLUPI3l71wwJ7dc/BJ3GXoL3tb3FW2o5i9DAxAz+4Wf IIsZ/snWoxRfRbgBNXvpyGOQqO0F+FBI3IpaYoYeEWTbB15sFVgTVPjGyv/eigko3Yvc Zy6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=O4LTZGZE; 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 w11si2249320edi.442.2019.10.17.11.13.33; Thu, 17 Oct 2019 11:13:56 -0700 (PDT) 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=O4LTZGZE; 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 S2438626AbfJPV7q (ORCPT + 99 others); Wed, 16 Oct 2019 17:59:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:52646 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438260AbfJPV6q (ORCPT ); Wed, 16 Oct 2019 17:58:46 -0400 Received: from localhost (unknown [192.55.54.58]) (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 4BD3A20872; Wed, 16 Oct 2019 21:58:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571263126; bh=wrPFR4hMu8e3GqW0eIvzAndNN0lyryXQlDzQkmqeg+A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O4LTZGZEHo0jih5T4FHS6KfJgOXaTOajYNQyv9Kd+l4aYmI+3msZKSK/2A8smvCWh 4xRAB0cCYyNUveRFbMxXeljc0QY/aMreSRK/hnF3pe68KfnySVgFyzpoYfjr2W7MxV MAxmlS0Fqi7MskByvgp50r4yPLOX3gFlyr+3g6Mc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Straube , Denis Efremov , Larry Finger Subject: [PATCH 5.3 050/112] staging: rtl8188eu: fix HighestRate check in odm_ARFBRefresh_8188E() Date: Wed, 16 Oct 2019 14:50:42 -0700 Message-Id: <20191016214856.566046359@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191016214844.038848564@linuxfoundation.org> References: <20191016214844.038848564@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Denis Efremov commit 22d67a01d8d89552b989c9651419824bb4111200 upstream. It's incorrect to compare HighestRate with 0x0b twice in the following manner "if (HighestRate > 0x0b) ... else if (HighestRate > 0x0b) ...". The "else if" branch is constantly false. The second comparision should be with 0x03 according to the max_rate_idx in ODM_RAInfo_Init(). Cc: Michael Straube Cc: stable@vger.kernel.org Signed-off-by: Denis Efremov Acked-by: Larry Finger Link: https://lore.kernel.org/r/20190926073138.12109-1-efremov@linux.com Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c +++ b/drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c @@ -409,7 +409,7 @@ static int odm_ARFBRefresh_8188E(struct pRaInfo->PTModeSS = 3; else if (pRaInfo->HighestRate > 0x0b) pRaInfo->PTModeSS = 2; - else if (pRaInfo->HighestRate > 0x0b) + else if (pRaInfo->HighestRate > 0x03) pRaInfo->PTModeSS = 1; else pRaInfo->PTModeSS = 0;