summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2016-07-14 11:21:28 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-21 18:35:46 +0200
commit9731ee897356c9077995b0c454fe19f7fa93ea5d (patch)
tree49a0767cb32bac671f52fd3d2d91c2414cd73e0e /drivers
parent37f144008a36bd8394ebc00ac562a1bbf426c7a5 (diff)
staging: rtl8723au: hal: check BT_Active and BT_State with correct bit pattern
BT_Active and BT_State are being masked with 0x00ffffff so it the subsequent comparisons with 0xffffffff are therefore a buggy check. Instead, check them against 0x00ffffff. Unfortunately I couldn't find a datasheet or hardware to see if 0xffffffff is an expected invalid bit pattern that should be checked before BT_Active and BT_State are masked with 0x00ffffff, so for now, this fix seems like the least risky approach. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
index bfcbd7a349cf..6989580535a4 100644
--- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
+++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
@@ -9824,7 +9824,7 @@ void BTDM_CheckBTIdleChange1Ant(struct rtw_adapter *padapter)
BT_Polling = rtl8723au_read32(padapter, regBTPolling);
RTPRINT(FBT, BT_TRACE, ("[DM][BT], BT_Polling(0x%x) =%x\n", regBTPolling, BT_Polling));
- if (BT_Active == 0xffffffff && BT_State == 0xffffffff && BT_Polling == 0xffffffff)
+ if (BT_Active == 0x00ffffff && BT_State == 0x00ffffff && BT_Polling == 0xffffffff)
return;
if (BT_Polling == 0)
return;