[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190926073138.12109-1-efremov@linux.com>
Date: Thu, 26 Sep 2019 10:31:38 +0300
From: Denis Efremov <efremov@...ux.com>
To: devel@...verdev.osuosl.org
Cc: Denis Efremov <efremov@...ux.com>, linux-kernel@...r.kernel.org,
Larry Finger <Larry.Finger@...inger.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Michael Straube <straube.linux@...il.com>,
stable@...r.kernel.org
Subject: [PATCH] staging: rtl8188eu: fix HighestRate check in odm_ARFBRefresh_8188E()
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: Larry Finger <Larry.Finger@...inger.net>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Michael Straube <straube.linux@...il.com>
Cc: stable@...r.kernel.org
Signed-off-by: Denis Efremov <efremov@...ux.com>
---
drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c b/drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c
index 9ddd51685063..5792f491b59a 100644
--- 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 odm_dm_struct *dm_odm, struct odm_ra_inf
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;
--
2.21.0
Powered by blists - more mailing lists