From: Satya Calloji Date: Thu, 30 Apr 2015 20:58:59 +0000 (-0700) Subject: Fixed cross key for LE when paired over BR-EDR X-Git-Tag: android-x86-7.1-r1~394^2~216^2~126 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=51a36d7e;p=android-x86%2Fsystem-bt.git Fixed cross key for LE when paired over BR-EDR SMP state machine was resending security request and waiting for a response when paired over BR-EDR. The state machine state timed out due to this and SMP failed while doing cross key pairing. Thus, user was asked for pairing again. Original author: Priti Aghera Change-Id: I568f936bb7bee21fb78e8454469ecad3445f026f --- diff --git a/stack/btm/btm_ble.c b/stack/btm/btm_ble.c index 597be99c6..3eed315db 100644 --- a/stack/btm/btm_ble.c +++ b/stack/btm/btm_ble.c @@ -1985,6 +1985,7 @@ UINT8 btm_proc_smp_cback(tSMP_EVT event, BD_ADDR bd_addr, tSMP_EVT_DATA *p_data) if (res == BTM_SUCCESS) { + p_dev_rec->device_type |= BT_DEVICE_TYPE_BLE; p_dev_rec->sec_state = BTM_SEC_STATE_IDLE; #if (defined BLE_PRIVACY_SPT && BLE_PRIVACY_SPT == TRUE) /* add all bonded device into resolving list if IRK is available*/ diff --git a/stack/smp/smp_act.c b/stack/smp/smp_act.c index f4e81dcb0..4adde966d 100644 --- a/stack/smp/smp_act.c +++ b/stack/smp/smp_act.c @@ -810,7 +810,8 @@ void smp_br_process_pairing_command(tSMP_CB *p_cb, tSMP_INT_DATA *p_data) if (p_cb->role == HCI_ROLE_SLAVE) { p_dev_rec->new_encryption_key_is_p256 = FALSE; - p_cb->cb_evt = SMP_SEC_REQUEST_EVT; + /* shortcut to skip Security Grant step */ + p_cb->cb_evt = SMP_BR_KEYS_REQ_EVT; } else /* Master receives pairing response */ {