OSDN Git Service

android-x86/system-bt.git
3 years agoAdd tBTA_DM_SSR_SPEC.name[] field for sniff subrating options
Chris Manton [Tue, 8 Dec 2020 21:34:52 +0000 (13:34 -0800)]
Add tBTA_DM_SSR_SPEC.name[] field for sniff subrating options

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I4c3005f0648a4c8b3b9fdba4fe4489caf9283a5f

3 years agoAdd bta/dm/bta_dm_int::device_info_text
Chris Manton [Tue, 8 Dec 2020 06:54:59 +0000 (22:54 -0800)]
Add bta/dm/bta_dm_int::device_info_text

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: Ia3ac16047595c032b2c703133eed4fea3cc97967

3 years agoMerge "Updateability: Remove IBluetoothHeadsetPhone aidl"
Chen Chen [Thu, 17 Dec 2020 08:43:38 +0000 (08:43 +0000)]
Merge "Updateability: Remove IBluetoothHeadsetPhone aidl"

3 years agoMerge "set_report API should use HID control channel to send data"
Treehugger Robot [Wed, 16 Dec 2020 22:27:31 +0000 (22:27 +0000)]
Merge "set_report API should use HID control channel to send data"

3 years agoMerge changes I10a05872,I1a990478
Zach Johnson [Wed, 16 Dec 2020 21:57:50 +0000 (21:57 +0000)]
Merge changes I10a05872,I1a990478

* changes:
  IsoPacket -> Iso, ScoPacket -> Sco
  AclPacket -> Acl

3 years agoMerge "EventPacket -> Event"
Zach Johnson [Wed, 16 Dec 2020 21:29:15 +0000 (21:29 +0000)]
Merge "EventPacket -> Event"

3 years agoMerge changes Ia88c2415,Icc104e2f
Treehugger Robot [Wed, 16 Dec 2020 19:18:26 +0000 (19:18 +0000)]
Merge changes Ia88c2415,Icc104e2f

* changes:
  Group upper layer notifications stack/acl/btm_acl::
  Add bta/dm/bta_dm_act::BTA_dm_notify_remote_features_complete

3 years agoIsoPacket -> Iso, ScoPacket -> Sco
Zach Johnson [Sun, 13 Dec 2020 02:21:00 +0000 (18:21 -0800)]
IsoPacket -> Iso, ScoPacket -> Sco

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: I10a058723fe42c731808d6005a9ed32c928e10c0

3 years agoAclPacket -> Acl
Zach Johnson [Sun, 13 Dec 2020 02:12:24 +0000 (18:12 -0800)]
AclPacket -> Acl

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: I1a990478af55cfce722466b955fe4adc80fa30b1

3 years agoEventPacket -> Event
Zach Johnson [Sun, 13 Dec 2020 01:58:24 +0000 (17:58 -0800)]
EventPacket -> Event

simpler

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: Ib493861824c05d3a019e25d9fed8ad09cfac55dd

3 years agoMerge "CommandPacket -> Command"
Zach Johnson [Wed, 16 Dec 2020 18:39:30 +0000 (18:39 +0000)]
Merge "CommandPacket -> Command"

3 years agoL2cap shim: Send the correct disconnect callback
Hansong Zhang [Mon, 14 Dec 2020 23:23:35 +0000 (15:23 -0800)]
L2cap shim: Send the correct disconnect callback

Tag: #gd-refactor
Test: CtsVerifier
Bug: 141555841
Change-Id: I939f0fa0ea4d66c11ec282bbc693b22c6804b76a

3 years agoMerge changes I5f1244d7,Ie41c2519,Ie07221ad
Treehugger Robot [Wed, 16 Dec 2020 17:48:02 +0000 (17:48 +0000)]
Merge changes I5f1244d7,Ie41c2519,Ie07221ad

* changes:
  gd: Enable advertising module by INIT flag
  gd: Prevent set privacy policy twice
  gd: Handle periodic advertising in start advertising

3 years agoGroup upper layer notifications stack/acl/btm_acl::
Chris Manton [Tue, 15 Dec 2020 21:49:27 +0000 (13:49 -0800)]
Group upper layer notifications stack/acl/btm_acl::

Eventual interface replacement

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: Ia88c24158d8de4500d1bccbd8685318ac8433bfa

3 years agoAdd bta/dm/bta_dm_act::BTA_dm_notify_remote_features_complete
Chris Manton [Thu, 10 Dec 2020 05:18:41 +0000 (21:18 -0800)]
Add bta/dm/bta_dm_act::BTA_dm_notify_remote_features_complete

Although the connection has been made, subsequent queries
of remote host may not have been completed.  One important
set of data BTA requires is the remote features.

This callback allows synchronization for valid remote
features.

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: Icc104e2f47bd79f904a684a7290ca38a123e3cfb

3 years agogd: Enable advertising module by INIT flag
Chienyuan [Wed, 16 Dec 2020 11:59:19 +0000 (19:59 +0800)]
gd: Enable advertising module by INIT flag

Tag: #gd-refactor
Bug: 169125803
Test: cert/run --host
Test: atest --host bluetooth_test_gd
Change-Id: I5f1244d71a77b9d8f470dfd621d50bd23788529b

3 years agoMerge changes Ia3a8c7e1,I65bac30e,Ide1a5faa,I64f5be7d,Id19aa6c9, ...
Treehugger Robot [Wed, 16 Dec 2020 11:14:47 +0000 (11:14 +0000)]
Merge changes Ia3a8c7e1,I65bac30e,Ide1a5faa,I64f5be7d,Id19aa6c9, ...

* changes:
  enum-ify bta/include/bta_api::BTA_DM_PM_
  Remove #def and use IsEprAvailable
  Use proper tHCI_STATUS types
  Inclusive language BTM_DEV_BLACKLISTED => BTM_DEV_RESTRICT_LISTED
  Properly retrieve acl_conn stack/acl/btm_acl::btm_read_remote_features_complete
  Properly retrieve acl_conn stack/acl/btm_acl::btm_read_remote_ext_features_complete
  Properly retrieve acl_conn stack/acl/btm_acl::btm_read_tx_power_complete
  Properly retrieve acl_conn stack/acl/btm_acl::btm_read_automatic_flush_timeout_complete
  Properly retrieve acl_conn stack/acl/btm_acl::btm_read_rssi_complete
  Re-log and properly type bta/dm/bta_dm_pm::bta_dm_pm_sniff
  Properly type bta/.../::BTA_SYS_CONN_OPEN
  Properly type args stack/acl/btm_pm::BTM_ReadPowerMode
  Add bta/sys/bta_sys::bta_sys_conn_status_text
  enum-ify bta/sys/bta_sys::tBTA_SYS_CONN_STATUS
  Add stack/include/btm_status::btm_status_text
  gd_acl: Remove redundant call stack/l2cap/l2c_link

3 years agogd: Prevent set privacy policy twice
Chienyuan [Wed, 16 Dec 2020 10:00:59 +0000 (18:00 +0800)]
gd: Prevent set privacy policy twice

Tag: #gd-refactor
Bug: 169125803
Test: cert/run --host
Test: atest --host bluetooth_test_gd
Change-Id: Ie41c2519818edff3061d77c4df1e126f976fa0c2

3 years agoMerge "Cert: Pin Code Test"
Treehugger Robot [Wed, 16 Dec 2020 10:04:25 +0000 (10:04 +0000)]
Merge "Cert: Pin Code Test"

3 years agogd: Handle periodic advertising in start advertising
Chienyuan [Wed, 16 Dec 2020 06:41:34 +0000 (14:41 +0800)]
gd: Handle periodic advertising in start advertising

Tag: #gd-refactor
Bug: 169125803
Test: cert/run --host
Test: atest --host bluetooth_test_gd
Change-Id: Ie07221ad62a5d7674f8cfc6b2253231b5f15f668

3 years agoenum-ify bta/include/bta_api::BTA_DM_PM_
Chris Manton [Thu, 10 Dec 2020 00:31:56 +0000 (16:31 -0800)]
enum-ify bta/include/bta_api::BTA_DM_PM_

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: Ia3a8c7e18de52d1b4b2b73ea76ce57586c954a4e

3 years agoRemove #def and use IsEprAvailable
Chris Manton [Fri, 11 Dec 2020 00:14:05 +0000 (16:14 -0800)]
Remove #def and use IsEprAvailable

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I65bac30e7060f0cc156676c1f78d2f3482b16835

3 years agoUse proper tHCI_STATUS types
Chris Manton [Mon, 14 Dec 2020 06:47:04 +0000 (22:47 -0800)]
Use proper tHCI_STATUS types

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: Ide1a5faa7afbed347a77d5c484a633479bf641ef

3 years agoInclusive language BTM_DEV_BLACKLISTED => BTM_DEV_RESTRICT_LISTED
Chris Manton [Tue, 15 Dec 2020 18:02:32 +0000 (10:02 -0800)]
Inclusive language BTM_DEV_BLACKLISTED => BTM_DEV_RESTRICT_LISTED

Bug: 170342881
Tag: #refactor
Test: atest --host bluetooth_test_gd

Change-Id: I64f5be7d2aa38a62091fde43b1926479021c10a6

3 years agoProperly retrieve acl_conn stack/acl/btm_acl::btm_read_remote_features_complete
Chris Manton [Sun, 13 Dec 2020 18:54:19 +0000 (10:54 -0800)]
Properly retrieve acl_conn stack/acl/btm_acl::btm_read_remote_features_complete

Towards encapsulation

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: Id19aa6c9dd0c5bb010345e8706a55be05b04fcc0

3 years agoProperly retrieve acl_conn stack/acl/btm_acl::btm_read_remote_ext_features_complete
Chris Manton [Sun, 13 Dec 2020 18:46:23 +0000 (10:46 -0800)]
Properly retrieve acl_conn stack/acl/btm_acl::btm_read_remote_ext_features_complete

Towards encapsulation

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I8daa6e06248eb28463b1ef552bbfe3ff547f6d3a

3 years agoProperly retrieve acl_conn stack/acl/btm_acl::btm_read_tx_power_complete
Chris Manton [Sun, 13 Dec 2020 02:24:23 +0000 (18:24 -0800)]
Properly retrieve acl_conn stack/acl/btm_acl::btm_read_tx_power_complete

Towards encapsulation

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: Ib916439e3d5c0580ce299ee2b5b3b2c07161a78b

3 years agoProperly retrieve acl_conn stack/acl/btm_acl::btm_read_automatic_flush_timeout_complete
Chris Manton [Sun, 13 Dec 2020 01:54:04 +0000 (17:54 -0800)]
Properly retrieve acl_conn stack/acl/btm_acl::btm_read_automatic_flush_timeout_complete

Towards encapsulation

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I474142526f861161f5a95c3214a43ea2794afa5c

3 years agoProperly retrieve acl_conn stack/acl/btm_acl::btm_read_rssi_complete
Chris Manton [Sun, 13 Dec 2020 01:33:24 +0000 (17:33 -0800)]
Properly retrieve acl_conn stack/acl/btm_acl::btm_read_rssi_complete

Towards encapsulation

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: Icade424100d8ca269166b8f3f9179245abb88963

3 years agoRe-log and properly type bta/dm/bta_dm_pm::bta_dm_pm_sniff
Chris Manton [Tue, 8 Dec 2020 07:03:00 +0000 (23:03 -0800)]
Re-log and properly type bta/dm/bta_dm_pm::bta_dm_pm_sniff

Towards readable code. Classic power mode is a mess

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: Idd88f6b53eb722a2b7477d9b244ae9ab94d63df2

3 years agoProperly type bta/.../::BTA_SYS_CONN_OPEN
Chris Manton [Sun, 6 Dec 2020 22:43:19 +0000 (14:43 -0800)]
Properly type bta/.../::BTA_SYS_CONN_OPEN

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I063ab292f54a9ae6e1ab488030fb82f0a4576e49

3 years agoProperly type args stack/acl/btm_pm::BTM_ReadPowerMode
Chris Manton [Tue, 8 Dec 2020 06:35:06 +0000 (22:35 -0800)]
Properly type args stack/acl/btm_pm::BTM_ReadPowerMode

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I94620f506d0fc5ee32f1fe8a5dc75dc5915dd6af

3 years agoAdd bta/sys/bta_sys::bta_sys_conn_status_text
Chris Manton [Sun, 6 Dec 2020 22:49:06 +0000 (14:49 -0800)]
Add bta/sys/bta_sys::bta_sys_conn_status_text

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I1a43557474ede94add88fe98bece0dda81520315

3 years agoenum-ify bta/sys/bta_sys::tBTA_SYS_CONN_STATUS
Chris Manton [Sun, 6 Dec 2020 22:43:35 +0000 (14:43 -0800)]
enum-ify bta/sys/bta_sys::tBTA_SYS_CONN_STATUS

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I1b8e4555ab6754d74f0058b4909a6e06718af035

3 years agoAdd stack/include/btm_status::btm_status_text
Chris Manton [Tue, 8 Dec 2020 22:26:10 +0000 (14:26 -0800)]
Add stack/include/btm_status::btm_status_text

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I0c28b56845e4d0c37931842ee882a4c55c5ab98a

3 years agogd_acl: Remove redundant call stack/l2cap/l2c_link
Chris Manton [Fri, 4 Dec 2020 23:25:40 +0000 (15:25 -0800)]
gd_acl: Remove redundant call stack/l2cap/l2c_link

Previous arch had l2cap driving the btm layer.
The new legacy acl/btm layer sits between the l2cap
layer and the hci layer.  The call path has
already been exercised by this time and is called twice

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I8e83a79020f0c9cdfaab0916af1a8e2028e130ca

3 years agoLE L2cap: Use client callback if locally initiated
Hansong Zhang [Tue, 15 Dec 2020 21:41:32 +0000 (13:41 -0800)]
LE L2cap: Use client callback if locally initiated

Don't use callbacks for registered service (we as server).  This could
confuse user (shim).

Tag: #gd-refactor
Test: CtsVerifier
Bug: 141555841
Change-Id: Icde090fa609043a61301c18782874dad9ade99d1

3 years agoCommandPacket -> Command
Zach Johnson [Sun, 13 Dec 2020 01:32:32 +0000 (17:32 -0800)]
CommandPacket -> Command

drop the packet, it's simpler.

CommandPacket is already a packet, and the generated Rust packets will
have Packet appended in some cases, which would lead to
CommandPacketPacket, which is not great.

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: I5ad00f7c0f0d2dda83b3e1213145f0bd87c799e0

3 years agoMerge changes If1e078bd,I8ee5baf6
Zach Johnson [Wed, 16 Dec 2020 03:20:00 +0000 (03:20 +0000)]
Merge changes If1e078bd,I8ee5baf6

* changes:
  rusty-gd: refine stack ffi a bit
  Apply rustfmt to keep checkin hook happy

3 years agoMerge "Revert "Cert: Temporarily disable the SSP OOB test""
Treehugger Robot [Wed, 16 Dec 2020 03:14:36 +0000 (03:14 +0000)]
Merge "Revert "Cert: Temporarily disable the SSP OOB test""

3 years agoRevert "Cert: Temporarily disable the SSP OOB test"
Myles Watson [Wed, 16 Dec 2020 01:05:26 +0000 (01:05 +0000)]
Revert "Cert: Temporarily disable the SSP OOB test"

This reverts commit e17119395069b33a0f6e1080e80d5b1e10c35be4.

Reason for revert: The CL that fixed the test landed
Bug: 175033589
Test: cert/run SecurityTest
Tag: #gd-refactor
Change-Id: I4dd577f53a45abb2e0f6c52fc3d577ed6ab8e3ce

3 years agogd: Refactor ExtendedCreateAdvertiser function
Chienyuan [Tue, 15 Dec 2020 09:30:20 +0000 (17:30 +0800)]
gd: Refactor ExtendedCreateAdvertiser function

Tag: #gd-refactor
Bug: 169125803
Test: cert/run --host
Test: atest --host bluetooth_test_gd
Change-Id: I2fa3ddf5b50764e5dde5a613de473405824c4948

3 years agoCert: Pin Code Test
Martin Brabham [Fri, 4 Dec 2020 05:00:41 +0000 (21:00 -0800)]
Cert: Pin Code Test

Implement cert test for verification of PIN code functionality

Additionally, don't enabled SSP in the controller layer.
Allow for Security module to control setting.

Bug: 162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest:test_successful_dut_initiated_pin
Change-Id: I770e3fb7e2682269810776aa75b416ebc58b5369

3 years agoMerge "Security: Wait for name request in link key notification"
Treehugger Robot [Tue, 15 Dec 2020 22:02:44 +0000 (22:02 +0000)]
Merge "Security: Wait for name request in link key notification"

3 years agoMerge changes I992b781d,Ic2cfde11,I8e8d5a05
Zach Johnson [Tue, 15 Dec 2020 21:56:21 +0000 (21:56 +0000)]
Merge changes I992b781d,Ic2cfde11,I8e8d5a05

* changes:
  rusty-gd: expose rust enums for enums
  rusty-gd: add builder structs
  rusty-gd: call children write_to()s

3 years agoMerge changes Icc40d3d8,I241bcf4e,I9406eb11,I8dea0a13,Ib4a05164, ...
Zach Johnson [Tue, 15 Dec 2020 21:55:03 +0000 (21:55 +0000)]
Merge changes Icc40d3d8,I241bcf4e,I9406eb11,I8dea0a13,Ib4a05164, ...

* changes:
  rusty-gd: update visibilities, put parse & to bytes on pub api
  rusty-gd: refine specialization
  rusty-gd: start specialzation frontend
  rusty-gd: add packet accessors
  rusty-gd: Add child & into for pub access packet structs
  rusty-gd: separate data storage from packet view

3 years agoMerge "LE Audio State Machine and Native Interface boilerplate"
Jakub Pawlowski [Tue, 15 Dec 2020 21:54:45 +0000 (21:54 +0000)]
Merge "LE Audio State Machine and Native Interface boilerplate"

3 years agorusty-gd: refine stack ffi a bit
Zach Johnson [Thu, 10 Dec 2020 21:08:19 +0000 (13:08 -0800)]
rusty-gd: refine stack ffi a bit

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: If1e078bdb64a41ee0a77e352617f39a0ab3155d5

3 years agoApply rustfmt to keep checkin hook happy
Zach Johnson [Tue, 15 Dec 2020 21:47:52 +0000 (13:47 -0800)]
Apply rustfmt to keep checkin hook happy

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: I8ee5baf6fcfabcaefe08a7792e655e41cf502df1

3 years agoMerge "Change rust_grpcio modules to rust_protobuf."
Ivan Lozano [Tue, 15 Dec 2020 21:38:31 +0000 (21:38 +0000)]
Merge "Change rust_grpcio modules to rust_protobuf."

3 years agoMerge "Cert: Temporarily disable the SSP OOB test"
Myles Watson [Tue, 15 Dec 2020 19:32:11 +0000 (19:32 +0000)]
Merge "Cert: Temporarily disable the SSP OOB test"

3 years agoCert: Temporarily disable the SSP OOB test
Martin Brabham [Tue, 15 Dec 2020 18:29:34 +0000 (10:29 -0800)]
Cert: Temporarily disable the SSP OOB test

Waiting on another CL to fix the underlying issue before re-enabling

Bug: 175033589
Test: cert/run SecurityTest
Tag: #gd-refactor
Change-Id: If24dfb92d987d2dc147ed396b9f6b9d4d249347d

3 years agoSecurity: Wait for name request in link key notification
Martin Brabham [Mon, 14 Dec 2020 20:31:03 +0000 (12:31 -0800)]
Security: Wait for name request in link key notification

For classic SSP numeric comparison we must wait at the
UserConfirmationRequest in order to get the name before
we display it to the user.  However, in the Out of Band
data flow we never get a UserConfirmationRequest.

Thus, we must wait in the link key notification if we
have not yet received a name response.

Remove setting to std::nullopt as the operator= in
std::optional causes the underlying pointer to be reset
and thus freed, but still accessed by the pointer we passed.

Bug: 175033589
Test: cert/run SecurityTest:test_successful_dut_initiated_ssp_oob --repeat=20
Tag: #gd-refactor
Change-Id: Ic3f424e22a0c596b21969d4882d0a9b06f7433ab

3 years agoMerge "AV stream state machine logging"
Treehugger Robot [Tue, 15 Dec 2020 13:31:25 +0000 (13:31 +0000)]
Merge "AV stream state machine logging"

3 years agoMerge "gd: Fragmentation for periodic advertising"
Treehugger Robot [Tue, 15 Dec 2020 02:33:41 +0000 (02:33 +0000)]
Merge "gd: Fragmentation for periodic advertising"

3 years agoMerge "rusty-gd: rename interop to ffi"
Zach Johnson [Tue, 15 Dec 2020 00:21:46 +0000 (00:21 +0000)]
Merge "rusty-gd: rename interop to ffi"

3 years agoMerge changes I5bc0330c,I7d68ca08,I3f5bba04
Treehugger Robot [Mon, 14 Dec 2020 23:26:53 +0000 (23:26 +0000)]
Merge changes I5bc0330c,I7d68ca08,I3f5bba04

* changes:
  enum-ify bta/include/bta_api::SSR_
  btm_history: Add acl power mode state
  Properly retrieve acl_conn stack/acl/btm_acl::BTM_IsBleConnection

3 years agoMerge changes Id10b509c,I3f1a6073,I07885881
Zach Johnson [Mon, 14 Dec 2020 23:05:00 +0000 (23:05 +0000)]
Merge changes Id10b509c,I3f1a6073,I07885881

* changes:
  rusty-gd: mark vector field writing as unimplemented
  rusty-gd: add support for struct fields in write_to()
  rusty-gd: start writing scalar fields in write_to()

3 years agoenum-ify bta/include/bta_api::SSR_
Chris Manton [Tue, 8 Dec 2020 21:35:21 +0000 (13:35 -0800)]
enum-ify bta/include/bta_api::SSR_

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I5bc0330c7e9fbf902b0b1f000017f5d733c7dcce

3 years agobtm_history: Add acl power mode state
Chris Manton [Tue, 8 Dec 2020 19:01:48 +0000 (11:01 -0800)]
btm_history: Add acl power mode state

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I7d68ca082c683f663024309e577041ba5ff5d02e

3 years agoProperly retrieve acl_conn stack/acl/btm_acl::BTM_IsBleConnection
Chris Manton [Tue, 8 Dec 2020 19:02:06 +0000 (11:02 -0800)]
Properly retrieve acl_conn stack/acl/btm_acl::BTM_IsBleConnection

Towards encapsulation

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I3f5bba04de53378dad998c5471f9ca20cd6be2d6

3 years agoMerge changes If9886370,I80a0fbce
Treehugger Robot [Mon, 14 Dec 2020 21:32:45 +0000 (21:32 +0000)]
Merge changes If9886370,I80a0fbce

* changes:
  GD-Cert: Symbolize ASAN triggered crashes
  GD-Facade: Enable ASAN but disable container overflow check

3 years agoMerge "rusty-gd: implement btsnoop"
Zach Johnson [Mon, 14 Dec 2020 20:51:16 +0000 (20:51 +0000)]
Merge "rusty-gd: implement btsnoop"

3 years agoMerge "Use canonical version of rustfmt"
Treehugger Robot [Mon, 14 Dec 2020 20:25:19 +0000 (20:25 +0000)]
Merge "Use canonical version of rustfmt"

3 years agoPrint what module is being started/stopped in crash
Hansong Zhang [Wed, 9 Dec 2020 20:31:16 +0000 (12:31 -0800)]
Print what module is being started/stopped in crash

Tag: #stability
Bug: 174293959
Test: cert/run
Change-Id: Ie1b5d6af3bc57b3672ba10307d6b0fa9c6267706

3 years agorusty-gd: expose rust enums for enums
Zach Johnson [Sat, 12 Dec 2020 23:13:33 +0000 (15:13 -0800)]
rusty-gd: expose rust enums for enums

break parsing primitive type out, just for parsing

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: I992b781dd83c3a047970ee25f9bf70e8e1e14f9e

3 years agorusty-gd: update visibilities, put parse & to bytes on pub api
Zach Johnson [Sat, 12 Dec 2020 20:40:44 +0000 (12:40 -0800)]
rusty-gd: update visibilities, put parse & to bytes on pub api

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: Icc40d3d81fc5681d3e54536ae56a1e1bf5b90896

3 years agorusty-gd: add builder structs
Zach Johnson [Sat, 12 Dec 2020 22:40:26 +0000 (14:40 -0800)]
rusty-gd: add builder structs

by making them structs, you must name the parameters explicitly (which
is great for readability - also it doesn't matter which order you
specify them as long as you specify them all)

since builders can be constructed for middle structs in the lineage, add
None option for child enums

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: Ic2cfde113ccd6f8475c7514c513ac7b62b3689e3

3 years agorusty-gd: refine specialization
Zach Johnson [Sat, 12 Dec 2020 20:15:28 +0000 (12:15 -0800)]
rusty-gd: refine specialization

no need for accessors, define RCs that get loaded upon construction

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: I241bcf4e5f3ad95df37b4d0d3b174728965a4f7f

3 years agorusty-gd: call children write_to()s
Zach Johnson [Sat, 12 Dec 2020 20:50:55 +0000 (12:50 -0800)]
rusty-gd: call children write_to()s

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: I8e8d5a054e9a3f57328d9a0c1cdbaec28a6df9e2

3 years agorusty-gd: start specialzation frontend
Zach Johnson [Sat, 12 Dec 2020 06:44:28 +0000 (22:44 -0800)]
rusty-gd: start specialzation frontend

comment out and mark internal parse & ctors as unimplemented (child
parsing not ready yet)

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: I9406eb111c56a88d31f4973fc4cda6facc9c18bb

3 years agorusty-gd: add packet accessors
Zach Johnson [Sat, 12 Dec 2020 05:47:56 +0000 (21:47 -0800)]
rusty-gd: add packet accessors

accessors for all ancestor fields too
stubbed against accessor functions (until inner child is ready)

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: I8dea0a1380b70a8b050e277dc3a388751000f7bf

3 years agorusty-gd: Add child & into for pub access packet structs
Zach Johnson [Sat, 12 Dec 2020 05:13:17 +0000 (21:13 -0800)]
rusty-gd: Add child & into for pub access packet structs

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: Ib4a0516495246ab73b981f8259500f4ab2a98d17

3 years agorusty-gd: mark vector field writing as unimplemented
Zach Johnson [Fri, 11 Dec 2020 18:56:45 +0000 (10:56 -0800)]
rusty-gd: mark vector field writing as unimplemented

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost
Change-Id: Id10b509cdca7e05e63c09c04b8c27dc72787e70f

3 years agorusty-gd: separate data storage from packet view
Zach Johnson [Sat, 12 Dec 2020 00:38:08 +0000 (16:38 -0800)]
rusty-gd: separate data storage from packet view

create XYZData structs & enums, which will be internally accessed through
the exposed view

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost
Change-Id: I734e1ce5198223b51364e0cb5cd8370104c7b8ef

3 years agorusty-gd: add support for struct fields in write_to()
Zach Johnson [Fri, 11 Dec 2020 18:50:24 +0000 (10:50 -0800)]
rusty-gd: add support for struct fields in write_to()

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost
Change-Id: I3f1a60733d2bf6bd77064523171f08dcb855ba7b

3 years agorusty-gd: start writing scalar fields in write_to()
Zach Johnson [Fri, 11 Dec 2020 18:40:26 +0000 (10:40 -0800)]
rusty-gd: start writing scalar fields in write_to()

Bug: 171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost
Change-Id: I07885881aa19538e62bd9cdcdac79127349f60b6

3 years agoMerge "Fix valid check"
Treehugger Robot [Mon, 14 Dec 2020 19:33:10 +0000 (19:33 +0000)]
Merge "Fix valid check"

3 years agoGD-Cert: Symbolize ASAN triggered crashes
Jack He [Mon, 14 Dec 2020 07:33:40 +0000 (23:33 -0800)]
GD-Cert: Symbolize ASAN triggered crashes

* Use llvm-symbolizer
* https://github.com/google/sanitizers/wiki/AddressSanitizerCallStack

Bug: 175033589
Test: gd/cert/run
Tag: #gd-refactor
Change-Id: If9886370bdccd207d16104a7240349a8c68af7c5

3 years agoMerge "GD: Make destructors virtual not override"
Treehugger Robot [Mon, 14 Dec 2020 18:29:53 +0000 (18:29 +0000)]
Merge "GD: Make destructors virtual not override"

3 years agoFix valid check
Greg Kaiser [Mon, 14 Dec 2020 15:13:27 +0000 (07:13 -0800)]
Fix valid check

We were checking peer_lmp_feature_valid[0] twice; we add a check
of peer_lmp_feature_valid[1].

Test: TreeHugger
Change-Id: Ibce650f4120ac9e8b801920d5bf7f45c3d260317

3 years agoUse canonical version of rustfmt
ThiƩbaud Weksteen [Mon, 14 Dec 2020 10:34:16 +0000 (11:34 +0100)]
Use canonical version of rustfmt

Enable rustfmt repohook.

Test: repo upload
Change-Id: I9836672a755021c16b9f609cea147664f92bd6e5

3 years agogd: Fragmentation for periodic advertising
Chienyuan [Mon, 14 Dec 2020 07:52:17 +0000 (15:52 +0800)]
gd: Fragmentation for periodic advertising

Tag: #gd-refactor
Bug: 149221472
Test: cert/run --host
Test: atest --host bluetooth_test_gd
Change-Id: I7370716cd8b01ce54de92deca759cafd0590cc15

3 years agoGD-Facade: Enable ASAN but disable container overflow check
Jack He [Sat, 12 Dec 2020 00:01:58 +0000 (16:01 -0800)]
GD-Facade: Enable ASAN but disable container overflow check

* AddressSanitizerContainerOverflow has false positives because not
  all dependencies are compiled with ASAN according to:
  https://github.com/google/sanitizers/wiki/AddressSanitizerContainerOverflow
* Hence we need to disable container overflow check. We do this at
  compile time per instructiosn at:
  https://github.com/google/sanitizers/wiki/AddressSanitizerFlags#run-time-flags

Bug: 175033589
Test: gd/cert/run
Tag: #gd-refactor
Change-Id: I80a0fbcef022101b57d1c68919add6acf6aa81e4

3 years agoRe-log bta/sys/bta_sys_conn::bta_sys_notify_role_chg
Chris Manton [Tue, 8 Dec 2020 06:18:32 +0000 (22:18 -0800)]
Re-log bta/sys/bta_sys_conn::bta_sys_notify_role_chg

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I66b27249f3b0ca8e947218af817d9f5367304156

3 years agoAdd stack/include/btm_api_types::power_mode_status_text
Chris Manton [Tue, 8 Dec 2020 06:18:16 +0000 (22:18 -0800)]
Add stack/include/btm_api_types::power_mode_status_text

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I0b45c76cec34d7bcd1358066514a5c09c6d5f6bf

3 years agoRe-log bta/dm/bta_dm_pm::bta_dm_pm_ssr
Chris Manton [Mon, 7 Dec 2020 03:09:29 +0000 (19:09 -0800)]
Re-log bta/dm/bta_dm_pm::bta_dm_pm_ssr

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: Ie600fbf1c3da0c5850c9b4712862d78b3430bbe4

3 years agoMove and add stack/acl/acl::power_mode_state_text
Chris Manton [Sun, 6 Dec 2020 19:35:43 +0000 (11:35 -0800)]
Move and add stack/acl/acl::power_mode_state_text

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I2a63399e186f2e25f83b3288d6407f79d5a1e021

3 years agoAggregate send_sniff_subrating
Chris Manton [Mon, 7 Dec 2020 20:35:45 +0000 (12:35 -0800)]
Aggregate send_sniff_subrating

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I3581ab52af23e43bcbb1ebf4ffe0599552b1fa57

3 years agoCheck BTM_ReadPowerMode and BTM_SetPowerMode return values
Chris Manton [Sun, 6 Dec 2020 19:23:20 +0000 (11:23 -0800)]
Check BTM_ReadPowerMode and BTM_SetPowerMode return values

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I03a4a0005967957a56051d181965d7634f27073e

3 years agoMove power mode types into acl header
Chris Manton [Tue, 8 Dec 2020 01:08:26 +0000 (17:08 -0800)]
Move power mode types into acl header

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I5bf2c549ee1230c1a229797d085ef44aefef8edc

3 years agoStreamline stack/acl/btm_pm::BTM_SetSsrParams
Chris Manton [Tue, 8 Dec 2020 00:40:43 +0000 (16:40 -0800)]
Streamline stack/acl/btm_pm::BTM_SetSsrParams

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: If14075aab757f2e3b788b677b04c4b4a6ae1f90d

3 years agoAdd stack/acl/btm_acl::acl_address_to_handle
Chris Manton [Sun, 13 Dec 2020 16:45:05 +0000 (08:45 -0800)]
Add stack/acl/btm_acl::acl_address_to_handle

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: If28b4dbf8a28fc64489cda6d3d2425d3f961d987

3 years agoAdd StackAclBtmPm::btm_pm_get_power_manager_from_address
Chris Manton [Tue, 8 Dec 2020 00:28:29 +0000 (16:28 -0800)]
Add StackAclBtmPm::btm_pm_get_power_manager_from_address

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I99484639130e101db584866802564051ac9dd339

3 years agoAdd placeholder tPOWER_MODE_STATE::BTM_PM_ST_UNUSED
Chris Manton [Tue, 8 Dec 2020 00:20:33 +0000 (16:20 -0800)]
Add placeholder tPOWER_MODE_STATE::BTM_PM_ST_UNUSED

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I0d4770d61336826c9f170f92f7d6a33e7dc6fdc3

3 years agoDecouple stack/btm/btm_int_types::BTM_PM_ST_ from btm deps
Chris Manton [Tue, 8 Dec 2020 00:16:08 +0000 (16:16 -0800)]
Decouple stack/btm/btm_int_types::BTM_PM_ST_ from btm deps

These values are spec driven, not btm driven

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I20cd743600996812ff0d5ef0145d7bf209678017

3 years agoenum-ify bta/dm/bta_dm_int::BTA_DM_DI_
Chris Manton [Mon, 7 Dec 2020 23:53:49 +0000 (15:53 -0800)]
enum-ify bta/dm/bta_dm_int::BTA_DM_DI_

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I6b1176bda0f3646bd4ca2ff3b5e983f9cde1c30a

3 years agoenum-ify stack/btm/btm_int_types::BTM_PM_ST_
Chris Manton [Mon, 7 Dec 2020 22:16:24 +0000 (14:16 -0800)]
enum-ify stack/btm/btm_int_types::BTM_PM_ST_

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I096f0228fcec1f6116bfbbc5fd60b156f3a9893d

3 years agoAdd APIs for default acl behavior
Chris Manton [Thu, 3 Dec 2020 18:22:29 +0000 (10:22 -0800)]
Add APIs for default acl behavior

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I6b8fc419ae42480884fb821dbd5663150b7ab12f

3 years agoAdd tACL_CONN::InUse
Chris Manton [Sun, 13 Dec 2020 01:23:22 +0000 (17:23 -0800)]
Add tACL_CONN::InUse

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: Ic7b9697f532a711044bd47125823c4d3f1c5edd1