summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchaoyu.x.wu <chaoyu.x.wu@sonymobile.com>2016-04-11 14:08:48 +0800
committerJakub Pawlowski <jpawlowski@google.com>2016-09-23 07:05:08 -0700
commit58c27b48aa61db10e2d98f5752ecf96a50dc764c (patch)
treef8548c011f3317dd51e82792e6fe1134cc56f465
parente1c8ed17c7a35510f00997ca329687f73cd193d8 (diff)
downloadandroid-system-bt-58c27b48aa61db10e2d98f5752ecf96a50dc764c.tar.gz
android-system-bt-58c27b48aa61db10e2d98f5752ecf96a50dc764c.tar.xz
Fix the BLE connection failure with some mice
If enable the "connection parameters update" during GATT discovery, it may cause some device connection failure due to connection timeout. Since the the "connection parameter update" is enabled again when GATT discovery completed, remove the enable of "connection parameter update" after SMP complete to fix the issue. This issue was already fixed in commit 2d41fe1c, but then it was re-introduced in commit 444a8da8, which also removed comment explaining the issue, added back in this patch. Bug: 29060797 Change-Id: I42b0b36056821c30d887484e22bfcbd04ea7ca03 (cherry picked from commit 1ec17e06c73c67592aeda29e0aaa03580fdecce9)
-rw-r--r--stack/smp/smp_act.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/stack/smp/smp_act.c b/stack/smp/smp_act.c
index 7422898..e4152a4 100644
--- a/stack/smp/smp_act.c
+++ b/stack/smp/smp_act.c
@@ -1502,8 +1502,6 @@ void smp_pairing_cmpl(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
if (p_cb->total_tx_unacked == 0)
{
- /* update connection parameter to remote preferred */
- L2CA_EnableUpdateBleConnParams(p_cb->pairing_bda, TRUE);
/* process the pairing complete */
smp_proc_pairing_cmpl(p_cb);
}
@@ -1542,8 +1540,11 @@ void smp_idle_terminate(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
*******************************************************************************/
void smp_fast_conn_param(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
- /* disable connection parameter update */
- L2CA_EnableUpdateBleConnParams(p_cb->pairing_bda, FALSE);
+ /* Disable L2CAP connection parameter updates while bonding since
+ some peripherals are not able to revert to fast connection parameters
+ during the start of service discovery. Connection paramter updates
+ get enabled again once service discovery completes. */
+ L2CA_EnableUpdateBleConnParams(p_cb->pairing_bda, false);
}
/*******************************************************************************