diff --git a/components/bt/host/bluedroid/stack/btm/btm_ble_gap.c b/components/bt/host/bluedroid/stack/btm/btm_ble_gap.c index 6976996e75..ef332e836c 100644 --- a/components/bt/host/bluedroid/stack/btm/btm_ble_gap.c +++ b/components/bt/host/bluedroid/stack/btm/btm_ble_gap.c @@ -4250,10 +4250,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); }