OSDN Git Service
Chris Manton [Thu, 31 Dec 2020 19:00:47 +0000 (11:00 -0800)]
Add tACL_CB::tACL_CONN::policy
Provide space for link policy state
Bug:
175344733
Test: cert
Tag: #refactor
Change-Id: I852b30c1d772c56ac765a975cda7a88adf57584c
Chris Manton [Mon, 4 Jan 2021 00:27:27 +0000 (16:27 -0800)]
De-anonymize stack/acl/acl::tACL_CONN
Bug:
166280067
Tag: #refactor
Test: gd/cert/run --host
Change-Id: I5ec02f7bbfc5a11c4c74edf856c3e24f57ce414a
Chris Manton [Tue, 22 Dec 2020 21:30:59 +0000 (13:30 -0800)]
gd_acl: Add link policy mode methods
Bug:
175344733
Test: cert
Tag: #refactor
Change-Id: Ib9e59e4978f671cf545b51297715c4c3fb6ede60
Chris Manton [Thu, 31 Dec 2020 17:39:46 +0000 (09:39 -0800)]
Introduce main/shim/link_policy.h
Bug:
175344733
Test: cert
Tag: #refactor
Change-Id: I5011df4f706ba0114de22abd0b8b36658a2edb5d
Chris Manton [Thu, 31 Dec 2020 17:39:46 +0000 (09:39 -0800)]
Connect gd acl shim sniff subrating
Bug:
175344733
Test: cert
Tag: #refactor
Change-Id: I824dc66f9ddcf11f88ebf75eed06d97144428bd8
Chris Manton [Wed, 23 Dec 2020 06:23:15 +0000 (22:23 -0800)]
gd: Handle EventCode::SNIFF_SUBRATING in acl connection
Bug:
175344733
Test: cert
Tag: #refactor
Change-Id: I71ae0cbd35e3faf1d5112ca3b735423752852898
Chris Manton [Wed, 23 Dec 2020 01:09:50 +0000 (17:09 -0800)]
gd: Add rust flags gd_link_policy
Bug:
175344733
Test: cert
Tag: #refactor
Change-Id: I4c94a40ed18069cae9433ca447f07e2a40874323
Chris Manton [Sat, 26 Dec 2020 05:44:59 +0000 (21:44 -0800)]
Formalize conversion HCI_TO_BTM_POWER_MODE
Towards readable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: I59e201618412e53c1975e2234387860556354f71
Chris Manton [Sun, 27 Dec 2020 17:50:22 +0000 (09:50 -0800)]
Re-group and label interfaces main/shim/acl::
Towards readable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: Ifd2d40b5104153171cf00de20000e4e64ae4e542
Chris Manton [Mon, 28 Dec 2020 20:45:17 +0000 (12:45 -0800)]
Add include/hardware/bluetooth::bt_status_text
Towards loggable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: I2a39853ff6000ae78ce48476ec408991cade3876
Chris Manton [Sat, 26 Dec 2020 21:16:33 +0000 (13:16 -0800)]
Remove unused main/shim/btm_api::BTM_SetPowerMode
Bug:
175344733
Test: cert
Tag: #refactor
Change-Id: I40aa79b2857f55430862f75e431a2a93f2f47557
Chris Manton [Sat, 26 Dec 2020 21:09:05 +0000 (13:09 -0800)]
Use stack/acl/btm_acl::BTM_SetLinkPolicyActiveMode
Bug:
175344733
Test: cert
Tag: #refactor
Change-Id: Id326a5ebc521b536f54202c32ec70bed29612592
Chris Manton [Tue, 29 Dec 2020 03:20:47 +0000 (19:20 -0800)]
Add stack/acl/acl::tSSR_PARAMS
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: Ib6471de7996a19b845bfdc19b561afb452ce9258
Chris Manton [Tue, 29 Dec 2020 07:15:33 +0000 (23:15 -0800)]
Add link policy registration tACL_CB::clients
Bug:
175344733
Test: cert
Tag: #refactor
Change-Id: Ifa23c76f69786673194d5bac8af1bd25f78d9ff7
Chris Manton [Fri, 25 Dec 2020 03:55:10 +0000 (19:55 -0800)]
Add uninitialized value stack/include/btm_api_types::tBTM_PM_MODE
Bug:
175344733
Test: cert
Tag: #refactor
Change-Id: I28b1b17446078227a00ed21abb099179b3e3cf8a
Chris Manton [Tue, 29 Dec 2020 03:24:39 +0000 (19:24 -0800)]
Add stack/acl/acl::link policies
Towards readable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: I20c485628c6f48650040504929497134e8fb6385
Chris Manton [Thu, 24 Dec 2020 17:20:11 +0000 (09:20 -0800)]
Use proper type stack/acl/::tLINK_POLICY
Towards readable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: I7d915bb5c8e5f1e776d3b2c3db90f95acc6de846
Chris Manton [Sat, 26 Dec 2020 20:56:17 +0000 (12:56 -0800)]
Add stack/acl/btm_pm::BTM_SetLinkPolicyActiveMode
Bug:
175344733
Test: cert
Tag: #refactor
Change-Id: Ic3fae4495111f50dc17abe510fea395b33b91431
Chris Manton [Sun, 27 Dec 2020 17:49:04 +0000 (09:49 -0800)]
Group like functions main/shim/acl::
Towards readable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: I555d895b49c0eb0f9e8e1cd5f67a124f5eeeb23b
Chienyuan [Tue, 29 Dec 2020 06:54:18 +0000 (14:54 +0800)]
gd: add shim layer for LE scanning manager
Tag: #refactor
Bug:
159815595
Test: manual
Change-Id: Idea9ad04a51938a3f8bcc2d594dd1d7483adde5c
Treehugger Robot [Tue, 29 Dec 2020 06:12:21 +0000 (06:12 +0000)]
Merge "Shim: Add GD scanning init flags"
Chienyuan [Mon, 28 Dec 2020 08:43:08 +0000 (16:43 +0800)]
Shim: Add GD scanning init flags
Tag: #gd-refactor
Bug:
159815595
Test: cert/run --host
Change-Id: I758d69ff5ab7bb6029444aa699fc4d638ba21a2a
Chienyuan [Fri, 25 Dec 2020 10:19:25 +0000 (18:19 +0800)]
gd: Set flag for connectable advertising
Tag: #gd-refactor
Bug:
176047975
Test: cert/run --host
Test: atest --host bluetooth_test_gd
Change-Id: Iea0e70eba8a9401e66a6078ba3f62adada81af0c
Chienyuan [Fri, 25 Dec 2020 09:11:44 +0000 (17:11 +0800)]
gd: Handle duration and max advertising event
Tag: #gd-refactor
Bug:
176047975
Test: cert/run --host
Test: atest --host bluetooth_test_gd
Change-Id: Ie87986b11ed0b412290296c50ebb0b8bce31fb7d
Jakub Pawlowski [Wed, 23 Dec 2020 20:41:30 +0000 (21:41 +0100)]
Fix bad SC bit in Pairing Request/Response between two android phones
This patch fixes recent regression where Secure Connection pairing is no
longer used, even between two capable devices.
Tag: #gd-refactor
Bug:
141555841
Test: bond two LE devices capable of Secure Connection
Change-Id: If621078a62cb42d2f6b88e94801ada5d107a727a
Treehugger Robot [Wed, 23 Dec 2020 04:15:19 +0000 (04:15 +0000)]
Merge "[GD-Controller] Enable SSP controller when security layer is not enabled"
Jakub Pawlowski [Wed, 23 Dec 2020 02:02:37 +0000 (02:02 +0000)]
Merge "stack/eatt: Add multi read var and multi notification handling"
Treehugger Robot [Tue, 22 Dec 2020 20:22:21 +0000 (20:22 +0000)]
Merge changes I7a22a399,Id3686045
* changes:
HCI: Add support for synchronous commands
[GD-SCO] Add SCO related commands and events
Jack He [Tue, 22 Dec 2020 20:18:54 +0000 (12:18 -0800)]
[GD-Controller] Enable SSP controller when security layer is not enabled
* This allows Simple Secure Pairing when only controller layer is
enabled
Fixes:
176048878
Tag: #gd-refactor
Test: gd/cert/run
Change-Id: I2ab30bb47f75cde94c1d2d83bc284027771eef60
Łukasz Rymanowski [Thu, 18 Jun 2020 10:18:16 +0000 (12:18 +0200)]
stack/eatt: Add multi read var and multi notification handling
Multi read variable is added to GATT server.
Multi notification handling as a GATT client.
Tag: #feature
Bug:
159786353
Sponsor: jpawlowski@
Test: compile & manual testing
Change-Id: Ibeb27a0eb7f0c9c241bc9dbac24d6f4306140005
Chris Manton [Tue, 22 Dec 2020 00:43:12 +0000 (16:43 -0800)]
Straighten out stack/acl/btm_acl::acl_address_from_handle
Towards readable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: I64fa3a2dc6cef8080eaf0e6536f6a7d553ff02d2
Chris Manton [Mon, 21 Dec 2020 23:37:36 +0000 (15:37 -0800)]
Consolidate #defs BT_PSM_
Towards readable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: I2d05e6bdbebbd5bd796de995bb582ba3e499d381
Chris Manton [Tue, 22 Dec 2020 02:31:43 +0000 (18:31 -0800)]
Re-log BTM_SetPowerMode
Towards loggable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: Iad96cb93c510b5df5630245d9fc6637ca07d3c05
Chris Manton [Tue, 22 Dec 2020 02:33:37 +0000 (18:33 -0800)]
Re-log BTM_SetSsrParams
Towards loggable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: Ida8b507b32d5978b0ce98596ac58dde37874c39a
Chris Manton [Tue, 22 Dec 2020 02:33:17 +0000 (18:33 -0800)]
Streamline process_ssr_event
Towards readable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: I875ec08cb039286f0d9538f5f173b82376d245b9
Chris Manton [Sun, 13 Dec 2020 01:13:46 +0000 (17:13 -0800)]
Use tACL_CB::DefaultPacketTypes
Towards encapsulation
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: Ie034c9703f18b18a7338b362816414f602e1923c
Chris Manton [Fri, 11 Dec 2020 00:20:17 +0000 (16:20 -0800)]
Re-log stack/acl/btm_pm::btm_pm_proc_cmd_status
Towards loggable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: Ia8dceac14b10761ef40db6d9999d768462b7ae50
Chris Manton [Thu, 10 Dec 2020 02:15:14 +0000 (18:15 -0800)]
Use proper types tHCI_STATUS
Towards readable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: Ied837f99e446b509d5f6d03a53465a9c07c70d04
Chris Manton [Thu, 10 Dec 2020 04:26:35 +0000 (20:26 -0800)]
Re-log bta/dm/bta_dm_pm::bta_dm_pm_sniff
Towards loggable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: I3c38e184a0eafb16f0aa653365e74c41ab822d49
Chris Manton [Mon, 7 Dec 2020 04:15:25 +0000 (20:15 -0800)]
Encapsulate tBTM_PM_MCB::state
Towards readable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: Ieb954f5d1395e0b860e5483b534ae2a0df274b1c
Chris Manton [Wed, 9 Dec 2020 22:22:37 +0000 (14:22 -0800)]
Streamline stack/acl/btm_pm::BTM_ReadPowerMode
Towards readable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: Id9e92d788a8d4ecb624db6155e39c509787b9aa2
Chris Manton [Fri, 11 Dec 2020 00:25:38 +0000 (16:25 -0800)]
Re-log bta/dm/bta_dm_pm::bta_dm_pm_timer_cback
Towards loggable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: I7149d0578c7cc3674c7a54c9952994400e67195c
Chris Manton [Thu, 10 Dec 2020 21:30:48 +0000 (13:30 -0800)]
Re-log bta/dm/bta_dm_pm::bta_dm_pm_cback
Towards loggable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: I4b19475d9731ca151894327393fbf4cf560ecfac
Chris Manton [Wed, 9 Dec 2020 17:04:00 +0000 (09:04 -0800)]
Re-log bta/dm/bta_dm_act::bta_dm_rm_cback
Towards loggable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: I86b87654fb9e9c8a0de8a9c2966712cfd9ab8056
Chris Manton [Wed, 9 Dec 2020 16:52:50 +0000 (08:52 -0800)]
Re-log bta/av/bta_av_aact::bta_av_conn_failed
Towards loggable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: Ie4d215f13959efe536298478510116b867ba10bb
Chris Manton [Wed, 9 Dec 2020 16:52:36 +0000 (08:52 -0800)]
Re-log bta/dm/bta_dm_pm::bta_dm_pm_set_mode
Towards loggable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: I36ec01426689b61693eb63210344df2b788474b7
Chris Manton [Wed, 9 Dec 2020 20:28:53 +0000 (12:28 -0800)]
Encapsulate bta/dm/bta_dm_int::tBTA_DM_DEV_INFO
Towards readable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: Ie829593e381619b7ee46e2fb73d9b5bb842b2d31
Chris Manton [Wed, 9 Dec 2020 23:13:18 +0000 (15:13 -0800)]
Add stack/include/btm_api_types::is_legal_power_mode
Towards readable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: I001c2476f23acb57fbb57f20e6212e9eb3f0ef9c
Chris Manton [Sat, 19 Dec 2020 01:58:42 +0000 (17:58 -0800)]
Add audio gateway BtaIdSysText::BTA_ID_AG
Towards loggable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: Id263cdd4b0c56ec1eeae517ee1c8b96cca096daa
Chris Manton [Tue, 15 Dec 2020 00:16:04 +0000 (16:16 -0800)]
Add tBTA_AG_SCB::ToString
Monster structure needs visibility
Towards readability
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I7d20e5d71f2108103bb878fb3774421e8df76a6e
Julien Desprez [Tue, 22 Dec 2020 00:59:36 +0000 (00:59 +0000)]
Merge "Swich TEST_MAPPING config to unit_tests:true"
Julien Desprez [Mon, 21 Dec 2020 22:00:45 +0000 (14:00 -0800)]
Swich TEST_MAPPING config to unit_tests:true
All unit_tests:true are run in presubmit which avoids
the explicit definition of TEST_MAPPING.
Test: presubmit runs all those tests
Bug:
175408655
Change-Id: Ibf2b80f902bffa4924853f001780e2d273cf451f
Hansong Zhang [Thu, 17 Dec 2020 19:20:02 +0000 (11:20 -0800)]
Add L2CAP 5.2 packets
Bug:
141555841
Tag: #gd-refactor
Test: make
Change-Id: I73b6e21f06824aed74e7131dec388108f5ecd018
Chris Manton [Tue, 15 Dec 2020 00:08:11 +0000 (16:08 -0800)]
enum-ify bta/ag/bta_ag_int::tBTA_AG_SCO
Towards readable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: If8bcba05b54b4665244331a11039272df9c8f5c9
Chris Manton [Mon, 14 Dec 2020 23:26:54 +0000 (15:26 -0800)]
Rearrange enumify stack/btm/btm_sco::SCO_ST_
Towards readable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: Ia68644821a23772e43746036d890de979cee1d84
Chris Manton [Thu, 10 Dec 2020 22:16:11 +0000 (14:16 -0800)]
Re-include stack/acl/btm_pm
Towards readable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: Ib2d5d5d1f5db8e0047a04749fd1ed0660db4ab35
Chris Manton [Sat, 12 Dec 2020 17:15:24 +0000 (09:15 -0800)]
enum-ify stack/include/avrc_defs::tAVRC_PDU
Towards readable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: I667063c026983dcfe04f8b2a98466febdcaeb041
Chris Manton [Fri, 11 Dec 2020 00:26:56 +0000 (16:26 -0800)]
Use acl default methods
Towards readable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: Id799d219408efa9ac55892e479a1605c5259edbb
Chris Manton [Thu, 17 Dec 2020 22:38:21 +0000 (14:38 -0800)]
Stati-ify bta/ag/bta_ag_cmd
Towards readable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: Ia608f80ca893162d3d199e58751d91dc281922b4
Chris Manton [Sat, 19 Dec 2020 02:00:18 +0000 (18:00 -0800)]
Add stack/rfcomm/rfc_int::rfcomm_mx_state_text
Towards loggable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: Id3649acae3d2706e9d9a4c7d5db0db7174f7f86f
Chris Manton [Tue, 15 Dec 2020 01:44:34 +0000 (17:44 -0800)]
Add main/shim/acl::DumpsysRecord for p_sec_rec
Towards dumpable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: Ia9d8ea362578a9a95cebab8a26befb200f1f9f55
Chris Manton [Tue, 15 Dec 2020 01:44:42 +0000 (17:44 -0800)]
Add stack/btm/security_device_record::ToString
Towards loggable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: I9e6c1e5865f1524854e8cc7ce3648d7e662d112e
Chris Manton [Sun, 20 Dec 2020 01:32:40 +0000 (17:32 -0800)]
Add declaration btm_sco_chk_pend_unpark
And fix types
Towards readable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: I1b4b978d8aae1f0122189c5d7be3abb395a70b9e
Chris Manton [Fri, 11 Dec 2020 00:24:47 +0000 (16:24 -0800)]
Add tBTA_DM_SRVCS::ToString
Towards loggable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: Iddfc929dddd16d3287ba945789d4bb24ea8beac8
Chris Manton [Thu, 10 Dec 2020 04:26:48 +0000 (20:26 -0800)]
Use power_mode_state_text in dumpsys
Towards dumpable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: I3388cd5cbeccfa28cc0f88d491e83751dad524f0
Chris Manton [Thu, 10 Dec 2020 00:54:52 +0000 (16:54 -0800)]
Add stack/include/btm_api_types::power_mode_text
Towards loggable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: I18da64eab0ff3e30a8aa7554c6469ae25b9beb07
Chris Manton [Sat, 12 Dec 2020 17:28:05 +0000 (09:28 -0800)]
Use proper acl transport check
Towards encapsulation
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: I32c2f381dd49c9683217d2c40abe5146b4bd9ad8
Chris Manton [Sun, 20 Dec 2020 01:22:49 +0000 (17:22 -0800)]
gd_acl: SCO temporary fix
Assume unknown disconnects are from SCO and
respond accordingly
Bug:
166280067
Tag: #refactor
Test: gd/cert/run --host
Change-Id: Icce62bdc05f4e7ba17b1a05ca40b0db42d8e5cc8
Chris Manton [Sat, 19 Dec 2020 18:59:11 +0000 (10:59 -0800)]
Move power_mode registration from btm_cb into acl
Towards encapsulation
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: Iaaf7632753f030c70275631da754711759ff822a
Chris Manton [Sat, 19 Dec 2020 16:50:58 +0000 (08:50 -0800)]
Add context term for StackAclBtmPm::btm_pm_snd_md_req
Towards encapsulation
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: If1d4d1809c987dcd01397c5d77ae416d8b8b685f
Chris Manton [Sat, 19 Dec 2020 19:17:14 +0000 (11:17 -0800)]
Move stack/acl/acl::tBTM_PM_STATE earlier in header
Towards readable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: I91ea973bc27328cbbe8bcc1a9e432399da07a366
Chris Manton [Sat, 19 Dec 2020 19:13:12 +0000 (11:13 -0800)]
Move tACL_CB::tBTM_PM_MCB definition before tACL_CONN
Towards readable code
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: I544f44c343a15f8737d4da8c34444aa3b10c0291
Chris Manton [Sat, 19 Dec 2020 17:13:28 +0000 (09:13 -0800)]
Add stack/acl/btm_acl::acl_get_connection_from_handle
Towards encapsulation
Bug:
163134718
Tag: #refactor
Test: gd/cert/run --host
Change-Id: I9042c6b548c98c038dea817d51a6bd9c891ae758
Zach Johnson [Sat, 19 Dec 2020 19:38:01 +0000 (19:38 +0000)]
Merge changes I1d3569da,Ic6d95ccc,I999c43fd,Ie68b9124,I91e6a21f, ...
* changes:
rusty-gd: more controller
rusty-gd: controller supported commands & le buffer sizes
rusty-gd: A bit more controller
rusty-gd: add intos for builders, so we can skip the formal build call
rusty-gd: start controller module
rusty-gd: simplify queued & pending commands
rusty-gd: make scalar getters return by copy rather than ref
rusty-gd: drastically simplify command sending
rusty-gd: improve ergonomics of sending commands a bit
Zach Johnson [Sat, 19 Dec 2020 02:45:57 +0000 (02:45 +0000)]
Merge changes Iaca9bcda,I3094c7a6,I5d79687e
* changes:
rusty-gd: send reset command when HCI starts
rusty-gd: no more sleep
rusty-gd: protect protected events in hci
Zach Johnson [Sat, 19 Dec 2020 02:44:10 +0000 (02:44 +0000)]
Merge changes I6a0f12b6,I40942038,I4ce65e27
* changes:
rusty-gd: only allow one registration for an event, allow unregistering
rusty-gd: drop events dropped by cpp-gd
rusty-gd: implement le meta events
Zach Johnson [Fri, 18 Dec 2020 21:47:07 +0000 (21:47 +0000)]
Merge changes Ie08faff0,I0356c210,Ie591460e,I51b88fc9
* changes:
rusty-gd: update command sending to match cpp-gd
rusty-gd: simplify hci a little bit
rusty-gd: simplify some packet usages
rusty-gd: improve ergonomics of converting packets to vectors
Zach Johnson [Mon, 14 Dec 2020 04:55:11 +0000 (20:55 -0800)]
rusty-gd: more controller
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: I1d3569dadac6411be16c1cf94f3ce6c031846920
Zach Johnson [Mon, 14 Dec 2020 03:54:51 +0000 (19:54 -0800)]
rusty-gd: controller supported commands & le buffer sizes
also, generate TryFrom for OpCodeIndex from OpCode, to remove 700+ lines
of repeated code in C++ gd controller
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: Ic6d95ccc87a0ccc64636f16b0ef379c1f0d2f069
Zach Johnson [Mon, 14 Dec 2020 01:14:27 +0000 (17:14 -0800)]
rusty-gd: A bit more controller
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: I999c43fdbb5bcbcbb005dece73192ec2300138d0
Zach Johnson [Sun, 13 Dec 2020 11:22:22 +0000 (03:22 -0800)]
rusty-gd: add intos for builders, so we can skip the formal build call
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: Ie68b9124b0d6f7b4c52ce882a6966995088d17f6
Zach Johnson [Sun, 13 Dec 2020 11:09:15 +0000 (03:09 -0800)]
rusty-gd: start controller module
only a few calls to start, more to come
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: I91e6a21f4d15e67c5ad7b917cd31d419bf86ebe9
Zach Johnson [Sun, 13 Dec 2020 10:31:53 +0000 (02:31 -0800)]
rusty-gd: simplify queued & pending commands
since packets are just wrappers around Arcs, copies are somewhat cheap
so no need to keep a struct with just opcode anymore
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: I6294a728e07b2ee949ef96465b07678845f5115c
Zach Johnson [Sun, 13 Dec 2020 10:17:22 +0000 (02:17 -0800)]
rusty-gd: make scalar getters return by copy rather than ref
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: I1427e8cc8c252a1eddb68470b1df215cf53c628f
Zach Johnson [Sun, 13 Dec 2020 09:59:43 +0000 (01:59 -0800)]
rusty-gd: drastically simplify command sending
include a trait during generation that knows how to
convert the event responses to the correct matching type
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: Icf96ce20c0b2311e94e5198c1cc4038f78683771
Zach Johnson [Sun, 13 Dec 2020 08:18:03 +0000 (00:18 -0800)]
rusty-gd: send reset command when HCI starts
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: Iaca9bcda285ff4682532efeb43e2892adc487e9a
Zach Johnson [Sun, 13 Dec 2020 07:03:50 +0000 (23:03 -0800)]
rusty-gd: only allow one registration for an event, allow unregistering
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: I6a0f12b696a22f0653037e3530ccfb4e2f38d001
Zach Johnson [Sun, 13 Dec 2020 06:14:56 +0000 (22:14 -0800)]
rusty-gd: update command sending to match cpp-gd
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: Ie08faff009045ee329c7392652d632fed49f9d11
Zach Johnson [Sun, 13 Dec 2020 08:22:14 +0000 (00:22 -0800)]
rusty-gd: improve ergonomics of sending commands a bit
use generics to implicity call into
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: Ied9f2e4f544979f63554bd3276e092788e0f0706
Zach Johnson [Sun, 13 Dec 2020 07:51:13 +0000 (23:51 -0800)]
rusty-gd: no more sleep
since it's backed by a fd, a structure that encourages reuse is a good
thing.
integrate this into HCI, for command timeouts
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: I3094c7a666281cebdfdeee05246ac1ad557988c5
Zach Johnson [Sun, 13 Dec 2020 06:54:17 +0000 (22:54 -0800)]
rusty-gd: drop events dropped by cpp-gd
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: I40942038dea359a31f413f604dcc3c6db926f80e
Zach Johnson [Sun, 13 Dec 2020 05:38:53 +0000 (21:38 -0800)]
rusty-gd: simplify hci a little bit
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: I0356c2102cf760c091a92ae0ab8ee7917eea03b6
Zach Johnson [Sun, 13 Dec 2020 07:16:12 +0000 (23:16 -0800)]
rusty-gd: protect protected events in hci
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: I5d79687eb4d464fb5942651f86945db31cfa62d3
Zach Johnson [Sun, 13 Dec 2020 06:45:46 +0000 (22:45 -0800)]
rusty-gd: implement le meta events
and oh hey, pattern matching is pretty freaking great
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: I4ce65e275ffe0e16161260e854d02987d166e4ca
Zach Johnson [Sun, 13 Dec 2020 05:13:52 +0000 (21:13 -0800)]
rusty-gd: simplify some packet usages
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: Ie591460ed642a46215cfe8b0ddefcb509f21db89
Zach Johnson [Sun, 13 Dec 2020 05:02:59 +0000 (21:02 -0800)]
rusty-gd: improve ergonomics of converting packets to vectors
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: I51b88fc9513475ab0e25b41ce5bb40b7934e9692
Zach Johnson [Fri, 18 Dec 2020 01:31:42 +0000 (01:31 +0000)]
Merge "rusty-gd: integrate rusty packets into existing code"
Treehugger Robot [Thu, 17 Dec 2020 20:37:07 +0000 (20:37 +0000)]
Merge changes I65399f4e,Iad27b185,Ia43609b6,I78a06be7,I8e518f2b, ...
* changes:
Properly retrieve acl_conn stack/acl/btm_acl::btm_pm_proc_mode_change
Re-log stack/acl/btm_pm::BTM_SetPowerMode
Re-log bta/dm/bta_dm_pm::bta_dm_pm_cback
Introduce bluetooth::legacy::hci::Interface
gd_acl: Add bluetooth::shim::ACL_Disconnect
gd_acl: Add shim disconnect
gd_acl: Add main/shim/helpers::ToDisconnectReasonFromLegacy
Remove unnecessary stack/acl/btm_acl::l2c_link_hci_conn_comp
Add stack/btm/btm_main::BTM_LogHistory
Properly retrieve acl_conn stack/acl/btm_acl::btm_acl_encrypt_change
Properly retrieve acl_conn stack/acl/btm_acl::btm_acl_process_sca_cmpl_pkt
Properly retrieve acl_conn stack/acl/btm_acl::btm_read_failed_contact_counter_complete
Properly retrieve acl_conn stack/acl/btm_acl::btm_read_link_quality_complete
Properly retrieve acl_conn stack/acl/btm_acl::btm_read_remote_ext_features_failed
gd_acl: Add sniff_subrating to dumpsys
Add stack/acl/btm_pm::StackAclBtmPm::btm_pm_get_power_manager_from_handle
Add stack/acl/btm_acl::acl_disconnect_from_handle
Add stack/acl/btm_acl::hci_btsnd_hcic_disconnect
Add tBTA_DM_SSR_SPEC.name[] field for sniff subrating options
Add bta/dm/bta_dm_int::device_info_text
Zach Johnson [Sun, 13 Dec 2020 04:11:26 +0000 (20:11 -0800)]
rusty-gd: integrate rusty packets into existing code
still gotta wait for parsing to land for this to officially work, but
this allows us to play with the ergonomics independently based on what
compiles..
next CLs will start to improve the ergos.
some ergos improved this CL.
Bug:
171749953
Tag: #gd-refactor
Test: gd/cert/run --rhost SimpleHalTest
Change-Id: I5eadd7619c5d392c2dd03331c5d604d9a52a1687
Myles Watson [Thu, 17 Dec 2020 19:00:07 +0000 (11:00 -0800)]
HCI: Add support for synchronous commands
Bug:
175844355
Tag: #gd-refactor
Test: make
Change-Id: I7a22a399cb175e6702b2c14df4c8f35def8835cf