}
}
+ // already have encrypted information, do not need to update connection parameters
+ if(link_role == BTM_ROLE_SLAVE && (p_rec->ble.key_type & BTM_LE_KEY_PENC)) {
+ p_rec->ble.skip_update_conn_param = true;
+ } else {
+ p_rec->ble.skip_update_conn_param = false;
+ }
if (SMP_Pair(bd_addr) == SMP_STARTED) {
cmd = BTM_CMD_STARTED;
p_rec->sec_state = BTM_SEC_STATE_AUTHENTICATING;
#if SMP_INCLUDED == TRUE
tBTM_LE_KEY_TYPE key_type; /* bit mask of valid key types in record */
tBTM_SEC_BLE_KEYS keys; /* LE device security info in slave rode */
+ bool skip_update_conn_param; /* skip update connection paraams or not*/
#endif
#if (BLE_PRIVACY_SPT == TRUE)
tBLE_ADDR_TYPE current_addr_type; /* current adv addr type*/
*******************************************************************************/
void smp_fast_conn_param(tSMP_CB *p_cb, tSMP_INT_DATA *p_data)
{
+ tBTM_SEC_DEV_REC *p_rec = btm_find_dev (p_cb->pairing_bda);
+ if(p_rec && p_rec->ble.skip_update_conn_param) {
+ //do nothing
+ return;
+ }
/* 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
tSMP_EVT_DATA evt_data = {0};
tSMP_CALLBACK *p_callback = p_cb->p_callback;
BD_ADDR pairing_bda;
+ tBTM_SEC_DEV_REC *p_rec;
SMP_TRACE_DEBUG ("smp_proc_pairing_cmpl \n");
memcpy (pairing_bda, p_cb->pairing_bda, BD_ADDR_LEN);
if (p_cb->role == HCI_ROLE_SLAVE) {
- L2CA_EnableUpdateBleConnParams(p_cb->pairing_bda, TRUE);
+ p_rec = btm_find_dev (p_cb->pairing_bda);
+ if(p_rec && p_rec->ble.skip_update_conn_param) {
+ //clear flag
+ p_rec->ble.skip_update_conn_param = false;
+ } else {
+ L2CA_EnableUpdateBleConnParams(p_cb->pairing_bda, TRUE);
+ }
}
smp_reset_control_value(p_cb);