fix on data len change cmd malfunction

This commit is contained in:
cjin 2022-08-25 21:15:35 +08:00 committed by zhiweijian
parent 284b77e6a5
commit b70ffe519f

View File

@ -4153,10 +4153,11 @@ void btm_ble_read_remote_features_complete(UINT8 *p)
btsnd_hcic_rmt_ver_req (p_acl_cb->hci_handle);
}
else{
uint16_t data_length = controller_get_interface()->get_ble_default_data_packet_length();
uint16_t data_txtime = controller_get_interface()->get_ble_default_data_packet_txtime();
if (p_acl_cb->transport == BT_TRANSPORT_LE) {
if (HCI_LE_DATA_LEN_EXT_SUPPORTED(p_acl_cb->peer_le_features)) {
uint16_t data_length = controller_get_interface()->get_ble_default_data_packet_length();
uint16_t data_txtime = controller_get_interface()->get_ble_default_data_packet_txtime();
if (HCI_LE_DATA_LEN_EXT_SUPPORTED(p_acl_cb->peer_le_features) &&
(p_acl_cb->data_length_params.tx_len != data_length)) {
p_acl_cb->data_len_updating = true;
btsnd_hcic_ble_set_data_length(p_acl_cb->hci_handle, data_length, data_txtime);
}