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

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

Update stack/::ble_addr_type

Using strict types tBLE_ADDR_TYPE

Towards readable code

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I2ebc464cc225fd17fc6c3e43c3c6883b867b7ea9
parent 3ebdca5f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -68,8 +68,8 @@ typedef struct {
  uint16_t lmp_subversion;
  uint16_t manufacturer;
  uint16_t pkt_types_mask;
  uint8_t active_remote_addr_type;
  uint8_t conn_addr_type;
  tBLE_ADDR_TYPE active_remote_addr_type;
  tBLE_ADDR_TYPE conn_addr_type;
  uint8_t disconnect_reason;

 private:
+1 −1
Original line number Diff line number Diff line
@@ -2425,7 +2425,7 @@ bool BTM_BLE_IS_RESOLVE_BDA(const RawAddress& x) {
}

bool acl_refresh_remote_address(const tBTM_SEC_DEV_REC* p_sec_rec,
                                const RawAddress& bda, uint8_t rra_type,
                                const RawAddress& bda, tBLE_ADDR_TYPE rra_type,
                                const RawAddress& rpa) {
  tACL_CONN* p_acl = internal_.btm_bda_to_acl(bda, BT_TRANSPORT_LE);
  if (p_acl == nullptr) {
+1 −1
Original line number Diff line number Diff line
@@ -1500,7 +1500,7 @@ void btm_ble_update_inq_result(tINQ_DB_ENT* p_i, uint8_t addr_type,

  /* Save the info */
  p_cur->inq_result_type |= BTM_INQ_RESULT_BLE;
  p_cur->ble_addr_type = addr_type;
  p_cur->ble_addr_type = static_cast<tBLE_ADDR_TYPE>(addr_type);
  p_cur->rssi = rssi;
  p_cur->ble_primary_phy = primary_phy;
  p_cur->ble_secondary_phy = secondary_phy;
+1 −1
Original line number Diff line number Diff line
@@ -439,7 +439,7 @@ typedef struct {
  bool eir_complete_list;
  tBT_DEVICE_TYPE device_type;
  uint8_t inq_result_type;
  uint8_t ble_addr_type;
  tBLE_ADDR_TYPE ble_addr_type;
  uint16_t ble_evt_type;
  uint8_t ble_primary_phy;
  uint8_t ble_secondary_phy;
+1 −1
Original line number Diff line number Diff line
@@ -318,7 +318,7 @@ typedef struct {
  Octet16 csrk; /* storage for local CSRK */
  uint16_t ediv;
  BT_OCTET8 enc_rand;
  uint8_t addr_type;
  tBLE_ADDR_TYPE addr_type;
  RawAddress local_bda;
  bool is_pair_cancel;
  bool discard_sec_req;
Loading