OSDN Git Service

Fixed cross key for LE when paired over BR-EDR
authorSatya Calloji <satyac@broadcom.com>
Thu, 30 Apr 2015 20:58:59 +0000 (13:58 -0700)
committerAndre Eisenbach <eisenbach@google.com>
Mon, 8 Jun 2015 09:50:47 +0000 (02:50 -0700)
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 <paghera@broadcom.com>
Change-Id: I568f936bb7bee21fb78e8454469ecad3445f026f

stack/btm/btm_ble.c
stack/smp/smp_act.c

index 597be99..3eed315 100644 (file)
@@ -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*/
index f4e81dc..4adde96 100644 (file)
@@ -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 */
     {