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

Commit a25adeb1 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "legacy: Use proper types tBLE_ADDR_TYPE" am: fd25781e

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2028966

Change-Id: Ifbe57f64d1709c5456537179ee197a2deecface0
parents 6399c602 fd25781e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1505,7 +1505,7 @@ void shim::legacy::Acl::OnLeConnectSuccess(

  RawAddress local_rpa = RawAddress::kEmpty; /* TODO enhanced */
  RawAddress peer_rpa = RawAddress::kEmpty;  /* TODO enhanced */
  uint8_t peer_addr_type = 0;                /* TODO public */
  tBLE_ADDR_TYPE peer_addr_type = BLE_ADDR_PUBLIC; /* TODO public */

  // Once an le connection has successfully been established
  // the device address is removed from the controller accept list.
+2 −2
Original line number Diff line number Diff line
@@ -102,11 +102,11 @@ void bluetooth::shim::ACL_IgnoreAllLeConnections() {

void bluetooth::shim::ACL_ReadConnectionAddress(const RawAddress& pseudo_addr,
                                                RawAddress& conn_addr,
                                                uint8_t* p_addr_type) {
                                                tBLE_ADDR_TYPE* p_addr_type) {
  auto local_address =
      Stack::GetInstance()->GetAcl()->GetConnectionLocalAddress(pseudo_addr);
  conn_addr = ToRawAddress(local_address.GetAddress());
  *p_addr_type = static_cast<uint8_t>(local_address.GetAddressType());
  *p_addr_type = static_cast<tBLE_ADDR_TYPE>(local_address.GetAddressType());
}

void bluetooth::shim::ACL_AddToAddressResolution(
+2 −1
Original line number Diff line number Diff line
@@ -39,7 +39,8 @@ void ACL_Shutdown();
void ACL_IgnoreAllLeConnections();

void ACL_ReadConnectionAddress(const RawAddress& pseudo_addr,
                               RawAddress& conn_addr, uint8_t* p_addr_type);
                               RawAddress& conn_addr,
                               tBLE_ADDR_TYPE* p_addr_type);

void ACL_AddToAddressResolution(const tBLE_BD_ADDR& legacy_address_with_type,
                                const Octet16& peer_irk,
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ typedef struct {
                       tHCI_ROLE role, uint16_t conn_interval,
                       uint16_t conn_latency, uint16_t conn_timeout,
                       const RawAddress& local_rpa, const RawAddress& peer_rpa,
                       uint8_t peer_addr_type);
                       tBLE_ADDR_TYPE peer_addr_type);
  void (*on_failed)(const tBLE_BD_ADDR& address_with_type, uint16_t handle,
                    bool enhanced, tHCI_STATUS status);
  void (*on_disconnected)(tHCI_STATUS status, uint16_t handle,
+8 −6
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@

#include "main/shim/btm.h"

#include <base/logging.h>

#include <algorithm>
#include <chrono>
#include <cstddef>
@@ -40,12 +42,11 @@
#include "main/shim/shim.h"
#include "stack/btm/btm_dev.h"
#include "stack/btm/btm_int_types.h"
#include "types/ble_address_with_type.h"
#include "types/bluetooth/uuid.h"
#include "types/bt_transport.h"
#include "types/raw_address.h"

#include <base/logging.h>

extern tBTM_CB btm_cb;

static constexpr size_t kRemoteDeviceNameLength = 248;
@@ -60,10 +61,11 @@ extern void btm_process_inq_complete(tHCI_STATUS status, uint8_t result_type);
extern void btm_ble_process_adv_addr(RawAddress& raw_address,
                                     tBLE_ADDR_TYPE* address_type);
extern void btm_ble_process_adv_pkt_cont(
    uint16_t event_type, uint8_t address_type, const RawAddress& raw_address,
    uint8_t primary_phy, uint8_t secondary_phy, uint8_t advertising_sid,
    int8_t tx_power, int8_t rssi, uint16_t periodic_adv_int, uint8_t data_len,
    const uint8_t* data, const RawAddress& original_bda);
    uint16_t event_type, tBLE_ADDR_TYPE address_type,
    const RawAddress& raw_address, uint8_t primary_phy, uint8_t secondary_phy,
    uint8_t advertising_sid, int8_t tx_power, int8_t rssi,
    uint16_t periodic_adv_int, uint8_t data_len, const uint8_t* data,
    const RawAddress& original_bda);

extern void btm_api_process_inquiry_result(const RawAddress& raw_address,
                                           uint8_t page_scan_rep_mode,
Loading