staging: rtl8723bs: Fix incorrect sense of ether_addr_equal
authorLarry Finger <Larry.Finger@lwfinger.net>
Wed, 7 Nov 2018 03:33:14 +0000 (21:33 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Dec 2018 18:32:13 +0000 (19:32 +0100)
commit6d956674dfc5ef606ae914446296c261dfeaf03d
tree17fb89d1803c6c7568e418eba2f7e3cfc92f1c26
parentfa299861aeeb7329042ab60be06903f5cb9fba32
staging: rtl8723bs: Fix incorrect sense of ether_addr_equal

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 <stable@vger.kernel.org>
Cc: youling257 <youling257@gmail.com>
Cc: u.srikant.patnaik@gmail.com
Reported-and-tested-by: youling257 <youling257@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c