From 4c715a228796d77b20f3accfe1e92adce8f37388 Mon Sep 17 00:00:00 2001 From: Chris Manton <cmanton@google.com> Date: Tue, 26 Oct 2021 22:36:02 -0700 Subject: [PATCH] legacy: Co-locate le address and le address types Bug: 203417776 Tag: #refactor Test: gd/cert/run Change-Id: I1c1fb44f2dd0189824375352fd5300bd4912526a --- system/main/shim/acl.cc | 10 ++++++---- system/stack/acl/acl.h | 5 +++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/system/main/shim/acl.cc b/system/main/shim/acl.cc index 5f1aa9ff119..f3080da49bf 100644 --- a/system/main/shim/acl.cc +++ b/system/main/shim/acl.cc @@ -1047,10 +1047,12 @@ void DumpsysAcl(int fd) { common::ToString(link.peer_le_features_valid).c_str(), bd_features_text(link.peer_le_features).c_str()); - LOG_DUMPSYS(fd, " [le] active_remote_addr:%s", - link.active_remote_addr.ToString().c_str()); - LOG_DUMPSYS(fd, " [le] conn_addr:%s", - link.conn_addr.ToString().c_str()); + LOG_DUMPSYS(fd, " [le] active_remote_addr:%s[%s]", + link.active_remote_addr.ToString().c_str(), + AddressTypeText(link.active_remote_addr_type).c_str()); + LOG_DUMPSYS(fd, " [le] conn_addr:%s[%s]", + link.conn_addr.ToString().c_str(), + AddressTypeText(link.conn_addr_type).c_str()); } } } diff --git a/system/stack/acl/acl.h b/system/stack/acl/acl.h index 9c4c9e65ee7..d114cdabae2 100644 --- a/system/stack/acl/acl.h +++ b/system/stack/acl/acl.h @@ -176,7 +176,10 @@ struct tACL_CONN { bool peer_lmp_feature_valid[HCI_EXT_FEATURES_PAGE_MAX + 1]; RawAddress active_remote_addr; + tBLE_ADDR_TYPE active_remote_addr_type; RawAddress conn_addr; + tBLE_ADDR_TYPE conn_addr_type; + RawAddress remote_addr; bool in_use{false}; @@ -200,8 +203,6 @@ struct tACL_CONN { uint16_t Handle() const { return hci_handle; } uint16_t link_super_tout; uint16_t pkt_types_mask; - tBLE_ADDR_TYPE active_remote_addr_type; - tBLE_ADDR_TYPE conn_addr_type; uint8_t disconnect_reason; private: -- GitLab