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

Commit c2fd2fa9 authored by Myles Watson's avatar Myles Watson Committed by Gerrit Code Review
Browse files

Merge changes Ic874f1b6,Ia47f4659,Ic3b255e7

* changes:
  Remove unused acl_link_segments_xmitted
  Remove unused messages
  Remove bte_main
parents ad010591 f2340a70
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -192,7 +192,6 @@ void btif_remote_properties_evt(bt_status_t status, RawAddress* remote_addr,
                                uint32_t num_props, bt_property_t* p_props);

void bte_load_did_conf(const char* p_path);
void bte_main_init(void);

bt_status_t btif_transfer_context(tBTIF_CBACK* p_cback, uint16_t event,
                                  char* p_params, int param_len,
+0 −1
Original line number Diff line number Diff line
@@ -259,7 +259,6 @@ static void init_stack_internal(bluetooth::core::CoreInterface* interface) {

  module_init(get_local_module(DEVICE_IOT_CONFIG_MODULE));
  module_init(get_local_module(OSI_MODULE));
  bte_main_init();
  module_start_up(get_local_module(GD_SHIM_MODULE));
  module_init(get_local_module(BTIF_CONFIG_MODULE));
  btif_init_bluetooth();
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,6 @@ filegroup {
        "bte_conf.cc",
        "bte_init_cpp_logging.cc",
        "bte_logmsg.cc",
        "bte_main.cc",
        "stack_config.cc",
    ],
}
@@ -175,6 +174,7 @@ cc_test {
        ":TestCommonMockFunctions",
        ":TestMockBta",
        ":TestMockBtif",
        ":TestMockBtu",
        ":TestMockLegacyHciCommands",
        ":TestMockLegacyHciInterface",
        ":TestMockMainShimEntry",
+0 −2
Original line number Diff line number Diff line
@@ -48,7 +48,6 @@ target(lib_type, "bluetooth") {
    "bte_conf.cc",
    "bte_init_cpp_logging.cc",
    "bte_logmsg.cc",
    "bte_main.cc",
    "stack_config.cc",
  ]

@@ -69,7 +68,6 @@ target(lib_type, "bluetooth") {
    "//bt/system/udrv/include",
    "//bt/system/btif/include",
    "//bt/system/btif/co",
    "//bt/system/hci/includ",
    "//bt/system/vnd/include",
    "//bt/system/brcm/include",
    "//bt/system/embdrv/sbc/encoder/include",

system/main/bte_main.cc

deleted100644 → 0
+0 −85
Original line number Diff line number Diff line
/******************************************************************************
 *
 *  Copyright 2009-2012 Broadcom Corporation
 *
 *  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.
 *
 ******************************************************************************/

/******************************************************************************
 *
 *  Filename:      bte_main.cc
 *
 *  Description:   Contains BTE core stack initialization and shutdown code
 *
 ******************************************************************************/

#define LOG_TAG "bt_main"

#include <base/logging.h>
#include <hardware/bluetooth.h>

#include "btcore/include/module.h"
#include "btif/include/btif_config.h"
#include "btu.h"
#include "hci/include/hci_layer.h"
#include "main/shim/hci_layer.h"
#include "osi/include/allocator.h"
#include "osi/include/log.h"
#include "osi/include/osi.h"
#include "shim/hci_layer.h"
#include "shim/shim.h"
#include "stack/include/bt_hdr.h"
#include "stack_config.h"

/*******************************************************************************
 *  Static variables
 ******************************************************************************/
static const hci_t* hci;

/*******************************************************************************
 *  Externs
 ******************************************************************************/
void btu_hci_msg_process(BT_HDR* p_msg);

/*******************************************************************************
 *  Static functions
 ******************************************************************************/

/******************************************************************************
 *
 * Function         post_to_hci_message_loop
 *
 * Description      Post an HCI event to the main thread
 *
 * Returns          None
 *
 *****************************************************************************/
static void post_to_main_message_loop(const base::Location& from_here,
                                      BT_HDR* p_msg) {
  if (do_in_main_thread(from_here, base::Bind(&btu_hci_msg_process, p_msg)) !=
      BT_STATUS_SUCCESS) {
    LOG(ERROR) << __func__ << ": do_in_main_thread failed from "
               << from_here.ToString();
  }
}

void bte_main_init(void) {
  hci = bluetooth::shim::hci_layer_get_interface();
  if (!hci) {
    LOG_ERROR("%s could not get hci layer interface.", __func__);
    return;
  }

  hci->set_data_cb(base::Bind(&post_to_main_message_loop));
}
Loading