Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a46e6cc6 authored by Myles Watson's avatar Myles Watson Committed by Automerger Merge Worker
Browse files

Merge "Remove unused ble_create_ll_conn_complete" into main am: a2358464 am: 88f8cabf

parents 264c7089 88f8cabf
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -208,7 +208,6 @@ cc_library_static {
        "acl/acl.cc",
        "acl/ble_acl.cc",
        "acl/btm_acl.cc",
        "acl/btm_ble_connection_establishment.cc",
        "acl/btm_pm.cc",
        "arbiter/acl_arbiter.cc",
        "btm/ble_scanner_hci_interface.cc",
@@ -1494,7 +1493,6 @@ cc_test {
        "acl/acl.cc",
        "acl/ble_acl.cc",
        "acl/btm_acl.cc",
        "acl/btm_ble_connection_establishment.cc",
        "acl/btm_pm.cc",
        "btm/ble_scanner_hci_interface.cc",
        "btm/btm_ble.cc",
+0 −1
Original line number Diff line number Diff line
@@ -62,7 +62,6 @@ source_set("stack") {
    "acl/acl.cc",
    "acl/ble_acl.cc",
    "acl/btm_acl.cc",
    "acl/btm_ble_connection_establishment.cc",
    "acl/btm_pm.cc",
    "arbiter/acl_arbiter.cc",
    "avct/avct_api.cc",
+0 −45
Original line number Diff line number Diff line
/******************************************************************************
 *
 *  Copyright 2019 The Android Open Source Project
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at:
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 ******************************************************************************/

#include <base/logging.h>
#include <frameworks/proto_logging/stats/enums/bluetooth/enums.pb.h>
#include <frameworks/proto_logging/stats/enums/bluetooth/hci/enums.pb.h>

#include "stack/btm/btm_ble_int.h"
#include "stack/btm/btm_int_types.h"
#include "stack/include/ble_hci_link_interface.h"

extern tBTM_CB btm_cb;

/** LE connection complete. */
void btm_ble_create_ll_conn_complete(tHCI_STATUS status) {
  if (status == HCI_SUCCESS) return;

  LOG(WARNING) << "LE Create Connection attempt failed, status="
               << hci_error_code_text(status);

  if (status == HCI_ERR_COMMAND_DISALLOWED) {
    btm_cb.ble_ctr_cb.set_connection_state_connecting();
    btm_ble_set_topology_mask(BTM_BLE_STATE_INIT_BIT);
    LOG(ERROR) << "LE Create Connection - command disallowed";
  } else {
    btm_cb.ble_ctr_cb.set_connection_state_idle();
    btm_ble_clear_topology_mask(BTM_BLE_STATE_INIT_BIT);
    btm_ble_update_mode_operation(HCI_ROLE_UNKNOWN, NULL, status);
  }
}
+0 −7
Original line number Diff line number Diff line
@@ -1286,13 +1286,6 @@ static void btu_hcif_hdl_command_status(uint16_t opcode, uint8_t status,
      }
      break;

    // BLE Commands
    case HCI_BLE_CREATE_LL_CONN:
    case HCI_LE_EXTENDED_CREATE_CONNECTION:
      if (status != HCI_SUCCESS) {
        btm_ble_create_ll_conn_complete(hci_status);
      }
      break;
    case HCI_BLE_START_ENC:
      // Race condition: disconnection happened right before we send
      // "LE Encrypt", controller responds with no connection, we should
+0 −1
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@ void btm_ble_process_ext_adv_pkt(uint8_t len, const uint8_t* p);
void btm_ble_process_phy_update_pkt(uint8_t len, uint8_t* p);
void btm_ble_read_remote_features_complete(uint8_t* p, uint8_t length);
void btm_ble_write_adv_enable_complete(uint8_t* p, uint16_t evt_len);
void btm_ble_create_ll_conn_complete(tHCI_STATUS status);
void btm_ble_ltk_request(uint16_t handle, uint8_t rand[8], uint16_t ediv);
void btm_ble_test_command_complete(uint8_t* p);
void btm_ble_read_resolving_list_entry_complete(const uint8_t* p,
Loading