OSDN Git Service
Chris Manton [Wed, 11 Nov 2020 19:44:29 +0000 (11:44 -0800)]
l2cap: Allow services without config indicator cb to register
l2cap prevented BNEP from registering b/c of a missing
(now optional) config indicator callback.
Bug:
170278807
Tag: #stability
Test: CtsVerifier
Change-Id: Ibe849b2de82913f2228d877227179c223aab8c4e
Chris Manton [Thu, 12 Nov 2020 00:44:15 +0000 (16:44 -0800)]
Re-log stack/l2cap/l2c_api::L2CA_DisconnectReq
Toward loggable code
Bug:
163134718
Tag: #refactor
Test: CtsVerifier
Change-Id: I407f9aa305a8e70c23a1b83a898684f2798a5a32
Chris Manton [Thu, 12 Nov 2020 00:44:45 +0000 (16:44 -0800)]
Re-log stack/acl/btm_acl::acl_disconnect_after_role_switch
Toward loggable code
Bug:
163134718
Tag: #refactor
Test: CtsVerifier
Change-Id: Ifa72697bc33520e21c51ce7d82856497adf6f282
Chris Manton [Thu, 12 Nov 2020 16:40:10 +0000 (08:40 -0800)]
Re-log stack/gatt/gatt_cl::gatt_process_prep_write_rsp
Toward loggable code
Bug:
163134718
Tag: #refactor
Test: CtsVerifier
Change-Id: Ice004fb4babd77075dd1dba26198186df75c5880
Chris Manton [Thu, 12 Nov 2020 00:44:27 +0000 (16:44 -0800)]
Stat-ify btif/src/btif_gatt_client
Toward readable code
Bug:
163134718
Tag: #refactor
Test: CtsVerifier
Change-Id: I2d7da0024fefd37ae7c72d0e13d3087904740182
Chris Manton [Wed, 11 Nov 2020 22:03:43 +0000 (14:03 -0800)]
Add btif/src/btif_gatt_client::bta_gattc_event_text
Toward loggable code
Bug:
163134718
Tag: #refactor
Test: CtsVerifier
Change-Id: I041492f74c5e0d91f1b8f45370c263bcd8f5b343
Chris Manton [Thu, 12 Nov 2020 02:27:12 +0000 (18:27 -0800)]
gatt: Properly put gatt status in field
Bug:
172805487
Test: CtsVerifier
Tag: #stability
Change-Id: I4e730cd8b367fe9764bae3bc49a7a4ee8f00c708
Chris Manton [Wed, 11 Nov 2020 20:58:17 +0000 (12:58 -0800)]
l2cap: Add mtu and mps to lead eatt channel
Bug:
159786353
Test: CtsVerifier
Tag: #feature
Change-Id: Ia5be81bde7a10d0b8e466b9b856d75d52b43a349
Chris Manton [Wed, 11 Nov 2020 20:03:41 +0000 (12:03 -0800)]
Re-log stack/l2cap/l2c_ble::l2cble_process_sig_cmd
Toward loggable code
Bug:
163134718
Tag: #refactor
Test: CtsVerifier
Change-Id: I6aad2f2d7768fc5baaab2577c5c6814d23629c53
Chris Manton [Wed, 11 Nov 2020 23:40:56 +0000 (15:40 -0800)]
Stat-ify functions in bta/sys/bta_sys_main
Toward readble code
Bug:
163134718
Tag: #refactor
Test: CtsVerifier
Change-Id: Ibb761116da5ccec5562ac144349f8f419cb10319
Chris Manton [Thu, 12 Nov 2020 00:27:13 +0000 (16:27 -0800)]
Add BtaIdSysText::BTA_ID_GATTC
Toward loggable code
Bug:
163134718
Tag: #refactor
Test: CtsVerifier
Change-Id: I554f271c622e8c9e7285b26494bdd90bd0a68822
Chris Manton [Wed, 11 Nov 2020 16:54:36 +0000 (08:54 -0800)]
Add stack/include/l2cdefs::l2cap_le_result_code_text
Toward loggable code
Bug:
163134718
Tag: #refactor
Test: CtsVerifier
Change-Id: I4ed9cca2e866f5862e029916e2b964e720628eb2
Chris Manton [Wed, 11 Nov 2020 16:20:19 +0000 (08:20 -0800)]
Use stack/l2cap/l2c_csm::channel_state_text()
Toward loggable code
Bug:
163134718
Tag: #refactor
Test: CtsVerifier
Change-Id: I29fde7572ac65e739d83cec7c19cae2d3bd773a6
Chris Manton [Wed, 11 Nov 2020 15:57:27 +0000 (07:57 -0800)]
enum-ify stack/l2cap/l2c_int::L2CEVT_LP
Toward readable code
Bug:
163134718
Tag: #refactor
Test: CtsVerifier
Change-Id: I03fa8bfd1866d7bb3d8cb8a1b7c6315c744728c4
Chris Manton [Wed, 11 Nov 2020 15:51:12 +0000 (07:51 -0800)]
Add stack/l2cap/l2c_csm::channel_state_text
Toward loggable code
Bug:
163134718
Tag: #refactor
Test: CtsVerifier
Change-Id: I6a85fe9e5d0ae3c16fa2dd5fe4933f754f270a9f
Hansong Zhang [Wed, 11 Nov 2020 19:25:16 +0000 (11:25 -0800)]
Clean up user apps before GD is shutdown
GATT, L2C, SDP, BTM depend on GD core modules if GD is enabled. Stop
them first before GD.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I8f3029d396fc05878a1ffa95ef935b4a5fa1cbd1
Treehugger Robot [Wed, 11 Nov 2020 17:41:14 +0000 (17:41 +0000)]
Merge "L2CAP: keep cached peer configuration locally"
Treehugger Robot [Wed, 11 Nov 2020 01:01:02 +0000 (01:01 +0000)]
Merge "Use p_acl->remote_addr to do BTA_dm_acl_down"
Michael Sun [Wed, 11 Nov 2020 00:00:11 +0000 (00:00 +0000)]
Merge changes from topics "btaa-jni-1", "btaa-jni-2"
* changes:
btaa: introduce btif interface for btaa
btaa: new include files in bt stack for BTAA interface
weichinweng [Tue, 10 Nov 2020 07:06:30 +0000 (15:06 +0800)]
Use p_acl->remote_addr to do BTA_dm_acl_down
Use p_acl->remote_addr to do BTA_dm_acl_down, not p_acl->conn_addr.
Bug:
171669750
Tag: #feature
Test: compile & forget BLE/Hearingaids device while connected.
Change-Id: Ie44e818c4bc176df5426996a06a99536c5250077
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
Michael Sun [Mon, 2 Nov 2020 07:17:47 +0000 (07:17 +0000)]
btaa: introduce btif interface for btaa
Add a new btif interface for Activity Attribution to help communicate
between JNI and BTAA core module
Tag: #feature
Bug:
172501038
Test: m
Change-Id: Idc7fbb126040bc0b2757b871e9ff6ef8ae889dcf
Michael Sun [Mon, 2 Nov 2020 07:17:15 +0000 (07:17 +0000)]
btaa: new include files in bt stack for BTAA interface
Add new includes files for JNI and btif interfaces development of
activity attribution (BTAA). This change only defines the skeleton of
BTAA interface and its callback structures, more implementation will
follow.
Tag: #feature
Bug:
172501038
Test: m
Change-Id: I1ae48561ec6ce91ed5df1aba6a8d72fe737a7ef0
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
Cheney Ni [Tue, 3 Nov 2020 07:16:11 +0000 (15:16 +0800)]
L2CAP: keep cached peer configuration locally
In order to report currect MTU to upper layer while that channel opened,
this change keeps remote peer configuration locally.
Bug:
171353431
Test: act.py -tc BleCocTest
Test: verify basic functions working
Tag: #refactor
Change-Id: Id4f5f22eb58e6f546278a12b269a700d760b3578
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