diff options
Diffstat (limited to 'system/stack')
-rw-r--r-- | system/stack/acl/ble_acl.cc | 3 | ||||
-rw-r--r-- | system/stack/acl/btm_acl.cc | 80 | ||||
-rw-r--r-- | system/stack/btu/btu_hcif.cc | 8 | ||||
-rw-r--r-- | system/stack/include/acl_hci_link_interface.h | 2 |
4 files changed, 3 insertions, 90 deletions
diff --git a/system/stack/acl/ble_acl.cc b/system/stack/acl/ble_acl.cc index 30b645c94b..448dabd12c 100644 --- a/system/stack/acl/ble_acl.cc +++ b/system/stack/acl/ble_acl.cc @@ -145,8 +145,7 @@ void acl_ble_enhanced_connection_complete_from_shim( // The legacy stack continues the LE connection after the read remote version // complete has been received. - l2cble_notify_le_connection(address_with_type.bda); - l2cble_use_preferred_conn_params(address_with_type.bda); + // maybe_chain_more_commands_after_read_remote_version_complete } void acl_ble_connection_fail(const tBLE_BD_ADDR& address_with_type, diff --git a/system/stack/acl/btm_acl.cc b/system/stack/acl/btm_acl.cc index 563215112a..85eb5d8580 100644 --- a/system/stack/acl/btm_acl.cc +++ b/system/stack/acl/btm_acl.cc @@ -91,7 +91,6 @@ struct StackAclBtmAcl { bool change_connection_packet_types(tACL_CONN& link, const uint16_t new_packet_type_bitmask); void btm_establish_continue(tACL_CONN* p_acl_cb); - void btm_read_remote_features(uint16_t handle); void btm_set_default_link_policy(tLINK_POLICY settings); void btm_acl_role_changed(tHCI_STATUS hci_status, const RawAddress& bd_addr, tHCI_ROLE new_role); @@ -834,24 +833,6 @@ void btm_process_remote_version_complete(uint8_t status, uint16_t handle, } } -void btm_read_remote_version_complete_raw(uint8_t* p) { - uint8_t status; - uint16_t handle; - uint8_t lmp_version; - uint16_t manufacturer; - uint16_t lmp_subversion; - - STREAM_TO_UINT8(status, p); - STREAM_TO_UINT16(handle, p); - STREAM_TO_UINT8(lmp_version, p); - STREAM_TO_UINT16(manufacturer, p); - STREAM_TO_UINT16(lmp_subversion, p); - - ASSERT_LOG(false, "gd acl layer should be receiving this completion"); - btm_read_remote_version_complete(static_cast<tHCI_STATUS>(status), handle, - lmp_version, manufacturer, lmp_version); -} - void btm_read_remote_version_complete(tHCI_STATUS status, uint16_t handle, uint8_t lmp_version, uint16_t manufacturer, @@ -898,40 +879,6 @@ void btm_process_remote_ext_features(tACL_CONN* p_acl_cb, /******************************************************************************* * - * Function btm_read_remote_features - * - * Description Local function called to send a read remote supported - * features/remote extended features page[0]. - * - * Returns void - * - ******************************************************************************/ -void StackAclBtmAcl::btm_read_remote_features(uint16_t handle) { - uint8_t acl_idx; - tACL_CONN* p_acl_cb; - - acl_idx = btm_handle_to_acl_index(handle); - if (acl_idx >= MAX_L2CAP_LINKS) { - LOG_WARN("Unable to find active acl"); - return; - } - - p_acl_cb = &btm_cb.acl_cb_.acl_db[acl_idx]; - memset(p_acl_cb->peer_lmp_feature_pages, 0, - sizeof(p_acl_cb->peer_lmp_feature_pages)); - - /* first send read remote supported features HCI command */ - /* because we don't know whether the remote support extended feature command - */ - if (bluetooth::shim::is_gd_l2cap_enabled()) { - // GD L2cap reads this automatically - return; - } - btsnd_hcic_rmt_features_req(handle); -} - -/******************************************************************************* - * * Function btm_read_remote_ext_features * * Description Local function called to send a read remote extended @@ -948,33 +895,6 @@ void btm_read_remote_ext_features(uint16_t handle, uint8_t page_number) { btsnd_hcic_rmt_ext_features(handle, page_number); } -/******************************************************************************* - * - * Function btm_read_remote_features_complete - * - * Description This function is called when the remote supported features - * complete event is received from the HCI. - * - * Returns void - * - ******************************************************************************/ -void btm_read_remote_features_complete_raw(uint8_t* p) { - uint8_t status; - uint16_t handle; - - STREAM_TO_UINT8(status, p); - - if (status != HCI_SUCCESS) { - LOG_WARN("Uanble to read remote features status:%s", - hci_error_code_text(static_cast<tHCI_STATUS>(status)).c_str()); - return; - } - - STREAM_TO_UINT16(handle, p); - - btm_read_remote_features_complete(handle, p); -} - void btm_read_remote_features_complete(uint16_t handle, uint8_t* features) { tACL_CONN* p_acl_cb = internal_.acl_get_connection_from_handle(handle); if (p_acl_cb == nullptr) { diff --git a/system/stack/btu/btu_hcif.cc b/system/stack/btu/btu_hcif.cc index b191e8a4f6..a356b56581 100644 --- a/system/stack/btu/btu_hcif.cc +++ b/system/stack/btu/btu_hcif.cc @@ -265,15 +265,9 @@ void btu_hcif_process_event(UNUSED_ATTR uint8_t controller_id, case HCI_ENCRYPTION_KEY_REFRESH_COMP_EVT: btu_hcif_encryption_key_refresh_cmpl_evt(p); break; - case HCI_READ_RMT_FEATURES_COMP_EVT: - btm_read_remote_features_complete_raw(p); - break; case HCI_READ_RMT_EXT_FEATURES_COMP_EVT: btu_hcif_read_rmt_ext_features_comp_evt(p, hci_evt_len); break; - case HCI_READ_RMT_VERSION_COMP_EVT: - btm_read_remote_version_complete_raw(p); - break; case HCI_COMMAND_COMPLETE_EVT: LOG_ERROR( "%s should not have received a command complete event. " @@ -434,6 +428,8 @@ void btu_hcif_process_event(UNUSED_ATTR uint8_t controller_id, // Events now captured by gd::hci_layer module case HCI_CONNECTION_COMP_EVT: // EventCode::CONNECTION_COMPLETE + case HCI_READ_RMT_FEATURES_COMP_EVT: // EventCode::READ_REMOTE_SUPPORTED_FEATURES_COMPLETE + case HCI_READ_RMT_VERSION_COMP_EVT: // EventCode::READ_REMOTE_VERSION_INFORMATION_COMPLETE default: LOG_ERROR( "Unexpectedly received event_code:0x%02x that should not be " diff --git a/system/stack/include/acl_hci_link_interface.h b/system/stack/include/acl_hci_link_interface.h index 006025184b..781c7bd4e0 100644 --- a/system/stack/include/acl_hci_link_interface.h +++ b/system/stack/include/acl_hci_link_interface.h @@ -57,9 +57,7 @@ void btm_read_remote_ext_features_complete_raw(uint8_t* p, uint8_t evt_len); void btm_read_remote_ext_features_complete(uint16_t handle, uint8_t page_num, uint8_t max_page, uint8_t* features); void btm_read_remote_ext_features_failed(uint8_t status, uint16_t handle); -void btm_read_remote_features_complete_raw(uint8_t* p); void btm_read_remote_features_complete(uint16_t handle, uint8_t* features); -void btm_read_remote_version_complete_raw(uint8_t* p); void btm_read_remote_version_complete(tHCI_STATUS status, uint16_t handle, uint8_t lmp_version, uint16_t manufacturer, |