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

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

Merge changes I813f2040,Ic1033d9c into main am: bd2b107c

parents c008fcb8 bd2b107c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -45,7 +45,6 @@
#include "bta/sys/bta_sys.h"
#include "btif/include/btif_dm.h"
#include "btif/include/stack_manager_t.h"
#include "device/include/controller.h"
#include "hci/controller_interface.h"
#include "include/bind_helpers.h"
#include "include/check.h"
@@ -1471,8 +1470,9 @@ void bta_dm_ble_update_conn_params(const RawAddress& bd_addr, uint16_t min_int,

/** This function set the maximum transmission packet size */
void bta_dm_ble_set_data_length(const RawAddress& bd_addr) {
  const controller_t* controller = controller_get_interface();
  uint16_t max_len = controller->get_ble_maximum_tx_data_length();
  uint16_t max_len = bluetooth::shim::GetController()
                         ->GetLeMaximumDataLength()
                         .supported_max_tx_octets_;

  if (BTM_SetBleDataLength(bd_addr, max_len) != BTM_SUCCESS) {
    log::info("Unable to set ble data length:{}", max_len);
+2 −2
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@
#include "bta/gatt/bta_gattc_int.h"
#include "bta/include/bta_api.h"
#include "btif/include/btif_debug_conn.h"
#include "device/include/controller.h"
#include "hardware/bt_gatt_types.h"
#include "hci/controller_interface.h"
#include "include/check.h"
@@ -229,7 +228,8 @@ void bta_gattc_register(const Uuid& app_uuid, tBTA_GATTC_CBACK* p_cback,
void bta_gattc_deregister(tBTA_GATTC_RCB* p_clreg) {
  uint8_t accept_list_size = 0;
  if (bluetooth::shim::GetController()->SupportsBle()) {
    accept_list_size = controller_get_interface()->get_ble_acceptlist_size();
    accept_list_size =
        bluetooth::shim::GetController()->GetLeFilterAcceptListSize();
  }

  /* remove bg connection associated with this rcb */
+2 −3
Original line number Diff line number Diff line
@@ -33,8 +33,6 @@
#include <vector>

#include "bta/gatt/bta_gattc_int.h"
#include "device/include/controller.h"
#include "internal_include/bt_target.h"
#include "os/log.h"
#include "osi/include/allocator.h"
#include "stack/include/bt_hdr.h"
@@ -136,7 +134,8 @@ void BTA_GATTC_AppDeregister(tGATT_IF client_if) {
 ******************************************************************************/
void BTA_GATTC_Open(tGATT_IF client_if, const RawAddress& remote_bda,
                    tBTM_BLE_CONN_TYPE connection_type, bool opportunistic) {
  uint8_t phy = controller_get_interface()->get_le_all_initiating_phys();
  constexpr uint8_t kPhyLe1M = 0x01;  // From the old controller shim.
  uint8_t phy = kPhyLe1M;
  BTA_GATTC_Open(client_if, remote_bda, connection_type, BT_TRANSPORT_LE,
                 opportunistic, phy);
}
+1 −3
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@

#include "bta/gatt/bta_gattc_int.h"
#include "common/init_flags.h"
#include "device/include/controller.h"
#include "hci/controller_interface.h"
#include "internal_include/bt_target.h"
#include "internal_include/bt_trace.h"
@@ -45,11 +44,10 @@
using namespace bluetooth;

static uint8_t ble_acceptlist_size() {
  const controller_t* controller = controller_get_interface();
  if (!bluetooth::shim::GetController()->SupportsBle()) {
    return 0;
  }
  return controller->get_ble_acceptlist_size();
  return bluetooth::shim::GetController()->GetLeFilterAcceptListSize();
}

/*******************************************************************************
+4 −4
Original line number Diff line number Diff line
@@ -33,9 +33,9 @@

#include "bta_hh_api.h"
#include "btif_hh.h"
#include "device/include/controller.h"
#include "hci/controller_interface.h"
#include "include/check.h"
#include "os/log.h"
#include "main/shim/entry.h"
#include "osi/include/allocator.h"
#include "osi/include/compat.h"
#include "osi/include/osi.h"
@@ -609,10 +609,10 @@ void bta_hh_co_send_hid_info(btif_hh_device_t* p_dev, const char* dev_name,

  // Write controller address to phys field to correlate the hid device with a
  // specific bluetooth controller.
  const controller_t* controller = controller_get_interface();
  auto controller = bluetooth::shim::GetController();
  // TODO (b/258090765) fix: ToString -> ToColonSepHexString
  snprintf((char*)ev.u.create.phys, sizeof(ev.u.create.phys), "%s",
           controller->get_address()->ToString().c_str());
           controller->GetMacAddress().ToString().c_str());

  ev.u.create.rd_size = dscp_len;
  ev.u.create.rd_data = p_dscp;
Loading