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

Commit fd854e27 authored by Chris Manton's avatar Chris Manton
Browse files

combine multiple BTM_BLE_IS_RESOLVE_BDA() functions

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working

Change-Id: I44fcc4d71956020d449992fc579ab8384e72ea48
parent 33335433
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -86,13 +86,6 @@ extern const btgatt_callbacks_t* bt_gatt_callbacks;
    }                                                   \
  } while (0)

#define BLE_RESOLVE_ADDR_MSB                                                   \
  0x40                             /* bit7, bit6 is 01 to be resolvable random \
                                      */
#define BLE_RESOLVE_ADDR_MASK 0xc0 /* bit 6, and bit7 */
inline bool BTM_BLE_IS_RESOLVE_BDA(const RawAddress& x) {
  return ((x.address)[0] & BLE_RESOLVE_ADDR_MASK) == BLE_RESOLVE_ADDR_MSB;
}
namespace {

uint8_t rssi_request_client_if;
+4 −0
Original line number Diff line number Diff line
@@ -2406,3 +2406,7 @@ bool acl_is_role_master(const RawAddress& bda, tBT_TRANSPORT transport) {
  }
  return (p->link_role == HCI_ROLE_MASTER);
}

bool BTM_BLE_IS_RESOLVE_BDA(const RawAddress& x) {
  return ((x.address)[0] & BLE_RESOLVE_ADDR_MASK) == BLE_RESOLVE_ADDR_MSB;
}
+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@

#include "btm_ble_int.h"
#include "stack/crypto_toolbox/crypto_toolbox.h"
#include "stack/include/acl_api.h"

/* This function generates Resolvable Private Address (RPA) from Identity
 * Resolving Key |irk| and |random|*/
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
#include "common/metrics.h"
#include "device/include/controller.h"
#include "stack/gatt/connection_manager.h"
#include "stack/include/acl_api.h"
#include "stack/include/hcimsgs.h"
#include "stack/include/l2cap_hci_link_interface.h"

+1 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@

#include "main/shim/btm_api.h"
#include "main/shim/shim.h"
#include "stack/include/acl_api.h"

#define BTM_EXT_BLE_RMT_NAME_TIMEOUT_MS (30 * 1000)
#define MIN_ADV_LENGTH 2
Loading