From d557e7f0bd31f9cbd8c209ee20db2a8515543c07 Mon Sep 17 00:00:00 2001 From: Josh Conner Date: Mon, 4 Nov 2024 15:36:07 +0000 Subject: [PATCH] pw_bluetooth_sapphire: Remove another packed struct MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove packed struct ChangeConnectionLinkKeyCompleteEventParams and use emboss references instead. Bug: b/42167863 Test: pw presubmit --step gn_chre_googletest_nanopb_sapphire_build Change-Id: I28f04b672d0f0ccf7d2589eb7735d146b8487a31 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/246313 Commit-Queue: Josh Conner Docs-Not-Needed: Josh Conner Reviewed-by: Jason Graffius Lint: Lint 🤖 Presubmit-Verified: CQ Bot Account --- pw_bluetooth_sapphire/host/transport/control_packets.cc | 2 +- .../internal/host/hci-spec/protocol.h | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/pw_bluetooth_sapphire/host/transport/control_packets.cc b/pw_bluetooth_sapphire/host/transport/control_packets.cc index 38489f76e..a06f62d04 100644 --- a/pw_bluetooth_sapphire/host/transport/control_packets.cc +++ b/pw_bluetooth_sapphire/host/transport/control_packets.cc @@ -126,7 +126,7 @@ bool EventPacket::ToStatusCode( switch (event_code()) { CASE_EMBOSS_EVENT_STATUS(AuthenticationComplete); - CASE_EVENT_STATUS(ChangeConnectionLinkKeyComplete); + CASE_EMBOSS_EVENT_STATUS(ChangeConnectionLinkKeyComplete); CASE_EVENT_STATUS(CommandComplete); CASE_EVENT_STATUS(CommandStatus); CASE_EMBOSS_EVENT_STATUS(ConnectionComplete); diff --git a/pw_bluetooth_sapphire/public/pw_bluetooth_sapphire/internal/host/hci-spec/protocol.h b/pw_bluetooth_sapphire/public/pw_bluetooth_sapphire/internal/host/hci-spec/protocol.h index 7126fd903..0f8545dab 100644 --- a/pw_bluetooth_sapphire/public/pw_bluetooth_sapphire/internal/host/hci-spec/protocol.h +++ b/pw_bluetooth_sapphire/public/pw_bluetooth_sapphire/internal/host/hci-spec/protocol.h @@ -506,15 +506,6 @@ constexpr EventCode kEncryptionChangeEventCode = 0x08; // Change Connection Link Key Complete Event (v1.1) (BR/EDR) constexpr EventCode kChangeConnectionLinkKeyCompleteEventCode = 0x09; -struct ChangeConnectionLinkKeyCompleteEventParams { - // See enum StatusCode in hci_constants.h. - StatusCode status; - - // Connection_Handle (only the lower 12-bits are meaningful). - // Range: 0x0000 to kConnectionHandleMax in hci_constants.h - ConnectionHandle connection_handle; -} __attribute__((packed)); - // ============================================================= // Read Remote Supported Features Complete Event (v1.1) (BR/EDR) constexpr EventCode kReadRemoteSupportedFeaturesCompleteEventCode = 0x0B;