kopia lustrzana https://github.com/espressif/esp-idf
Merge branch 'bugfix/btdm_ble_data_length_update_fail' into 'master'
Fix data length update failed Closes BT-1924 See merge request espressif/esp-idf!15499pull/7751/head
commit
ca8d432462
|
@ -5380,6 +5380,16 @@ void bta_dm_ble_set_data_length(tBTA_DM_MSG *p_data)
|
|||
APPL_TRACE_ERROR("%s error: Invalid connection remote_bda.", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
p_acl_cb->p_set_pkt_data_cback = p_data->ble_set_data_length.p_set_pkt_data_cback;
|
||||
// if the value of the data length is same, triger callback directly
|
||||
if(p_data->ble_set_data_length.tx_data_length == p_acl_cb->data_length_params.tx_len) {
|
||||
if(p_data->ble_set_data_length.p_set_pkt_data_cback) {
|
||||
(*p_data->ble_set_data_length.p_set_pkt_data_cback)(status, &p_acl_cb->data_length_params);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if(p_acl_cb->data_len_updating) {
|
||||
// aleady have one cmd
|
||||
if(p_acl_cb->data_len_waiting) {
|
||||
|
@ -5392,14 +5402,6 @@ void bta_dm_ble_set_data_length(tBTA_DM_MSG *p_data)
|
|||
return;
|
||||
}
|
||||
} else {
|
||||
p_acl_cb->p_set_pkt_data_cback = p_data->ble_set_data_length.p_set_pkt_data_cback;
|
||||
// if the value of the data length is same, triger callback directly
|
||||
if(p_data->ble_set_data_length.tx_data_length == p_acl_cb->data_length_params.tx_len) {
|
||||
if(p_data->ble_set_data_length.p_set_pkt_data_cback) {
|
||||
(*p_data->ble_set_data_length.p_set_pkt_data_cback)(status, &p_acl_cb->data_length_params);
|
||||
}
|
||||
return;
|
||||
}
|
||||
status = BTM_SetBleDataLength(p_data->ble_set_data_length.remote_bda,
|
||||
p_data->ble_set_data_length.tx_data_length);
|
||||
}
|
||||
|
|
|
@ -954,8 +954,10 @@ void btm_read_remote_version_complete (UINT8 *p)
|
|||
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();
|
||||
p_acl_cb->data_len_updating = true;
|
||||
btsnd_hcic_ble_set_data_length(p_acl_cb->hci_handle, data_length, data_txtime);
|
||||
if (data_length != p_acl_cb->data_length_params.tx_len) {
|
||||
p_acl_cb->data_len_updating = true;
|
||||
btsnd_hcic_ble_set_data_length(p_acl_cb->hci_handle, data_length, data_txtime);
|
||||
}
|
||||
}
|
||||
l2cble_notify_le_connection (p_acl_cb->remote_addr);
|
||||
} else {
|
||||
|
|
Ładowanie…
Reference in New Issue