HID: Update condition for checking LE HID handle validity
1) Pair and connect with BR/EDR HID devices and LE devices
such that the total number of connected paired devices
becomes 7. It is not required that connection to all devices be
maintained, they can be disconnected as well afterwards.
2) Pair and connect with a new LE device. Connection fails
3) Retry connecting to same LE device. Connection does not go through
4) Turn BT off
Observed Result:
1) LE device cannot be connected in step 2
2) Tombstone in BT while switching off BT with below signature
backtrace:
#00 pc 0000000000092438 /system/lib64/libc.so (ifree+88)
#01 pc 000000000009298c /system/lib64/libc.so (je_free+120)
#02 pc 00000000001b266c /system/lib64/hw/bluetooth.default.so (_Z18osi_free_and_resetPPv+84)
#03 pc 0000000000062f84 /system/lib64/hw/bluetooth.default.so
(_Z17bta_hh_sm_executeP14tBTA_HH_DEV_CBtP12tBTA_HH_DATA+880)
#04 pc 0000000000063120 /system/lib64/hw/bluetooth.default.so (_Z16bta_hh_hdl_eventP6BT_HDR+296)
#05 pc 000000000007bbc4 /system/lib64/hw/bluetooth.default.so (_Z13bta_sys_eventP6BT_HDR+60)
#06 pc 00000000001b4d88 /system/lib64/hw/bluetooth.default.so (_ZL22internal_dequeue_readyPv+80)
#07 pc 00000000001b96f4 /system/lib64/hw/bluetooth.default.so (_ZL11run_reactorP9reactor_ti+312)
#08 pc 00000000001b9590 /system/lib64/hw/bluetooth.default.so (_Z13reactor_startP9reactor_t+80)
#09 pc 00000000001baf24 /system/lib64/hw/bluetooth.default.so (_ZL10run_threadPv+256)
#10 pc 0000000000067bc4 /system/lib64/libc.so (_ZL15__pthread_startPv+36)
#11 pc 000000000001f264 /system/lib64/libc.so (__start_thread+68)
Root Cause:
Wrong conditional check in macro BTA_HH_IS_LE_DEV_HDL_VALID which ignores the condition that max
14 HID devices can be connected and all of them can be LE as well.
Fix:
Update the condition in macro BTA_HH_IS_LE_DEV_HDL_VALID to compare with BTA_HH_MAX_DEVICE instead of
BTA_HH_LE_MAX_KNOWN
Test: Not yet performed, only code and log analysis
Fixes: 71842479
Change-Id: I2b56b6f109787608e25c340150be313f0f5397be
Loading
Please register or sign in to comment