]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
staging: rtl8188eu: fix HighestRate check in odm_ARFBRefresh_8188E()
authorDenis Efremov <efremov@linux.com>
Thu, 26 Sep 2019 07:31:38 +0000 (10:31 +0300)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 19 Dec 2019 15:57:51 +0000 (15:57 +0000)
commit584df56f99dd94362a24c4ed710239b8965d8791
treea94d70cc22ed78987c8f66a413b9f73bb8f53797
parentbc0104b28a60413fc7d2d83c5a32522e1550a8d4
staging: rtl8188eu: fix HighestRate check in odm_ARFBRefresh_8188E()

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 <straube.linux@gmail.com>
Signed-off-by: Denis Efremov <efremov@linux.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Link: https://lore.kernel.org/r/20190926073138.12109-1-efremov@linux.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.16: adjust filename, indentation]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c