From 0bb581fb969dbc375b1d4d54139fcadb52f95eee Mon Sep 17 00:00:00 2001 From: Stanley Tng Date: Wed, 19 Jul 2017 10:55:01 -0700 Subject: [PATCH] Fixed the HCI ACL Header definitions for PB and BC Flags The byte offsets for Packet Boundary (PB) and Broadcast (BC) flags in the HCI ACL Header is swapped. This will fixed it so that it matches the Bluetooth Specifications. Bug: 63241720 Test: Run manual VTS tests for Bluetooth Merged-In: Ifc1f4d4f054a1dab13458c563e47bfb884f39d92 Change-Id: Ifc1f4d4f054a1dab13458c563e47bfb884f39d92 (cherry picked from commit 7915b71fb9fdc8a378b2aae9b618d67bf64d4971) (cherry picked from commit 5c98115486efada50017b8222b129bb4b9bef81d) --- .../vts/functional/VtsHalBluetoothV1_0TargetTest.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp b/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp index d699f21141..fb53366c2f 100644 --- a/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp +++ b/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp @@ -88,8 +88,14 @@ using ::android::sp; #define EVENT_NUMBER_OF_COMPLETED_PACKETS_NUM_HANDLES 2 -#define ACL_BROADCAST_ACTIVE_SLAVE (0x1 << 4) -#define ACL_PACKET_BOUNDARY_COMPLETE (0x3 << 6) +#define ACL_BROADCAST_FLAG_OFFSET 6 +#define ACL_BROADCAST_FLAG_ACTIVE_SLAVE 0x1 +#define ACL_BROADCAST_ACTIVE_SLAVE (ACL_BROADCAST_FLAG_ACTIVE_SLAVE << ACL_BROADCAST_FLAG_OFFSET) + +#define ACL_PACKET_BOUNDARY_FLAG_OFFSET 4 +#define ACL_PACKET_BOUNDARY_FLAG_COMPLETE 0x3 +#define ACL_PACKET_BOUNDARY_COMPLETE \ + (ACL_PACKET_BOUNDARY_FLAG_COMPLETE << ACL_PACKET_BOUNDARY_FLAG_OFFSET) constexpr char kCallbackNameAclEventReceived[] = "aclDataReceived"; constexpr char kCallbackNameHciEventReceived[] = "hciEventReceived";