OSDN Git Service

android-x86/system-bt.git
4 years agoUse AddressWithType in PairingHandlerLe
Jakub Pawlowski [Thu, 24 Oct 2019 18:12:35 +0000 (20:12 +0200)]
Use AddressWithType in PairingHandlerLe

Bug: 142341141
Test: updated unittests
Change-Id: Ic543148ca2d36f44e64ffb00744adf6d557b84c3

4 years agoExpose Role through AclConnection, Link, and le::FixedChannel
Jakub Pawlowski [Fri, 25 Oct 2019 09:36:43 +0000 (11:36 +0200)]
Expose Role through AclConnection, Link, and le::FixedChannel

Role is needed in SMP to properly bootstrap the pairing process

Bug: 142341141
Change-Id: If0815c7bc9d07180950e66dbaafd69220e933340

4 years agoMerge "L2CAP: Allow opening connection, and add PTS request_connection test"
Treehugger Robot [Fri, 25 Oct 2019 20:16:45 +0000 (20:16 +0000)]
Merge "L2CAP: Allow opening connection, and add PTS request_connection test"

4 years agoMerge "Add required header_libs"
Marco Nelissen [Fri, 25 Oct 2019 19:47:54 +0000 (19:47 +0000)]
Merge "Add required header_libs"

4 years agoL2CAP: Allow opening connection, and add PTS request_connection test
Hansong Zhang [Tue, 22 Oct 2019 23:11:53 +0000 (16:11 -0700)]
L2CAP: Allow opening connection, and add PTS request_connection test

* Allow reserving a channel to send channel connection request
* Handle open channel request from user API
* Add PTS test_basic_operation_request_connection
(L2CAP/COS/CED/BV-01-C)

Test: run_cert_test
Bug: 141557006
Change-Id: Ia8245a3f944dd1e731808d1c99ac79047b9d67a8

4 years agoMerge "Make FixedChannel and Link aware of address type"
Jakub Pawlowski [Thu, 24 Oct 2019 13:39:36 +0000 (13:39 +0000)]
Merge "Make FixedChannel and Link aware of address type"

4 years agoMake FixedChannel and Link aware of address type
Jakub Pawlowski [Thu, 24 Oct 2019 12:01:36 +0000 (14:01 +0200)]
Make FixedChannel and Link aware of address type

Bug: 140938432
Bug: 142341141
Change-Id: I120179eef18f3ac59e32e9196f700e51c47d1a84

4 years agoAdd required header_libs
Marco Nelissen [Mon, 21 Oct 2019 21:53:45 +0000 (14:53 -0700)]
Add required header_libs

Test: build
Bug: 143245419
Change-Id: Iadfb621e477e1cef325385f3f5b10285cb3fc752

4 years agoMerge "HCI: Add fuzz test for HCI packets"
Treehugger Robot [Wed, 23 Oct 2019 20:01:41 +0000 (20:01 +0000)]
Merge "HCI: Add fuzz test for HCI packets"

4 years agoMerge "PDL: Parameterize the root namespace"
Treehugger Robot [Wed, 23 Oct 2019 18:44:38 +0000 (18:44 +0000)]
Merge "PDL: Parameterize the root namespace"

4 years agoMerge "L2CAP: Handle initial channel configuration"
Treehugger Robot [Wed, 23 Oct 2019 18:00:24 +0000 (18:00 +0000)]
Merge "L2CAP: Handle initial channel configuration"

4 years agoMerge "Connect inquiry results back to legacy layer"
Chris Manton [Wed, 23 Oct 2019 17:17:25 +0000 (17:17 +0000)]
Merge "Connect inquiry results back to legacy layer"

4 years agoMerge "Module: Mark getters as const"
Treehugger Robot [Wed, 23 Oct 2019 17:09:12 +0000 (17:09 +0000)]
Merge "Module: Mark getters as const"

4 years agoConnect inquiry results back to legacy layer
Chris Manton [Tue, 22 Oct 2019 21:24:58 +0000 (14:24 -0700)]
Connect inquiry results back to legacy layer

Bug: 141963466
Test: Compile
Change-Id: I949b1d90ead14cf15baa2a74db979ec76151650a
Merged-In: I949b1d90ead14cf15baa2a74db979ec76151650a

4 years agoModule: Mark getters as const
Myles Watson [Fri, 18 Oct 2019 18:21:47 +0000 (11:21 -0700)]
Module: Mark getters as const

Test: bluetooth_test_gd
Change-Id: Ieea21b113154bac1539a1ff73f4ca46ad37dfe35

4 years agoL2CAP: Handle initial channel configuration
Hansong Zhang [Wed, 16 Oct 2019 20:31:52 +0000 (13:31 -0700)]
L2CAP: Handle initial channel configuration

On channel open, send an empty configuration request, and always
respond empty to configuration request, to allow L2CAP basic dynamic
channel setup for testing.

Test: run_cert_test
Bug: 141557006

Change-Id: I95774ea093d069c83313c3e6d00d0bc2c3e6c4ed

4 years agoHCI: Add fuzz test for HCI packets
Jack He [Tue, 22 Oct 2019 22:57:10 +0000 (15:57 -0700)]
HCI: Add fuzz test for HCI packets

* Add fuzz test for a subset of HCI packets
* Modify the fuzz test generator to generate and register fuzz test at
  the same time

Bug: 142684649
Test: bluetooth_gd_fuzz_test
Change-Id: I1962fd497467bbf469d773823e3e6cf81f62772b

4 years agoStore Handler in common::CallbackList, and execute callbacks on proper handlers
Jakub Pawlowski [Tue, 22 Oct 2019 21:31:29 +0000 (23:31 +0200)]
Store Handler in common::CallbackList, and execute callbacks on proper handlers

Bug: 143169747
Change-Id: Ib8b6901956ffde9969decbe0b4653758d6a9ce52

4 years agoMerge "L2CAP: Call AclConnection.RegisterDisconnectCallback() in LinkManager"
Treehugger Robot [Tue, 22 Oct 2019 18:12:07 +0000 (18:12 +0000)]
Merge "L2CAP: Call AclConnection.RegisterDisconnectCallback() in LinkManager"

4 years agoMerge changes If88cfd69,Icea6e47b
Treehugger Robot [Tue, 22 Oct 2019 16:05:30 +0000 (16:05 +0000)]
Merge changes If88cfd69,Icea6e47b

* changes:
  Conditional entry between legacy Gd stack
  Gd shim layer neighbor modules

4 years agoMerge "RootCanal: Use gd/os/log.h logging"
Treehugger Robot [Tue, 22 Oct 2019 15:59:23 +0000 (15:59 +0000)]
Merge "RootCanal: Use gd/os/log.h logging"

4 years agoMerge "AVRCP Controller get play status"
Joseph Pirozzo [Tue, 22 Oct 2019 15:06:10 +0000 (15:06 +0000)]
Merge "AVRCP Controller get play status"

4 years agoConditional entry between legacy Gd stack
Chris Manton [Fri, 18 Oct 2019 16:30:27 +0000 (09:30 -0700)]
Conditional entry between legacy Gd stack

Bug: 141963466
Test: Inquiry/Discoverable operational in Gd mode
Change-Id: If88cfd69d4eb60e615c1f84e8972676e27364c73

4 years agoGd shim layer neighbor modules
Chris Manton [Thu, 17 Oct 2019 17:56:37 +0000 (10:56 -0700)]
Gd shim layer neighbor modules

Bug: 141963466
Test: Compiles for realz

Change-Id: Icea6e47bd9539613ea441ae2aed604b59e4b692f

4 years agoL2CAP: Call AclConnection.RegisterDisconnectCallback() in LinkManager
Jack He [Tue, 22 Oct 2019 01:44:27 +0000 (18:44 -0700)]
L2CAP: Call AclConnection.RegisterDisconnectCallback() in LinkManager

* LinkManager should get ACL disconnection callback from HCI since it
  needs to be able to free Link objects after tearing down Link states
* Previously, only Link is getting this callback, as result, there is a
  memory leak when ACL is disconnected as the Link object was never
  removed

Test: bluetooth_test_gd
Bug: 140938432
Change-Id: I28ed509cbaaa1c4917e1f632a6c35247f3ebe2ef

4 years agoHCI: Use AddressWithType in various LE connection APIs
Jack He [Tue, 22 Oct 2019 00:03:18 +0000 (17:03 -0700)]
HCI: Use AddressWithType in various LE connection APIs

* Use AddressWithType object to ease object management and hashing
* Track classic and LE pending connections separately in AclManager
* Report peer resolvable address in LE enhanced connection complete
  event if it is not empty

Bug: 138261114
Test: bluetooth_test_gd
Change-Id: I2bea155485a5bdc3d087336c6276952f3d64f0ac

4 years agoMerge changes I87ce02f0,I2c81de7a
Treehugger Robot [Tue, 22 Oct 2019 00:09:24 +0000 (00:09 +0000)]
Merge changes I87ce02f0,I2c81de7a

* changes:
  L2CAP: Use AddressWithType in L2CAP LE APIs
  HCI: Create AddressWithType and its unit tests

4 years agoAVRCP Controller get play status
Joseph Pirozzo [Mon, 21 Oct 2019 22:39:09 +0000 (15:39 -0700)]
AVRCP Controller get play status

Correct the parsing error in the GET_PLAY_STATUS message and call the
proper jni callback when it is received.

Bug: 139033614
Test: Connect AVRCP change media players, observe correct value parsed.
Change-Id: I8302b64efdd72bfa671cca5b8c512a436fa54ab3

4 years agoL2CAP: Use AddressWithType in L2CAP LE APIs
Jack He [Mon, 21 Oct 2019 22:03:11 +0000 (15:03 -0700)]
L2CAP: Use AddressWithType in L2CAP LE APIs

* Bluetooth Low Energy connections always require explicit AddressType
  information
* Replacing existing Address and AddressType arguments in l2cap::le
  stack with hci::AddressWithType objects for easier hashing and
  managment

Bug: 140938432
Test: bluetooth_test_gd
Change-Id: I87ce02f0a0c867053a2b3560886924a566881801

4 years agoHCI: Create AddressWithType and its unit tests
Jack He [Mon, 21 Oct 2019 22:01:41 +0000 (15:01 -0700)]
HCI: Create AddressWithType and its unit tests

* Create hci::AddressWithType that has both hci::Address and
  hci::AddressType in the same copyable, hashable, and comparable
  object for easier management
* Create unit tests for the hash function

Bug: 139135297
Test: bluetooth_test_gd.AddressWithTypeTest
Change-Id: I2c81de7a3bd19656b687ef498f02d6380321f92d

4 years agoMerge "Import base::CallbackList into bluetooth::common::CallbackList"
Treehugger Robot [Mon, 21 Oct 2019 21:40:33 +0000 (21:40 +0000)]
Merge "Import base::CallbackList into bluetooth::common::CallbackList"

4 years agoMerge "Add FUZZ test generator for packets and L2CAP fuzz tests"
Treehugger Robot [Mon, 21 Oct 2019 18:12:49 +0000 (18:12 +0000)]
Merge "Add FUZZ test generator for packets and L2CAP fuzz tests"

4 years agoImport base::CallbackList into bluetooth::common::CallbackList
Jakub Pawlowski [Mon, 21 Oct 2019 15:05:42 +0000 (17:05 +0200)]
Import base::CallbackList into bluetooth::common::CallbackList

We need a good mechanism for keeping lists of callbacks. Import if from
libchrome for now.

Test: compilation, libchrome already test that.
Change-Id: Ia88be4d80464b981e3794a6ca73909a1e7ce8c04

4 years agoMerge "Make le LinkManager aware of AddressType"
Jakub Pawlowski [Fri, 18 Oct 2019 23:26:51 +0000 (23:26 +0000)]
Merge "Make le LinkManager aware of AddressType"

4 years agoAdd FUZZ test generator for packets and L2CAP fuzz tests
Jack He [Fri, 18 Oct 2019 23:11:17 +0000 (16:11 -0700)]
Add FUZZ test generator for packets and L2CAP fuzz tests

* Add fuzz test generator for packet generator to generate macros for
  fuzz tests
* Add a few fuzz tests for L2CAP packets

Bug: 142684649
Test: bluetooth_gd_fuzz_test
Change-Id: I75bf726b40caef3c7895596039d01c395d34506f

4 years agoMake le LinkManager aware of AddressType
Jakub Pawlowski [Wed, 16 Oct 2019 20:25:28 +0000 (22:25 +0200)]
Make le LinkManager aware of AddressType

Bug: 142341141
Change-Id: I53b0d0eb8140a6109c0d3f237059b790c76a2111

4 years agoUpdate file group names
Martin Brabham [Fri, 18 Oct 2019 20:59:24 +0000 (13:59 -0700)]
Update file group names

Bug: N/A
Test: builds
Change-Id: Ie33178a3397343d0a80959a9e39f2f4ba03d5734

4 years agoPDL: Parameterize the root namespace
Myles Watson [Thu, 17 Oct 2019 16:12:36 +0000 (09:12 -0700)]
PDL: Parameterize the root namespace

Bug: 140384404
Test: bluetooth_packet_parser_test
Change-Id: I08aa14159ac86faf9e4e130540ecab77b93526e4

4 years agoRootCanal: Use gd/os/log.h logging
Myles Watson [Thu, 17 Oct 2019 18:36:33 +0000 (11:36 -0700)]
RootCanal: Use gd/os/log.h logging

Bug: 140384404
Test: builds
Change-Id: I442c9629ace0c39f26de59aaab70efa955f34c78

4 years agoMerge "Add a fuzzer in bluetooth gd for l2cap dynamic channel allocator"
Treehugger Robot [Fri, 18 Oct 2019 00:34:20 +0000 (00:34 +0000)]
Merge "Add a fuzzer in bluetooth gd for l2cap dynamic channel allocator"

4 years agoAdd a fuzzer in bluetooth gd for l2cap dynamic channel allocator
Zongheng Wang [Wed, 16 Oct 2019 23:39:11 +0000 (16:39 -0700)]
Add a fuzzer in bluetooth gd for l2cap dynamic channel allocator

Initialized fuzz test for Bluetooth GD library. There is one fuzz target
gd/fuzz_test.cc and it will call all fuzz tests in gd.

Created a fuzzer for l2cap classic internal dynamic channel allocator to
test DynamicChannelAllocator::IsPsmUsed(Psm psm).

Bug: 142684649
Test: bluetooth_gd_fuzz_test
Change-Id: If7c66d6aefc5d52448824f7f96f3118607a37215

4 years agoConnect gd/neighbor into build system
Chris Manton [Thu, 17 Oct 2019 05:26:22 +0000 (22:26 -0700)]
Connect gd/neighbor into build system

Bug: 142060811
Test: Compiles but for realz
Change-Id: I719133c6466aab5b1813c9c2e49e7c1a4f29ca6b

4 years agoFix initiating_PHYS bit in HCI_LE_Extend_Create_Connection
Kevin Wang [Thu, 17 Oct 2019 06:18:57 +0000 (14:18 +0800)]
Fix initiating_PHYS bit in HCI_LE_Extend_Create_Connection

The initiating_PHYS bit in HCI_LE_Extend_Create_Connection should
be set properly according to the ability of bluetooth controller.
PHY_LE_CODED bit should be 0x04 instead of 0x03.

Test: Start to scan on settings then pick LE device to create bond

Bug: 142840872

Change-Id: Ia991ac2d4090629f0c20e41cdb2ab992aefcba72

4 years agoMerge "Inquiry module implementation"
Chris Manton [Thu, 17 Oct 2019 04:49:07 +0000 (04:49 +0000)]
Merge "Inquiry module implementation"

4 years agoMerge "Add connectability module"
Treehugger Robot [Thu, 17 Oct 2019 01:29:44 +0000 (01:29 +0000)]
Merge "Add connectability module"

4 years agoMerge changes Ib4c81ba3,I79bead5d
Treehugger Robot [Thu, 17 Oct 2019 00:35:16 +0000 (00:35 +0000)]
Merge changes Ib4c81ba3,I79bead5d

* changes:
  Add discoverability module
  Add page scan module

4 years agoMerge "Make hci::AclConnection aware of AddressType for LE Connections"
Treehugger Robot [Thu, 17 Oct 2019 00:04:14 +0000 (00:04 +0000)]
Merge "Make hci::AclConnection aware of AddressType for LE Connections"

4 years agoMerge "HFP: remove the dropped HF connection request message in btif connect_queue...
Treehugger Robot [Wed, 16 Oct 2019 23:53:22 +0000 (23:53 +0000)]
Merge "HFP: remove the dropped HF connection request message in btif connect_queue and advance to the next scheduled connection request."

4 years agoMerge "Classic inquiry scan API"
Treehugger Robot [Wed, 16 Oct 2019 23:35:11 +0000 (23:35 +0000)]
Merge "Classic inquiry scan API"

4 years agoAdd discoverability module
Chris Manton [Wed, 16 Oct 2019 23:11:11 +0000 (16:11 -0700)]
Add discoverability module

Bug: 142060811
Test: Compiles
Change-Id: Ib4c81ba3d4c30c30602d451c97609f7577e3e8e3

4 years agoAdd connectability module
Chris Manton [Wed, 16 Oct 2019 22:53:16 +0000 (15:53 -0700)]
Add connectability module

Bug: 142060811
Test: Compiles
Change-Id: I0afa5f6a29b8c9c4d2b3e7dd8df427549abe01d5

4 years agoAdd page scan module
Chris Manton [Wed, 16 Oct 2019 22:35:19 +0000 (15:35 -0700)]
Add page scan module

Bug: 142060811
Test: Compiles
Change-Id: I79bead5da3706520fd4c22c4e0e921d930bd5fb2

4 years agoInquiry module implementation
Chris Manton [Wed, 16 Oct 2019 17:26:32 +0000 (10:26 -0700)]
Inquiry module implementation

Bug: 142061208
Test: Compiles
Change-Id: Iead1e6dfe2c476ecd4671a99413527b9b628bb36

4 years agoClassic inquiry scan API
Chris Manton [Tue, 15 Oct 2019 16:42:29 +0000 (09:42 -0700)]
Classic inquiry scan API

Bug: 142061208
Test: API - Compiles
Change-Id: Ie7a5bda3f10bedefc412b50f61c593e496999596

4 years agoMerge "Inquiry and page scan common module"
Treehugger Robot [Wed, 16 Oct 2019 21:02:57 +0000 (21:02 +0000)]
Merge "Inquiry and page scan common module"

4 years agoMake hci::AclConnection aware of AddressType for LE Connections
Jakub Pawlowski [Wed, 16 Oct 2019 12:54:53 +0000 (14:54 +0200)]
Make hci::AclConnection aware of AddressType for LE Connections

Bug: 142341141
Change-Id: I64e3e3265195d10e488e9c25d369d9c458ad67cc

4 years agoMerge "Add Page Write commands"
Treehugger Robot [Wed, 16 Oct 2019 19:42:45 +0000 (19:42 +0000)]
Merge "Add Page Write commands"

4 years agoMerge "Support inquiry commands and tests"
Chris Manton [Wed, 16 Oct 2019 16:10:21 +0000 (16:10 +0000)]
Merge "Support inquiry commands and tests"

4 years agoHFP: remove the dropped HF connection request message in btif connect_queue and advan...
jonerlin [Mon, 23 Sep 2019 15:25:48 +0000 (23:25 +0800)]
HFP: remove the dropped HF connection request message in btif connect_queue and advance to the next scheduled connection request.

* hf connect-request message does not be handled in btif connect_queue when remote headset has already reconnected hfp, but it did not be removed, either.
it will make subsequent connecting request messsages blocked in btif connect_queue and never be handled.
* Add unit test for btif_profile_queue to verify the case when connect_cb() returns non BT_STATUS_SUCCESS

Bug: 140846154
Test: Connected 2 headset (HS1, HS2) -> Disable Bluetooth and Turn Off
HS2 ->  Enable Bluetooth and Turn On HS2 -> Check hfp and a2dp profole
state after HS2 connected

Change-Id: I503fba1975054efe3180ecf1f7daa917fb6edf99

4 years agoSecurityModule boilerplate code
Jakub Pawlowski [Thu, 10 Oct 2019 12:36:29 +0000 (14:36 +0200)]
SecurityModule boilerplate code

This is boilerplate code for SecurityModule and SecurityManager

Bug: 142341141
Test: no test yet
Change-Id: Ie08c8ef7ee78e71a9c61dff6b45192ce0e1c3f1c

4 years agoMerge "HID host: Support SET REPORT"
Treehugger Robot [Wed, 16 Oct 2019 03:16:12 +0000 (03:16 +0000)]
Merge "HID host: Support SET REPORT"

4 years agoAdd Page Write commands
Chris Manton [Tue, 15 Oct 2019 23:02:42 +0000 (16:02 -0700)]
Add Page Write commands

Bug: 142060811
Test: bluetooth_test_gd

Change-Id: I270715f9b8d8872f303aea76d70d25cef407b965

4 years agoSupport inquiry commands and tests
Chris Manton [Mon, 14 Oct 2019 20:11:55 +0000 (13:11 -0700)]
Support inquiry commands and tests

Bug: 142061208
Test: bluetooth_test_gd
Change-Id: I53de39850c985f2d63cda21ad0e16686dba0b5ac

4 years agoHCI: Add LE advertising and scanning interfaces
Myles Watson [Mon, 14 Oct 2019 23:23:38 +0000 (16:23 -0700)]
HCI: Add LE advertising and scanning interfaces

Bug: 139080884
Test: builds
Change-Id: Iea96dc023e2e59f9969b65208881a9f407d4b461

4 years agoMerge "Add property check for gd shim entry"
Treehugger Robot [Tue, 15 Oct 2019 01:38:56 +0000 (01:38 +0000)]
Merge "Add property check for gd shim entry"

4 years agoInquiry and page scan common module
Chris Manton [Mon, 14 Oct 2019 23:14:30 +0000 (16:14 -0700)]
Inquiry and page scan common module

Bug: 142061208
Test: Builds successfully
Change-Id: I0ca7afb996490fff71030bf949ea9647924fd458

4 years agoAdd property check for gd shim entry
Chris Manton [Fri, 11 Oct 2019 02:44:06 +0000 (19:44 -0700)]
Add property check for gd shim entry

Bug: 14042172
Test: Ensure boot into both stacks
Test: adb shell stop; adb shell setprop bluetooth.gd.enabled 1 ; adb shell start
Test: adb shell stop; adb shell setprop bluetooth.gd.enabled 0 ; adb shell start

Change-Id: Ied131f5444dd33201197e9f19d0f4bc88c069f8c

4 years agoRename "smp" to "security"
Jakub Pawlowski [Mon, 14 Oct 2019 12:49:55 +0000 (14:49 +0200)]
Rename "smp" to "security"

SMP is just name of protocol used for one aspect of security management.
Rename the namespace in order to avoid any further confusions.

Test: compliation
Bug: 142341141
Change-Id: Id505fa3cd4b653c8486db2bca5f82233e731ec51

4 years ago[system][bt] fix -Wreorder-init-list again
Nick Desaulniers [Fri, 11 Oct 2019 21:50:44 +0000 (14:50 -0700)]
[system][bt] fix -Wreorder-init-list again

C++20 will require members in a designated initializer to be in order
unlike C99.

Bug: 139945549
Test: mm
Change-Id: I7dc825e2cdb0777b1be01df0a41adf9b3b644ff5

4 years agoMerge changes I30972458,I62dd309d
Nick Desaulniers [Fri, 11 Oct 2019 15:51:01 +0000 (15:51 +0000)]
Merge changes I30972458,I62dd309d

* changes:
  [system][bt] fix -Wdangling-gsl
  [system][bt] fix -Wreorder-init-list

4 years agoMerge "L2CAP classic signalling handler, data pipeline, and cert test"
Treehugger Robot [Fri, 11 Oct 2019 00:21:11 +0000 (00:21 +0000)]
Merge "L2CAP classic signalling handler, data pipeline, and cert test"

4 years ago[system][bt] fix -Wdangling-gsl
Nick Desaulniers [Thu, 10 Oct 2019 21:04:47 +0000 (14:04 -0700)]
[system][bt] fix -Wdangling-gsl

BtAddrString() returns a std::string. It's not safe to chain a call to
c_str() as otherwise the returned std::string is a temporary, and the
expression evaluates to an immediately dangling pointer.

Bug: 139945549
Test: mm
Change-Id: I30972458abcc563b24ee0d80b289c3efd6c3e04d
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
4 years ago[system][bt] fix -Wreorder-init-list
Nick Desaulniers [Wed, 9 Oct 2019 18:06:55 +0000 (11:06 -0700)]
[system][bt] fix -Wreorder-init-list

C++20 will require members in a designated initializer to be in order
unlike C99.

Bug: 139945549
Test: mm
Change-Id: I62dd309d5749c74c18e4291e7d1cef1f3587bf41
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
4 years agoMerge "[system][bt][gd] fix -Wreorder-init-list"
Treehugger Robot [Wed, 9 Oct 2019 21:18:10 +0000 (21:18 +0000)]
Merge "[system][bt][gd] fix -Wreorder-init-list"

4 years ago[system][bt][gd] fix -Wreorder-init-list
Nick Desaulniers [Wed, 9 Oct 2019 18:06:55 +0000 (11:06 -0700)]
[system][bt][gd] fix -Wreorder-init-list

C++20 will require members in a designated initializer to be in order
unlike C99.

Bug: 139945549
Test: mm
Change-Id: I4ed1a2c2865cfa26b45db970202340ae582ba78d
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
4 years agoL2CAP classic signalling handler, data pipeline, and cert test
Hansong Zhang [Fri, 20 Sep 2019 22:50:42 +0000 (15:50 -0700)]
L2CAP classic signalling handler, data pipeline, and cert test

Supports listening to an incoming L2CAP connection, open the channel and
transfer data.

Test: bluetooth_test_gd and cert/run_cert.sh
Bug: 138260719
Change-Id: I5a1b93dc30b43bb149c32e5f4ef5404f2d091cdb

4 years agohci_pdl: Inquiry commands
Chris Manton [Fri, 4 Oct 2019 00:31:12 +0000 (17:31 -0700)]
hci_pdl: Inquiry commands

Test: Run and verify on actual device
Bug: 142061208

Change-Id: I7d99aec75691528da75a563943d0db01cb2e3920

4 years agoHCI: Add GAP data to advertising packets
Myles Watson [Tue, 9 Jul 2019 22:24:54 +0000 (15:24 -0700)]
HCI: Add GAP data to advertising packets

Test: Build
Change-Id: I7ebc7d190c4bfc5ae0635bdfbd35b7e8a147ba96

4 years agoPDL: Add padding fields
Myles Watson [Fri, 4 Oct 2019 22:59:41 +0000 (15:59 -0700)]
PDL: Add padding fields

Bug: 138260498
Test: bluetooth_packet_parser_test
Change-Id: I6b020b2d47565e8e724e8114a2031be71e8a22ec

4 years agoPDL: Support Type Length Value in Structs
Myles Watson [Thu, 3 Oct 2019 22:48:29 +0000 (15:48 -0700)]
PDL: Support Type Length Value in Structs

Bug: 138260498
Test: bluetooth_packet_parser_test
Change-Id: If2a83908c507f37915e9a8520a1797cf5fc704a5

4 years agoPDL: Allow parent packets with no parameters
Myles Watson [Fri, 4 Oct 2019 23:01:07 +0000 (16:01 -0700)]
PDL: Allow parent packets with no parameters

Bug: 138260498
Test: bluetooth_packet_parser_test
Change-Id: I75e7c3a5d5bc653cc5df29ec406238cf9adf8cfc

4 years agoPDL: Add an error for redefinition
Myles Watson [Fri, 4 Oct 2019 00:22:39 +0000 (17:22 -0700)]
PDL: Add an error for redefinition

Bug: 138260498
Test: define a duplicate type and compile
Change-Id: I54c4016d6eabf1b969b12616d4b88e3f2b593c9e

4 years agoPDL: Use fixed portion of dynamic sizes for arrays
Myles Watson [Fri, 4 Oct 2019 23:02:38 +0000 (16:02 -0700)]
PDL: Use fixed portion of dynamic sizes for arrays

Bug: 138260498
Test: bluetooth_packet_parser_test
Change-Id: I271f3bd2c7eef13379fe3e0c059d82e2d1ddd37a

4 years agoMerge "GD HCI: add unittest for LeConnectionCallbacks"
Treehugger Robot [Fri, 4 Oct 2019 13:16:01 +0000 (13:16 +0000)]
Merge "GD HCI: add unittest for LeConnectionCallbacks"

4 years agoGD HCI: add unittest for LeConnectionCallbacks
Chienyuan [Thu, 3 Oct 2019 08:39:02 +0000 (16:39 +0800)]
GD HCI: add unittest for LeConnectionCallbacks

Test: run bluetooth_test_gd
Change-Id: Ibb1255a7f3736ade798825751c6063d5ed2f0455

4 years agoSplit L2CAP Classic and LE stacks into separate modules
Jack He [Fri, 4 Oct 2019 00:11:07 +0000 (17:11 -0700)]
Split L2CAP Classic and LE stacks into separate modules

* Although L2CAP LE and Classic stacks look similar, they are actually very different when diving into details
* Splitting them into two separate modules will benefit in the following ways:
 * One can start a LE only stack
 * One can turn off Classic stack entirely when not needed
 * Dependencies are more obvious, e.g. LE-CoC only depends on LE L2CAP and A2DP only depends on Classic L2CAP
* Changed test names as GTEST does not allow test name collisions
* New directory structure after the change:
  - l2cap: common headers that should be exposed to public
    - internal: common internal libraries shared between LE and classic
    - classic: classic headers that should be exposed to public
      - internal: internal libraries for classic
      - cert: certification stack for classic
   - le: LE headers that should be exposed to public
      - internal: internal libraries for LE
      - cert: certification stack for LE

Using Bash
 for file in classic_*; do git mv "$file" "classic/${file/classic_/}"; done
 for file in le_*; do git mv "$file" "le/${file/le_/}"; done
 for file in internal/le_*; do git mv "$file" "le/${file/le_/}"; done
 for file in internal/classic_*; do git mv "$file" "classic/${file/classic_/}"; done
 for file in classic/*; do if [ -f "$file" ]; then sed -i -e 's/Classic//g' "$file"; fi; done
 for file in classic/internal/*; do if [ -f "$file" ]; then sed -i -e 's/Classic//g' "$file"; fi; done
 for file in le/*; do if [ -f "$file" ]; then sed -i -e 's/Le//g' "$file"; fi; done
 for file in le/internal/*; do if [ -f "$file" ]; then sed -i -e 's/Le//g' "$file"; fi; done

Using IDE:
 replace "namespace l2cap {" with "namespace l2cap { namespace classic {" in classic/
 replace "}  // namespace l2cap" with "} }" in classic/
 replace "namespace l2cap {" with "namespace l2cap { namespace le {" in le/
 replace "}  // namespace l2cap" with "} }" in le/
 replace "l2cap/classic_" with "l2cap/classic/" in classic/
 replace "l2cap/internal/classic_" with "l2cap/classic/internal/" in classic/
 replace "l2cap/le_" with "l2cap/le/" in le/
 replace "l2cap/internal/le_" with "l2cap/le/internal/" in le/

Bug: 140938432
Test: bluetooth_test_gd
Change-Id: I29eafefc5b6be4033e5db811776230d28ca312b2

4 years agoMerge "PDL: Add GetStructOffset and GetStructSize"
Treehugger Robot [Thu, 3 Oct 2019 20:53:23 +0000 (20:53 +0000)]
Merge "PDL: Add GetStructOffset and GetStructSize"

4 years agoMerge "L2cap dynamic channel and service"
Treehugger Robot [Thu, 3 Oct 2019 20:19:24 +0000 (20:19 +0000)]
Merge "L2cap dynamic channel and service"

4 years agoMerge changes I62125269,Icbe89252
Treehugger Robot [Thu, 3 Oct 2019 19:59:53 +0000 (19:59 +0000)]
Merge changes I62125269,Icbe89252

* changes:
  PDL: Use Size for StructField sizes
  PDL: Pass the size to GenBounds

4 years agoMerge "PDL: Add for_struct to GenExtractor"
Treehugger Robot [Thu, 3 Oct 2019 19:52:22 +0000 (19:52 +0000)]
Merge "PDL: Add for_struct to GenExtractor"

4 years agoMerge "Update WriteInquiryScanActivity"
Treehugger Robot [Thu, 3 Oct 2019 18:28:01 +0000 (18:28 +0000)]
Merge "Update WriteInquiryScanActivity"

4 years agoUpdate WriteInquiryScanActivity
Chris Manton [Thu, 3 Oct 2019 04:54:41 +0000 (21:54 -0700)]
Update WriteInquiryScanActivity

Test: Compiles
Bug: 142061208

Change-Id: I969e94e393812528ec4ba38a87b4055bc42c67d3

4 years agoMerge "Add Read Number of Supported Iac complete"
Treehugger Robot [Thu, 3 Oct 2019 18:25:11 +0000 (18:25 +0000)]
Merge "Add Read Number of Supported Iac complete"

4 years agoMerge "Add Read Page Timeout Complete View"
Treehugger Robot [Thu, 3 Oct 2019 18:24:23 +0000 (18:24 +0000)]
Merge "Add Read Page Timeout Complete View"

4 years agoPDL: Add GetStructOffset and GetStructSize
Myles Watson [Thu, 3 Oct 2019 16:08:34 +0000 (09:08 -0700)]
PDL: Add GetStructOffset and GetStructSize

Structs are parsed all at once, so they don't need as much
information as packets.

Bug: 138260498
Test: bluetooth_packet_parser_test
Change-Id: I49d433332874514d2cc1c5779865437fab5533b4

4 years agoPDL: Use Size for StructField sizes
Myles Watson [Thu, 3 Oct 2019 16:05:13 +0000 (09:05 -0700)]
PDL: Use Size for StructField sizes

Structs can have dynamic sizes, which need to be passed in.

Bug: 138260498
Test: bluetooth_packet_parser_test
Change-Id: I621252699b597e728ff1566b95babd98cf00e8d4

4 years agoPDL: Pass the size to GenBounds
Myles Watson [Wed, 2 Oct 2019 22:07:05 +0000 (15:07 -0700)]
PDL: Pass the size to GenBounds

There are different sizes, depending on where GenBounds is called.

Bug: 138260498
Test: bluetooth_packet_parser_test
Change-Id: Icbe892529919fdad0f0b98a3b66a2b24cb25f910

4 years agoPDL: Add for_struct to GenExtractor
Myles Watson [Wed, 2 Oct 2019 22:01:15 +0000 (15:01 -0700)]
PDL: Add for_struct to GenExtractor

Enable field-specific size checks when parsing structs.

Bug: 138260498
Test: bluetooth_packet_parser_test
Change-Id: I3a8d132d1277fda027d5a6df61cdfb55b5519e02

4 years agoLegacy portion of btm shim layer
Chris Manton [Tue, 1 Oct 2019 18:26:49 +0000 (11:26 -0700)]
Legacy portion of btm shim layer

bug: 141963466
Test: Boots into old stack; no crash in new stack

Change-Id: I021a7f2f446a17bc4f1c1fbbd36cf1227ca6705e

4 years agoL2cap dynamic channel and service
Hansong Zhang [Tue, 10 Sep 2019 23:12:05 +0000 (16:12 -0700)]
L2cap dynamic channel and service

Add internal implementation for ClassicDynamicChannel
Signalling packets will be handled in next commit

Test: cert/run_cert.sh and bluetooth_test_gd
Bug: 138260719
Change-Id: I3b0fee9837034988e6490372ffbfd5ece90250f7