OSDN Git Service
Hansong Zhang [Mon, 9 Nov 2020 19:38:02 +0000 (11:38 -0800)]
btm_get_dev_class: Create empty record if not found
We may not have a device record at that time, so create one if needed.
This fixes the diff introduces in https://android-review.googlesource.com/c/platform/system/bt/+/
1480894/9/stack/acl/btm_acl.cc#b2183
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Test: pair to a speaker
Change-Id: I0149ecb7a11ed33f6cb6344f74c08746d948c513
Zach Johnson [Mon, 9 Nov 2020 00:55:52 +0000 (00:55 +0000)]
Merge changes Ibd11c0a8,I11fe6201,I63049dbb,I97ef3f26,I11cbffde, ...
* changes:
rusty-gd: clean up imports & pub exports
rusty-gd: remove one level of indirection for hci facade proto
rusty-gd: collapse facade implementation into facade.rs
rusty-gd: move hci facade client contents to root server
Start integration with gd rust & cert tests
GD: signal on signal port when server is ready
Catch sigint to shut down BT testing process
Chris Manton [Sun, 11 Oct 2020 23:14:17 +0000 (16:14 -0700)]
enum-ify stack/include/smp_api_types::SMP_OPCODE
Toward readable code
Bug:
163134718
Tag: #refactor
Test: Paired phones on le link
Change-Id: Ia125cf73a67b8244d45d83959fd3ac7cff41b76e
Chris Manton [Sat, 7 Nov 2020 19:13:35 +0000 (11:13 -0800)]
gd_acl_shim: Wrap remote version check
With gd the remote version information may not yet
be complete when smp calculates pairing
authentication requirements.
Bug:
166280067
Tag: #refactor
Test: Paired phones on le link
Change-Id: I4755b1f8475383fbced6fd3c7c4c3871d2c9e3b8
Chris Manton [Sat, 7 Nov 2020 19:03:45 +0000 (11:03 -0800)]
Add shim btm_read_remote_version_complete
Plumb through remote version info for shim classic and le
Bug:
166280067
Tag: #refactor
Test: Paired phones on le link
Change-Id: I48f2436c655b7818e7812ae70ceb4f24250edc70
Chris Manton [Sat, 7 Nov 2020 18:11:22 +0000 (10:11 -0800)]
Restore ability to send read remote version information on le links
Currently unable to send command via gd
Bug:
171568335
Tag: #refactor
Test: Paired phones on le link
Change-Id: I923030e9378e95786e0a6ae6275c68120cc3d504
Chris Manton [Sat, 7 Nov 2020 17:19:04 +0000 (09:19 -0800)]
gd: Add le read_remote_version_info
This command may be executed on both le and classic links
Bug:
171568335
Test: Paired phones on le link
Tag: #refactor
Change-Id: I573ec222ff96761704a080148b06fada37afc835
Chris Manton [Sat, 7 Nov 2020 06:06:24 +0000 (22:06 -0800)]
smp: Log if remote lmp_version is invalid
Unread, missing or late remote version info will force
drop from secure into legacy security mode
Bug:
163134718
Tag: #refactor
Test: Paired 2 phones using LE/nRF
Change-Id: I1e52ac96354981b6abbfc1d46e4323becf25b388
Chris Manton [Wed, 4 Nov 2020 16:27:13 +0000 (08:27 -0800)]
Use tACL_CB::tACL_CONN::remote_version_info
Toward readable code
Bug:
163134718
Tag: #refactor
Test: Paired 2 phones using LE/nRF
Change-Id: I0421cea1528b907e9b479e6b9d6489705cea0b22
Chris Manton [Wed, 4 Nov 2020 16:22:03 +0000 (08:22 -0800)]
Add tACL_CB::tACL_CONN::remote_version_info
Group related data
Bug:
163134718
Tag: #refactor
Test: Paired 2 phones using LE/nRF
Change-Id: I3382d00ae31114fca5a6292514b83c8ef1f5b44c
Chris Manton [Sat, 7 Nov 2020 04:31:37 +0000 (20:31 -0800)]
Add le transport to BTM_ReadRemoteVersion
Both classic/br_edr and le can use this command
Bug:
171568335
Tag: #refactor
Test: Paired 2 phones using LE/nRF
Change-Id: Ib644fa9cf21cbfac28e940b0dc5701637199496c
Chris Manton [Sat, 7 Nov 2020 05:23:59 +0000 (21:23 -0800)]
Replace return tBTM_STATUS=>bool BTM_ReadRemoteVersion
Toward readable code
Bug:
163134718
Tag: #refactor
Test: Paired 2 phones using LE/nRF
Change-Id: I5a1cd8ee552e6277a77fa3eef52becbe5a4a7401
Zach Johnson [Thu, 5 Nov 2020 01:31:15 +0000 (17:31 -0800)]
rusty-gd: clean up imports & pub exports
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost
Change-Id: Ibd11c0a8c977f022164a5f2c314cc3c2773b68fa
Zach Johnson [Thu, 5 Nov 2020 01:22:31 +0000 (17:22 -0800)]
rusty-gd: remove one level of indirection for hci facade proto
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost
Change-Id: I11fe6201aa4ee76c1389b7d8a23360fa484512c7
Zach Johnson [Thu, 5 Nov 2020 00:57:09 +0000 (16:57 -0800)]
rusty-gd: collapse facade implementation into facade.rs
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost
Change-Id: I63049dbb233fe9e3a3d957dd21d7aea3d5d23162
Zach Johnson [Thu, 5 Nov 2020 00:41:23 +0000 (16:41 -0800)]
rusty-gd: move hci facade client contents to root server
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost
Change-Id: I97ef3f26cb4a8458ebb7a9eda1df0b4391459a1c
Zach Johnson [Wed, 4 Nov 2020 23:24:55 +0000 (15:24 -0800)]
Start integration with gd rust & cert tests
two additional flags for gd/cert/run
--rust (rust on device)
--rhost (rust on host)
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --host
Change-Id: I11cbffdeca27cdfee12afbf2c8c0a5afa8ba2f17
Zach Johnson [Tue, 3 Nov 2020 19:11:26 +0000 (11:11 -0800)]
GD: signal on signal port when server is ready
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --host
Change-Id: I24a2ef3349b53abacacbed117db6ca2da7dc6971
Zach Johnson [Tue, 3 Nov 2020 18:47:39 +0000 (10:47 -0800)]
Catch sigint to shut down BT testing process
Temporary nix-based hack until we have tokio signal support.
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --host
Change-Id: I6cfb1d2792a07ec42b3e17ac63e09b0eca583258
Hansong Zhang [Wed, 28 Oct 2020 20:00:12 +0000 (13:00 -0700)]
L2cap: Route some functions to shim
Tag: #gd-refactor
Bug:
141555841
Test: cert/run --host
Test: Pair and connect with a headset
Change-Id: I6ce4c8a7f7e506f370b81e7919fd15f490068b56
Hansong Zhang [Wed, 28 Oct 2020 23:46:15 +0000 (16:46 -0700)]
Introduce L2cap security shim
L2cap security shim lets GD L2cap wants to enforce security requirements
on legacy security module.
Implementing the GD security interface.
Tag: #gd-refactor
Bug:
141555841
Test: cert/run --host
Test: Pair and connect with a headset
Change-Id: I60cd99566011f3eb93ecd6b32b1f428e8d69733d
Chris Manton [Wed, 28 Oct 2020 01:42:41 +0000 (18:42 -0700)]
Re-log BTM_AcceptlistAdd
Toward readable code
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I8837ee84d898a1f996b4594846af9c3c5ef39bf7
Chris Manton [Tue, 3 Nov 2020 23:36:43 +0000 (15:36 -0800)]
Return bool=>void stack/btm/btm_ble::BTM_SecAddBleKey
Toward readable code
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Iee8f8c0981c3084945365974ea77e91c38d57dbf
Chris Manton [Tue, 3 Nov 2020 23:44:41 +0000 (15:44 -0800)]
Remove return value stack/btm/btm_ble_gap::btm_ble_start_scan
Toward readable code
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I02c553cd9b31897bf91d27107e8bc1b2c0758658
Chris Manton [Tue, 3 Nov 2020 23:29:21 +0000 (15:29 -0800)]
Return bool=>void stack/btm/btm_ble::BTM_SecAddBleDevice
Unnecessary level of error checking
Toward readable code
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ia6a8ddcc4f6cc2ee2d7094a61e4818ba94989954
Chris Manton [Wed, 4 Nov 2020 16:05:33 +0000 (08:05 -0800)]
Clean up btm_acl_update_conn_addr
Toward readable code
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I9f9fb06cc11e89256c03e7a1e50e03a9a893697d
Weichin Weng [Fri, 6 Nov 2020 02:54:39 +0000 (02:54 +0000)]
Merge "Read set data length support flag from peer_le_features"
weichinweng [Thu, 5 Nov 2020 08:19:13 +0000 (16:19 +0800)]
Read set data length support flag from peer_le_features
Read set data length support flag from peer_le_features.
Bug:
167153759
Tag: #feature
Test: compile & verify basic functions and Hearing Aid profile working
Change-Id: I131634d413c20f973e8a8a4b7bfdeb7ee82a67a1
Hansong Zhang [Wed, 4 Nov 2020 23:21:54 +0000 (15:21 -0800)]
Simplify bta_dm_rm_cfg
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I51e52b0f46ae68c28212807acb3d635e18369126
Hansong Zhang [Wed, 4 Nov 2020 23:10:49 +0000 (15:10 -0800)]
BTA_AV_FEAT_CENTRAL is never used.
Features can be traced down to BTA_AvEnable().
BTA_AV_FEAT_CENTRAL is never set.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I9bbdcc69d12019d2b7dc9f60b780878b2912b4d8
Hansong Zhang [Wed, 4 Nov 2020 22:55:45 +0000 (14:55 -0800)]
We always want to switch role to central
When we continue role switch from mode change or encryption change, we
always want to switch to central, as we only made requests to change to
central.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Iff4ef160956fe2ba5901d24bf1f804570ef3d57e
Hansong Zhang [Wed, 4 Nov 2020 22:46:14 +0000 (14:46 -0800)]
Refactor BTM_SwitchRole
We always want to switch to central.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I945720e2e55f32cc15bd1e4c09b5b11d26fc7f4a
Hansong Zhang [Fri, 30 Oct 2020 04:50:46 +0000 (21:50 -0700)]
Move btm_ble_get_acl_remote_addr
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I042031bf2b6a280bd66754644e2e09adb7830d01
Hansong Zhang [Fri, 30 Oct 2020 04:43:55 +0000 (21:43 -0700)]
Introduce btm_get_dev_class
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I437df6b65af6b6220edce1a9d46af375f94e65a3
Hansong Zhang [Fri, 30 Oct 2020 04:28:47 +0000 (21:28 -0700)]
ACL: Refactor btm_ble_get_acl_remote_addr
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ie402ca097129dd74451d293a6a31ce785908c481
Steven Moreland [Thu, 5 Nov 2020 19:33:54 +0000 (19:33 +0000)]
Merge "libstatslog (libbinder) users disable on darwin"
Jakub Pawlowski [Thu, 5 Nov 2020 18:41:43 +0000 (18:41 +0000)]
Merge "isomanager: Add callback to create cis command"
Myles Watson [Thu, 5 Nov 2020 17:18:44 +0000 (17:18 +0000)]
Merge "gd: Refactor LE advertising config"
Steven Moreland [Thu, 5 Nov 2020 16:16:45 +0000 (16:16 +0000)]
libstatslog (libbinder) users disable on darwin
libbinder doesn't support mac.
Bug:
172023026
Test: N/A
Change-Id: Ib39fa195b9313d9d75ce903f2a871a5110abde68
Chienyuan [Tue, 3 Nov 2020 12:56:56 +0000 (20:56 +0800)]
gd: Refactor LE advertising config
Tag: #gd-refactor
Bug:
169125803
Test: cert/run --host
Test: atest --host bluetooth_test_gd
Change-Id: I06ef138d9325c404bdc1c57fed2149ae36964e36
Hansong Zhang [Fri, 30 Oct 2020 04:16:20 +0000 (21:16 -0700)]
Simplify btm_remove_acl
If btm_sec already sent HCI disconnect, and we send it again, we get bad
handle error, but it's ok. Other users are sending disconnect without
checking btm_sec.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ib232ff07b2080d574e2516fcdac3b3d6b980bd72
Hansong Zhang [Fri, 30 Oct 2020 04:06:32 +0000 (21:06 -0700)]
Refactor acl_refresh_remote_address
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ie44e348424d1e13ba7b01e02ac5f918e3cdefd68
Hansong Zhang [Fri, 30 Oct 2020 03:58:53 +0000 (20:58 -0700)]
Clean up check_sdp_bl
Some variables are unused or overriden
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I3d9f24273d03540c9218e7ce61e6633d020eaba3
Hansong Zhang [Fri, 30 Oct 2020 03:48:03 +0000 (20:48 -0700)]
Minor refactor on remote version comparison
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I5641b7b7210b203892b13e196fc6f7f32cbbc5ca
Hansong Zhang [Fri, 30 Oct 2020 03:37:13 +0000 (20:37 -0700)]
Move btm_sec_set_peer_sec_caps to btm_sec
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I1d05c78b08deeb7120fc0eaced20384e2f438e79
Bill Yi [Thu, 5 Nov 2020 01:06:51 +0000 (01:06 +0000)]
Merge "Merge rvc-release RP1A.201105.002 to aosp-master - DO NOT MERGE"
Myles Watson [Wed, 4 Nov 2020 23:46:28 +0000 (23:46 +0000)]
Merge "Fix cert test crashes when running on remote machine"
Chris Manton [Wed, 4 Nov 2020 23:41:30 +0000 (23:41 +0000)]
Merge changes Ie8b8e8a1,I5e1713f1,I0cabfa9c,I6235c954,I85dab865, ...
* changes:
gd_acl_shim: Start schedule address rotation on first client registration
Add stack/gatt/gatt_main::gatt_find_in_device_record
gd_acl: Resolve address after connection
gd: Present zeroed peer addr with type when using connect list
gd: Store the address when using resolving privacy policy
gd: gd/hci/le_address_manager_test::ASSERT_LOG when command queue is empty
gd: Reset le address rotation timer
gd: Remove unneeded client check when setting privacy
gd: Unwind futures and promises in reverse time
Zach Johnson [Wed, 4 Nov 2020 23:14:33 +0000 (23:14 +0000)]
Merge changes I112bb45c,I302e80fa
* changes:
Start the BT testing root service
Import rootservice facades, for BT testing
Zach Johnson [Wed, 4 Nov 2020 23:14:22 +0000 (23:14 +0000)]
Merge changes I122f110d,If7820cec
* changes:
Add stub for rusty-gd facade service
A few minor cleanups to hci facades
Bill Yi [Wed, 4 Nov 2020 22:04:05 +0000 (14:04 -0800)]
Merge rvc-release RP1A.201105.002 to aosp-master - DO NOT MERGE
Merged-In: Iac492777e490713bb8f2c3dd88a5de23dd6f613e
Change-Id: I7e2cdc736852f6e99466665e1120cc79b5b4009c
Jakub Pawlowski [Wed, 4 Nov 2020 12:47:25 +0000 (13:47 +0100)]
Fix cert test crashes when running on remote machine
When cert test is executed on a remote machine, against locally
connected devices with ports forwarded to remote machine,
crashes are observed during cleanup that happens in setup.
This is for cleanup of forwarded ports, when no forwarding is setup, or
for removal of btsnoop.log when it's not present.
After this patch, non-fatal errors would print error message rather than
crash the whole test.
Tag: #gd-refactor
Test: gd/cert/run LeSecurityTest
Change-Id: I68df152ba83a416cb81b26f31ae9ebe3698e3f02
Chris Manton [Sat, 31 Oct 2020 18:16:34 +0000 (11:16 -0700)]
gd_acl_shim: Start schedule address rotation on first client registration
Set random address when privacy policy is registered.
Do not rotate address on every registration.
Bug:
171568335
Test: CtsVerifier
Test: gd/cert/run --host
Test: atest --host bluetooth_test_gd
Tag: #refactor
Change-Id: Ie8b8e8a111763dc62a0be9a38eac4b211fe50e17
Łukasz Rymanowski [Mon, 2 Nov 2020 14:13:14 +0000 (14:13 +0000)]
isomanager: Add callback to create cis command
This is in order to handle errors in Command Status:
< HCI Command: LE Create Connected Isochronous Stream (0x08|0x0064) plen 5
Number of CIS: 1
CIS Handle: 96
ACL Handle: 65
> HCI Event: Command Status (0x0f) plen 4
LE Create Connected Isochronous Stream (0x08|0x0064) ncmd 1
Status: Unsupported Remote Feature / Unsupported LMP Feature (0x1a)
With this patch, IsoManager can notify upper layer about error in creating
CIS
Bug:
150670922
Tag: #feature
Test: atest --host net_test_btm_iso
Sponsor: jpawlowski@
Change-Id: Ie90fcaea5df070ddf9441f7b6de24a1282995857
Chris Manton [Thu, 29 Oct 2020 23:10:23 +0000 (16:10 -0700)]
Add stack/gatt/gatt_main::gatt_find_in_device_record
Bug:
171568335
Tag: #refactor
Test: acts/bin/act.py -tp ~/Goog/tools/test/connectivity -tc BleCocTest
Test: atest --host bluetooth_test_gd
Change-Id: I5e1713f1a7cb00559448148d2275e8eeefb414dd
Chris Manton [Wed, 28 Oct 2020 15:53:29 +0000 (08:53 -0700)]
gd_acl: Resolve address after connection
Bug:
171568335
Tag: #refactor
Test: acts/bin/act.py -tp ~/Goog/tools/test/connectivity -tc BleCocTest
Test: atest --host bluetooth_test_gd
Change-Id: I0cabfa9cbe894d754269591c64292d6ed412d7a3
Chris Manton [Sat, 31 Oct 2020 17:56:45 +0000 (10:56 -0700)]
gd: Present zeroed peer addr with type when using connect list
The fields are ignored but zeroed out for correctness.
Preserves original stack behavior
Bug:
171568335
Test: CtsVerifier
Test: atest --host bluetooth_test_gd
Tag: #refactor
Change-Id: I6235c9545115a247d4f4b3a7f31dfa97ce3d06b2
Chris Manton [Sat, 31 Oct 2020 18:19:11 +0000 (11:19 -0700)]
gd: Store the address when using resolving privacy policy
This address may change with updated, but seed the
initial address properly.
Bug:
171568335
Test: CtsVerifier
Test: gd/cert/run --host
Test: atest --host bluetooth_test_gd
Tag: #refactor
Change-Id: I85dab865ec9c7aa083cab3d6594d6eca4df925ac
Chris Manton [Tue, 3 Nov 2020 18:53:33 +0000 (10:53 -0800)]
gd: gd/hci/le_address_manager_test::ASSERT_LOG when command queue is empty
Returning an empty vector causes debug headaches
Bug:
171568335
Test: CtsVerifier
Test: gd/cert/run --host
Test: atest --host bluetooth_test_gd
Tag: #refactor
Change-Id: I9d5f2ecacfe2bbcea7a333d3701523a6d9cfcaae
Chris Manton [Tue, 3 Nov 2020 18:28:02 +0000 (10:28 -0800)]
gd: Reset le address rotation timer
Bug:
171568335
Test: CtsVerifier
Test: gd/cert/run --host
Test: atest --host bluetooth_test_gd
Tag: #refactor
Change-Id: I1e9e998fdb45642d4708abeb68c5f07f7704ff8a
Chris Manton [Sat, 31 Oct 2020 16:08:14 +0000 (09:08 -0700)]
gd: Remove unneeded client check when setting privacy
The check for registered clients can never succeed.
Privacy can only be set once per stack initialization.
No clients may be registered before setting privacy.
Entry ASSERTs ensure the above conditions are validated and true.
Test: gd/cert/run --host
Test: atest --host bluetooth_test_gd
Bug:
171568335
Tag: #refactor
Change-Id: I3fa97028bd104fccae6e37fc1d20196fd6679830
Chris Manton [Tue, 3 Nov 2020 00:37:28 +0000 (16:37 -0800)]
gd: Unwind futures and promises in reverse time
Bug:
171568335
Tag: #refactor
Test: atest --host bluetooth_test_gd
Change-Id: I3ff1deb2c23388b8c2114b09689ddea7380f7365
Hansong Zhang [Fri, 30 Oct 2020 03:29:14 +0000 (20:29 -0700)]
Use btm_sec_set_peer_sec_caps to store features
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: If9aba469bceb3d45ccd566dba0ec9c445f2a8102
Hansong Zhang [Fri, 30 Oct 2020 03:18:11 +0000 (20:18 -0700)]
num_read_pages is unused
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I725cac7c4d6ae3801b6f83ea16cc10d9cdb42276
Hansong Zhang [Fri, 30 Oct 2020 03:24:41 +0000 (20:24 -0700)]
Move some parts of btm_process_remote_ext_features
into btm_sec_set_peer_sec_caps
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I72800df6eb3a1ffdf3085703cc8e0bfa21e4baf1
Hansong Zhang [Fri, 30 Oct 2020 03:21:54 +0000 (20:21 -0700)]
Refactor btm_sec_set_peer_sec_caps
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I160ad1c216b68e5b7a59c35f3a7108eb83dbbd27
Jakub Pawlowski [Wed, 28 Oct 2020 17:46:26 +0000 (17:46 +0000)]
Revert "Disable EATT as does not pass all tests"
This reverts commit
c80071dd8f78c78f9ed7782d8d83c93abe9d8eec.
Reason for revert: no longer needed, issue fixed in https://android-review.googlesource.com/c/platform/system/bt/+/
1477785
Change-Id: I97a3476fb292734e2a5ec6d0481bb18d2ef0fe5a
Zach Johnson [Tue, 3 Nov 2020 00:34:14 +0000 (16:34 -0800)]
Start the BT testing root service
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --host
Change-Id: I112bb45c2dcabcf6c4e8bb488f9a22810fd9fed3
Zach Johnson [Mon, 2 Nov 2020 23:30:56 +0000 (15:30 -0800)]
Import rootservice facades, for BT testing
Not integrated into the main binary yet.
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --host
Change-Id: I302e80fa93c9618567e670d05dd2fc726cb3addd
Zach Johnson [Sat, 31 Oct 2020 19:58:49 +0000 (12:58 -0700)]
Add stub for rusty-gd facade service
Only parses command line args for now, but will
be expanded gradually in future patches.
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --host
Change-Id: I122f110db529b065ed8c47b9c61e25704746360a
Chienyuan Huang [Tue, 3 Nov 2020 05:09:26 +0000 (05:09 +0000)]
Merge "gd: Rename ApiType for LE advertising/scanning"
Hansong Zhang [Fri, 30 Oct 2020 03:13:56 +0000 (20:13 -0700)]
Dev rec: Optimize HCI role switch supported logic
We don't need to copy the entire supported feature pages.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Id64acda8d46bc229785eff46a29e15c6b7395f4e
Hansong Zhang [Fri, 30 Oct 2020 03:09:37 +0000 (20:09 -0700)]
Introduce dev_rec->remote_feature_received
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I8921fa9fa8dbb0feb1deea9ea01ac020d0bd235c
Hansong Zhang [Fri, 30 Oct 2020 03:00:44 +0000 (20:00 -0700)]
btm_sec: Clean up log spam
You can use btsnoop.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I34b2ddf49d2c731cc7245252a3aa53fb3adbc373
Martin Brabham [Tue, 11 Aug 2020 19:45:27 +0000 (12:45 -0700)]
Cleanup/organize variable initialization
Bug:
162984360
Tag: #refactor
Test: compiles and devices pair and work
Change-Id: Idf2a2c270a4633d9104f6f8c85dbea1584c2ba51
Hansong Zhang [Fri, 30 Oct 2020 02:56:41 +0000 (19:56 -0700)]
Flatten btm_cont_rswitch_from_handle
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I5159b8acb80fbae95c73d71ee96b13ac77142358
Hansong Zhang [Fri, 30 Oct 2020 02:54:46 +0000 (19:54 -0700)]
ACL: btm_cont_rswitch no longer needs dev rec
We know is_encrypted.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I3773bd20efe349bc0f9e91f559e393d70a8964dc
Jakub Pawlowski [Wed, 21 Oct 2020 21:11:50 +0000 (23:11 +0200)]
GD Security Pass local IRK and Address around
Bug:
142341141
Test: atest bluetooth_test_gd
Tag: #gd-refactor
Change-Id: I55e4c4f9b2e778d2960b98783715d1bc278bfa9a
Chienyuan [Mon, 2 Nov 2020 10:03:47 +0000 (18:03 +0800)]
gd: Rename ApiType for LE advertising/scanning
Tag: #gd-refactor
Bug:
169125803
Test: cert/run --host
Test: atest --host bluetooth_test_gd
Change-Id: Id2923d6fa29040ae6632738089dfc79f5d557673
Treehugger Robot [Mon, 2 Nov 2020 07:06:01 +0000 (07:06 +0000)]
Merge "gd: implement APIs of AdvertisingSet for LE 5.0"
Hansong Zhang [Fri, 30 Oct 2020 02:45:32 +0000 (19:45 -0700)]
BTM_SecAddDevice: features is always nullptr
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I0ed7e76d824bc7da08bf7fe93dda9067d390e59f
Hansong Zhang [Fri, 30 Oct 2020 02:44:09 +0000 (19:44 -0700)]
msg->features is always 0 (nullptr)
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ie276dd3fe61da889f5ea4e113266c782af806500
Hansong Zhang [Fri, 30 Oct 2020 02:38:16 +0000 (19:38 -0700)]
Introduce ACL_CONN is_enceypted
Use it as the source of truth for enceyption state in ACL.
No need to check device record then.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: If28b8a9779ad958562cf0ec99f982d4910c0c1a1
Hansong Zhang [Fri, 30 Oct 2020 00:11:40 +0000 (17:11 -0700)]
Move rs_disc_pending from security to ACL
It's used by ACL.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ia413ccfcf554a5d211c38b907ababf84e9140231
Chienyuan [Fri, 25 Sep 2020 10:19:10 +0000 (18:19 +0800)]
gd: implement APIs of AdvertisingSet for LE 5.0
Tag: #gd-refactor
Bug:
169125803
Test: cert/run --host
Test: atest --host bluetooth_test_gd
Change-Id: I8a55f8d42b80d52bb414e001e05540df49f440a6
Chris Manton [Thu, 29 Oct 2020 05:45:52 +0000 (22:45 -0700)]
Re-log btif/src/btif_config::btif_get_address_type
Towards loggable code
Bug:
163134718
Tag: #refactor
Test: acts/bin/act.py -tp ~/Goog/tools/test/connectivity -tc BleCocTest
Change-Id: I83c78bdb13e808e352ced18f26e27f759b4c638b
Chris Manton [Thu, 29 Oct 2020 05:46:51 +0000 (22:46 -0700)]
Re-log stack/gatt/gatt_api::GATT_Connect
Towards loggable code
Bug:
163134718
Tag: #refactor
Test: acts/bin/act.py -tp ~/Goog/tools/test/connectivity -tc BleCocTest
Change-Id: Ic33a2f3a2c0fb30aa2404186773257b7511eacd3
Treehugger Robot [Fri, 30 Oct 2020 02:34:25 +0000 (02:34 +0000)]
Merge "Add binder interface for the BluetoothConnectionCallback"
Hansong Zhang [Thu, 29 Oct 2020 23:43:00 +0000 (16:43 -0700)]
ACL: Don't re-use known remote feature
Just wait for remote feature request to be done. There is no use case
of using these features or sending SSP/SC to Security early.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I6dcf014660ddba18167c01155eb02ba1bccf9001
Hansong Zhang [Thu, 29 Oct 2020 23:41:00 +0000 (16:41 -0700)]
ACL: Don't start l2cap security check on connection
It's not possible to have pending L2cap security enforcement request
when link is just established.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I2613489555050f6378da6c02ae06ff54273a1751
Hansong Zhang [Thu, 29 Oct 2020 23:23:16 +0000 (16:23 -0700)]
ACL: Remove unused field
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ied053d1ee5d0a1c485a79be068bedc366d05c43a
Hansong Zhang [Thu, 29 Oct 2020 23:20:27 +0000 (16:20 -0700)]
btm_process_remote_ext_features: return if no record
It's not possible that we don't have a security when we receive remote
ext features, because we create a record upon ACL connection. Not
possible for direct bonding as well.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I70313e7e34d72741826f712baeccc4bdcb531757
Hansong Zhang [Thu, 29 Oct 2020 23:00:09 +0000 (16:00 -0700)]
ACL: Move some security flag change to Security
Moving BTM_SEC_LE_LINK_KEY_AUTHED and BTM_SEC_ROLE_SWITCHED.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ib8440b6956d7424d3c9f722d6705deefb619679d
Hansong Zhang [Thu, 29 Oct 2020 22:55:44 +0000 (15:55 -0700)]
ACL: No need to clear these flags
It's done in btm_sec.cc btm_sec_disconnected:
p_dev_rec->sec_flags &=
~(BTM_SEC_AUTHENTICATED | BTM_SEC_ENCRYPTED | BTM_SEC_ROLE_SWITCHED |
BTM_SEC_16_DIGIT_PIN_AUTHED);
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Iea4cac99b6691b0cfe765ee5eb109f25339ebd5a
Hansong Zhang [Thu, 29 Oct 2020 20:05:42 +0000 (13:05 -0700)]
ACL minor clean up
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Icc0296243dc66938fbd0b4ec9fc53a7ca4097adf
Zach Johnson [Thu, 29 Oct 2020 23:16:53 +0000 (16:16 -0700)]
A few minor cleanups to hci facades
* Bury the grpc service construction inside the facade service
* no need to keep the rootcanal config around, pass it along without
cloning
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --host
Change-Id: If7820cecbcd899b7cab5c72678da986559bbcdd7
Zach Johnson [Thu, 29 Oct 2020 23:20:30 +0000 (23:20 +0000)]
Merge "Kick off Gabeldorsche Rust implementation."
Rahul Sabnis [Thu, 29 Oct 2020 22:29:08 +0000 (15:29 -0700)]
Add binder interface for the BluetoothConnectionCallback
Tag: #feature
Bug:
171902843
Test: Manual
Change-Id: I2bca5acf7d5ac463668e6a847c851e4a068bf059
Treehugger Robot [Thu, 29 Oct 2020 21:45:48 +0000 (21:45 +0000)]
Merge "Use local_oob_present_"
Myles Watson [Wed, 28 Oct 2020 22:56:41 +0000 (15:56 -0700)]
Security: Send LinkKey reply without std::move
Bug:
162984360
Test: ./cert/run --host SecurityTest
Change-Id: Ib39682ff4e02af46396d7c133fb7b4faf72f8c16