Merge branch 'bugfix/btdm_fix_conn_params_update_failed_in_SMP_for_v3.0' into 'release/v3.0'

Component/bt: fix update connection params error in smp for v3.0

See merge request !1809
This commit is contained in:
Jiang Jiang Jian 2018-01-16 16:38:36 +08:00
commit ff3566e40b
2 changed files with 14 additions and 4 deletions

View file

@ -1025,11 +1025,17 @@ void l2cble_process_rc_param_request_evt(UINT16 handle, UINT16 int_min, UINT16 i
if ((p_lcb->conn_update_mask & L2C_BLE_CONN_UPDATE_DISABLE) == 0) {
p_lcb->conn_update_mask |= L2C_BLE_UPDATE_PENDING;
btsnd_hcic_ble_rc_param_req_reply(handle, int_min, int_max, latency, timeout, 0, 0);
}else {
/* always accept connection parameters request which is sent by itself */
if (int_max == BTM_BLE_CONN_INT_MIN) {
p_lcb->conn_update_mask |= L2C_BLE_UPDATE_PENDING;
btsnd_hcic_ble_rc_param_req_reply(handle, int_min, int_max, latency, timeout, 0, 0);
}else {
L2CAP_TRACE_EVENT ("L2CAP - LE - update currently disabled");
p_lcb->conn_update_mask |= L2C_BLE_NEW_CONN_PARAM;
btsnd_hcic_ble_rc_param_req_neg_reply (handle, HCI_ERR_UNACCEPT_CONN_INTERVAL);
}
}
} else {
L2CAP_TRACE_WARNING("No link to update connection parameter")

View file

@ -974,6 +974,10 @@ void smp_proc_pairing_cmpl(tSMP_CB *p_cb)
memcpy (pairing_bda, p_cb->pairing_bda, BD_ADDR_LEN);
if (p_cb->role == HCI_ROLE_SLAVE) {
L2CA_EnableUpdateBleConnParams(p_cb->pairing_bda, TRUE);
}
smp_reset_control_value(p_cb);
if (p_callback) {