OSDN Git Service

android-x86/system-bt.git
3 years agoread_automatic_flush_timeout is not used
Hansong Zhang [Sun, 17 Jan 2021 21:59:24 +0000 (13:59 -0800)]
read_automatic_flush_timeout is not used

Unused result.

Test: cert/run
Tag: #gd-refactor
Bug: 141555841
Change-Id: Ib0de4f22fcffadf5054a72ed3555965682c9633b

3 years agoAlways disconnect ACL by handle
Hansong Zhang [Sun, 17 Jan 2021 21:22:51 +0000 (13:22 -0800)]
Always disconnect ACL by handle

Test: cert/run
Tag: #gd-refactor
Bug: 141555841
Change-Id: Ib106ff802eccdcde09f9c9a19ef595ddfab1ace2

3 years agoSet ACL disconnect reason in ACL, not L2cap
Hansong Zhang [Sun, 17 Jan 2021 21:08:56 +0000 (13:08 -0800)]
Set ACL disconnect reason in ACL, not L2cap

And combine two identical functions

Test: cert/run
Tag: #gd-refactor
Bug: 141555841
Change-Id: Idb883bebc85df8b68270de5f650e2bc7fffcc69e

3 years agosco_disc_reason is unused
Hansong Zhang [Sun, 17 Jan 2021 21:04:28 +0000 (13:04 -0800)]
sco_disc_reason is unused

Test: cert/run
Tag: #gd-refactor
Bug: 141555841
Change-Id: Ib2417fa61c7a661f4b385f92645868cae270e62d

3 years agoMake link supervision timeout as a constant
Hansong Zhang [Sun, 17 Jan 2021 20:50:32 +0000 (12:50 -0800)]
Make link supervision timeout as a constant

It's always 5 seconds.

Test: cert/run
Tag: #gd-refactor
Bug: 141555841
Change-Id: I98326987479e03e71e64d0748aa0e6b15951f12b

3 years agoMove BTM_SetLinkSuperTout from L2cap to ACL
Hansong Zhang [Sun, 17 Jan 2021 20:38:33 +0000 (12:38 -0800)]
Move BTM_SetLinkSuperTout from L2cap to ACL

It's link related.

Test: cert/run
Tag: #gd-refactor
Bug: 141555841
Change-Id: Iad0f15e4915f0c98d9a0fecb342cf97cfd621bcf

3 years agoSimplify get role API
Hansong Zhang [Sun, 17 Jan 2021 20:30:02 +0000 (12:30 -0800)]
Simplify get role API

Just use BTM_GetRole()

Test: cert/run
Tag: #gd-refactor
Bug: 141555841
Change-Id: Ic90c23afe6512ee45acefdc9d04fca47ad5c550b

3 years agoMerge "GD Controller: Add status packet for LE_READ_REMOTE_FEATURES"
Jack He [Wed, 20 Jan 2021 19:02:28 +0000 (19:02 +0000)]
Merge "GD Controller: Add status packet for LE_READ_REMOTE_FEATURES"

3 years agoMerge changes from topic "gd_l2cap_init_security"
Treehugger Robot [Wed, 20 Jan 2021 19:00:54 +0000 (19:00 +0000)]
Merge changes from topic "gd_l2cap_init_security"

* changes:
  Cert: Add InitiateConnectionForSecurity to PyL2cap
  Security: Fix pairing handler dispatching

3 years agoMerge changes I43b8a393,I576be190,Iedc4254e,I0420630f,Ic6aa1f96, ...
Treehugger Robot [Wed, 20 Jan 2021 18:05:48 +0000 (18:05 +0000)]
Merge changes I43b8a393,I576be190,Iedc4254e,I0420630f,Ic6aa1f96, ...

* changes:
  Add stack/include/btm_api_types::io_capabilities_text
  Add main/shim/helpers::ToHciRole
  Encapsulate tACL_CONN::role_switch
  Add API tACL_CONN::is_{disconnect/role_switch}_pending
  HACK: Remove SCO disconnect short circuit
  Streamline btif/src/btif_hf::HeadsetInterface::PhoneStateChange
  btm_history: BTM_CreateSco call connecting
  Add stack/btm/btm_sco::GetLegacyHciInterface

3 years agoMerge changes from topic "gd: Pass address of scan result by value"
Treehugger Robot [Wed, 20 Jan 2021 18:05:32 +0000 (18:05 +0000)]
Merge changes from topic "gd: Pass address of scan result by value"

* changes:
  gd: Pass address of scan result by value
  gd: Implement Advertising Packet Content Filter

3 years agoAdd stack/include/btm_api_types::io_capabilities_text
Chris Manton [Fri, 6 Nov 2020 17:09:01 +0000 (09:09 -0800)]
Add stack/include/btm_api_types::io_capabilities_text

Towards loggable code

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

Change-Id: I43b8a393929b9d6da042e991c08a9bfac22c557a

3 years agoAdd main/shim/helpers::ToHciRole
Chris Manton [Thu, 31 Dec 2020 00:19:12 +0000 (16:19 -0800)]
Add main/shim/helpers::ToHciRole

Towards shimmable code

Bug: 176960731
Tag: #refactor
Test: gd/cert/run

Change-Id: I576be1908b70116b9aeeaa56c0e1601480ccbcb2

3 years agoEncapsulate tACL_CONN::role_switch
Chris Manton [Sun, 17 Jan 2021 17:11:41 +0000 (09:11 -0800)]
Encapsulate tACL_CONN::role_switch

Towards encapsulated code

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

Change-Id: Iedc4254e3c8085257c906a5a78754fc366747c44

3 years agoAdd API tACL_CONN::is_{disconnect/role_switch}_pending
Chris Manton [Sun, 17 Jan 2021 17:00:18 +0000 (09:00 -0800)]
Add API tACL_CONN::is_{disconnect/role_switch}_pending

Towards encapsulated code

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

Change-Id: I0420630f45bb16719e669c9f75f929ba46c88c2e

3 years agoHACK: Remove SCO disconnect short circuit
Chris Manton [Sun, 17 Jan 2021 16:58:31 +0000 (08:58 -0800)]
HACK: Remove SCO disconnect short circuit

Bug: 177382279
Tag: #refactor
Test: gd/cert/run

Change-Id: Ic6aa1f96f7f5dafa9287fa4be6f6d4966a9c5e80

3 years agoStreamline btif/src/btif_hf::HeadsetInterface::PhoneStateChange
Chris Manton [Sun, 17 Jan 2021 06:08:32 +0000 (22:08 -0800)]
Streamline btif/src/btif_hf::HeadsetInterface::PhoneStateChange

Towards loggable code

Bug: 177382279
Tag: #refactor
Test: gd/cert/run

Change-Id: I50275f6532c11b8d0212633908483de0d2bc5707

3 years agobtm_history: BTM_CreateSco call connecting
Chris Manton [Sun, 17 Jan 2021 17:51:23 +0000 (09:51 -0800)]
btm_history: BTM_CreateSco call connecting

Towards loggable code

Bug: 177382279
Tag: #refactor
Test: gd/cert/run

Change-Id: I81b64cdcb790a06a57ba792c05d9eac66be2a78e

3 years agoAdd stack/btm/btm_sco::GetLegacyHciInterface
Chris Manton [Sun, 17 Jan 2021 17:51:11 +0000 (09:51 -0800)]
Add stack/btm/btm_sco::GetLegacyHciInterface

Issue hci disconnect in stack/btm/btm_sco::BTM_RemoveSco

No need to bother the acl layer since it knows nothing
about it anyway.

Bug: 177382279
Tag: #refactor
Test: gd/cert/run

Change-Id: I8704754d0a8737b183e3e5e3892604b209b0aefa

3 years agogd: Pass address of scan result by value
Chienyuan [Wed, 20 Jan 2021 07:40:16 +0000 (15:40 +0800)]
gd: Pass address of scan result by value

Tag: #gd-refactor
Bug: 177044452
Test: gd/cert/run --host
Test: run CTS test
Change-Id: I0409629991894e1a7a94243d82e005a64b59af01

3 years agoConnect main/shim/acl_legacy_interface::btm_sco_on_disconnected
Chris Manton [Sat, 16 Jan 2021 17:33:12 +0000 (09:33 -0800)]
Connect main/shim/acl_legacy_interface::btm_sco_on_disconnected

Bug: 177382279
Tag: #refactor
Test: gd/cert/run

Change-Id: Ib1db9bc167cb467daa7468fa0b41ec7e54701b38

3 years agoDeclare stack/include/sco_hci_link_interface::btm_sco_on_disconnected
Chris Manton [Sat, 16 Jan 2021 17:33:02 +0000 (09:33 -0800)]
Declare stack/include/sco_hci_link_interface::btm_sco_on_disconnected

Bug: 177382279
Tag: #refactor
Test: gd/cert/run

Change-Id: Ia0f48733b76612d5a14b787491c557d706f4bdd3

3 years agoDe-anonymize stack/include/btm_api_types::tBTM_ESCO_DATA
Chris Manton [Sat, 16 Jan 2021 17:31:50 +0000 (09:31 -0800)]
De-anonymize stack/include/btm_api_types::tBTM_ESCO_DATA

Towards encapsulated code

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

Change-Id: I8b0d26cf0fd10ba0cf5c301c20dc4c03edd512f9

3 years agogd_shim: Use HACK_SetScoDisconnectCallback
Chris Manton [Sat, 16 Jan 2021 02:43:39 +0000 (18:43 -0800)]
gd_shim: Use HACK_SetScoDisconnectCallback

Bug: 177382279
Tag: #refactor
Test: gd/cert/run

Change-Id: I9b5bead73332603a4f9024a8cd5c015008a1102b

3 years agoAdd stack/btm/btm_sco::btm_sco_on_disconnected
Chris Manton [Sat, 16 Jan 2021 06:37:29 +0000 (22:37 -0800)]
Add stack/btm/btm_sco::btm_sco_on_disconnected

Bug: 177382279
Tag: #refactor
Test: gd/cert/run

Change-Id: I29b4a60bbab47a3415c96df7adea3a175bc19848

3 years agoAdd stack/btm/btm_sco::get_index
Chris Manton [Sat, 16 Jan 2021 06:37:23 +0000 (22:37 -0800)]
Add stack/btm/btm_sco::get_index

Towards encapsulated code

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

Change-Id: I7c78eefd86b16d501e629df6e8b61689eff864ce

3 years agoAdd tSCO_CB::get_sco_connection_from_handle
Chris Manton [Sat, 16 Jan 2021 06:12:43 +0000 (22:12 -0800)]
Add tSCO_CB::get_sco_connection_from_handle

Towards encapsulated code

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

Change-Id: I5ee023dbfca4777dbc4f3674efbe3354a97a2561

3 years agoAdd btm Register_HACK_SetScoDisconnectCallback
Chris Manton [Sat, 16 Jan 2021 03:51:07 +0000 (19:51 -0800)]
Add btm Register_HACK_SetScoDisconnectCallback

Towards meaningful code

Bug: 177382279
Tag: #refactor
Test: gd/cert/run

Change-Id: Idd77f86c803825faf5233e768a68c72baee8cdff

3 years agoAdd API tSCO_CONN::is_active,Handle
Chris Manton [Sat, 16 Jan 2021 00:57:55 +0000 (16:57 -0800)]
Add API tSCO_CONN::is_active,Handle

Towards encapsulated code

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

Change-Id: I4f99dd54ad056fbb4ef636779cc0d661890c622c

3 years agoAdd tSCO_CONN::get_sco_connection_from_index
Chris Manton [Sat, 16 Jan 2021 00:52:36 +0000 (16:52 -0800)]
Add tSCO_CONN::get_sco_connection_from_index

Towards encapsulated code

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

Change-Id: I39a87cb83e6e0572b407f1fccc5a11b11e96ee0e

3 years agoUse SCO stack/btm/btm_sco::BTM_LogHistory
Chris Manton [Mon, 21 Dec 2020 18:46:35 +0000 (10:46 -0800)]
Use SCO stack/btm/btm_sco::BTM_LogHistory

Towards loggable code

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

Change-Id: Iede79a345994d2249a3532b2cd790b66f07ef0b5

3 years agoUse main/shim/dumpsys::PRIVATE_CELL
Chris Manton [Fri, 15 Jan 2021 06:40:15 +0000 (22:40 -0800)]
Use main/shim/dumpsys::PRIVATE_CELL

Towards loggable code

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

Change-Id: I89f8a2b8433dfd3236cdac8e957fd6dd05b60b34

3 years agoAdd main/shim/dumpsys::PRIVATE_CELL
Chris Manton [Fri, 15 Jan 2021 06:40:00 +0000 (22:40 -0800)]
Add main/shim/dumpsys::PRIVATE_CELL

Towards loggable code

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

Change-Id: I2cf0c872880e8a0cf8bfd5c598852badd29884ce

3 years agoRe-log btif/src/btif_gatt_util::btif_gatt_check_encrypted_link
Chris Manton [Fri, 15 Jan 2021 05:36:22 +0000 (21:36 -0800)]
Re-log btif/src/btif_gatt_util::btif_gatt_check_encrypted_link

Towards loggable code

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

Change-Id: I86b8c7ebd1ce531711d3bff6752800fe2e714ddb

3 years agoAdd APIs stack/btm/security_device_record::
Chris Manton [Thu, 14 Jan 2021 22:04:09 +0000 (14:04 -0800)]
Add APIs stack/btm/security_device_record::

get_br_edr_hci_handle,Handle

Towards encapsulated code

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

Change-Id: I820541c1f2fc86202710b7ef1bb5756ca9427851

3 years agoRemove unnecessary stack/acl/btm_acl::btm_pm_is_le_link
Chris Manton [Sun, 10 Jan 2021 18:45:58 +0000 (10:45 -0800)]
Remove unnecessary stack/acl/btm_acl::btm_pm_is_le_link

Towards meaningful code

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

Change-Id: Ic5569a10bad4de55ccba1821e0433ef053b033ad

3 years agoUnfriend stack/acl/acl::tACL_CB
Chris Manton [Tue, 22 Dec 2020 00:43:12 +0000 (16:43 -0800)]
Unfriend stack/acl/acl::tACL_CB

Towards meaningful code

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

3 years agoRemove unused stack/include/acl_api_types::tBTM_QOS_SETUP_CMPL
Chris Manton [Fri, 1 Jan 2021 17:24:02 +0000 (09:24 -0800)]
Remove unused stack/include/acl_api_types::tBTM_QOS_SETUP_CMPL

Towards meaningful code

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

Change-Id: I7508663f27daf10d965ff4681846234ffad6cd6b

3 years agoRemove unused stack/include/acl_api_types::tBTM_INQ_TXPWR_RESULT
Chris Manton [Fri, 1 Jan 2021 17:09:52 +0000 (09:09 -0800)]
Remove unused stack/include/acl_api_types::tBTM_INQ_TXPWR_RESULT

Towards meaningful code

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

Change-Id: I0ae500ee283d1e5c46632bf940f8b547bdafbb13

3 years agoRe-log stack/avct/avct_lcb_act::avct_lcb_chk_disc
Chris Manton [Thu, 3 Dec 2020 17:53:53 +0000 (09:53 -0800)]
Re-log stack/avct/avct_lcb_act::avct_lcb_chk_disc

Towards encapsulated code

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

Change-Id: Id9bf35ae2128758ea7b6fc8842c9a60b1cafaf5e

3 years agoRemove unnecessary external tBTM_CB::Inits
Chris Manton [Sun, 17 Jan 2021 19:13:12 +0000 (11:13 -0800)]
Remove unnecessary external tBTM_CB::Inits

Towards encapsulation

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

Change-Id: I22a8a48535e6059fe6e6610d4430635eaf545416

3 years agoPull various Inits into parent tBTM_CB::Init structure
Chris Manton [Sun, 17 Jan 2021 19:12:08 +0000 (11:12 -0800)]
Pull various Inits into parent tBTM_CB::Init structure

Towards encapsulation

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

Change-Id: I7be4efb156e1f84904f69b38763f6527e9764f23

3 years agoRemove stack/btm/btm_int.h
Chris Manton [Sun, 10 Jan 2021 03:25:44 +0000 (19:25 -0800)]
Remove stack/btm/btm_int.h

Towards meaningful code

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

Change-Id: Ie392fb94d7c2c49e51e6c6256aea628ae6eab5ec

3 years agoUse get_btm_client_interface().peer.BTM_GetMaxPacketSize
Chris Manton [Sat, 9 Jan 2021 23:03:07 +0000 (15:03 -0800)]
Use get_btm_client_interface().peer.BTM_GetMaxPacketSize

Towards encapsulated code

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

Change-Id: I1103dd86d508fc4cf937afd4a2338586528acde1

3 years agoUse btm_cb.devcb.Init
Chris Manton [Sun, 10 Jan 2021 02:20:32 +0000 (18:20 -0800)]
Use btm_cb.devcb.Init

Towards encapsulated code

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

Change-Id: Ic8fa0c8888e0252edd8081d547ae6189610f9926

3 years agoRemove unused fields tBTM_CFG::
Chris Manton [Sat, 9 Jan 2021 23:13:55 +0000 (15:13 -0800)]
Remove unused fields tBTM_CFG::

Towards meaningful code

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

Change-Id: I949f26268baabe191ab2e09c4e67e8ec20de10ce

3 years agoInternalize btm_acl_device_down::BTM_db_reset
Chris Manton [Sat, 9 Jan 2021 23:00:05 +0000 (15:00 -0800)]
Internalize btm_acl_device_down::BTM_db_reset

Towards encapsulated code

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

Change-Id: I4ac186ac095ee1402d8ac60b5a7a7a142fc02bdc

3 years agoAdd tBTM_INQUIRY_VAR_ST::Init/Free
Chris Manton [Sat, 9 Jan 2021 22:52:40 +0000 (14:52 -0800)]
Add tBTM_INQUIRY_VAR_ST::Init/Free

Towards encapsulated code

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

Change-Id: Ib11110dcd4e93f0b315441b322e06afbc082615e

3 years agoMove sco packet types to sco initialization
Chris Manton [Sat, 9 Jan 2021 22:40:56 +0000 (14:40 -0800)]
Move sco packet types to sco initialization

Towards encapsulated code

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

Change-Id: Ief025f785d33f281768b23f7d4ea8b98f961f573

3 years agogd: Implement Advertising Packet Content Filter
Chienyuan [Sun, 17 Jan 2021 15:38:07 +0000 (23:38 +0800)]
gd: Implement Advertising Packet Content Filter

Tag: #gd-refactor
Bug: 177044452
Test: gd/cert/run --host
Test: run SL4A test, FilteringTest and UniqueFilteringTest
Change-Id: Ifb63c56f6e473d6bc43e46970937dc6873fd0a5c

3 years agoAdd boilerplate code for 5.2 COC
Hansong Zhang [Tue, 19 Jan 2021 22:55:06 +0000 (14:55 -0800)]
Add boilerplate code for 5.2 COC

Test: cert/run
Tag: #gd-refactor
Bug: 141555841
Change-Id: Ia684f65765fdfa134657e2e2ee5640fa1813b708

3 years agoMerge changes Ia3f3c5d7,If3aaeccc,I74915b3a,I49b167a3,Iab536745
Treehugger Robot [Wed, 20 Jan 2021 05:55:12 +0000 (05:55 +0000)]
Merge changes Ia3f3c5d7,If3aaeccc,I74915b3a,I49b167a3,Iab536745

* changes:
  Include rfcdefs and add btm_client_interface
  Add tBTM_DEVCB::Init/Free
  Add tSCO_CB::Init
  Remove useless global level of indirection
  Add and Use stack//btm_acl::internal::set_default_packet_types_supported

3 years agoMerge changes I5a31f506,If496d946
Treehugger Robot [Wed, 20 Jan 2021 03:09:40 +0000 (03:09 +0000)]
Merge changes I5a31f506,If496d946

* changes:
  Consolidate assignment btm_cb.acl_cb_.btm_acl_pkt_types_supported
  Add param BTM_acl_after_controller_started::controller_t

3 years agoMerge changes I3a54a514,Iada70c9f,I1fb728ce,I181f0d77,I1df3c852, ...
Zach Johnson [Wed, 20 Jan 2021 03:00:52 +0000 (03:00 +0000)]
Merge changes I3a54a514,Iada70c9f,I1fb728ce,I181f0d77,I1df3c852, ...

* changes:
  rusty-gd: migrate classic acl to a directory, in prep for facade
  rusty-gd: some tidying in acl
  rusty-gd: add authentication complete for classic acl
  rusty-gd: implement connection request for classic ACL
  rusty-gd: wire through classic ACL API for disconnect
  rusty-gd: expose core byte rx/tx for classic ACL
  rusty-gd: move acl core from lib.rs to core.rs
  rusty-gd: implement connection complete for classic acl
  rusty-gd: simplify acl internal requests by using structured enums
  rusty-gd: start classic acl manager
  rusty-gd: report acl disconnections
  rusty-gd: implement ACL connection close
  rusty-gd: add ACL credit control
  rusty-gd: implement outbound fragmentation & dispatch
  rusty-gd: add packet reassembler
  rusty-gd: implement vector payloads for packets
  rusty-gd: start ACL - simple dispatch of inbound traffic

3 years agoInclude rfcdefs and add btm_client_interface
Chris Manton [Sun, 17 Jan 2021 22:16:01 +0000 (14:16 -0800)]
Include rfcdefs and add btm_client_interface

Towards including what you use

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

3 years agoConsolidate assignment btm_cb.acl_cb_.btm_acl_pkt_types_supported
Chris Manton [Sat, 9 Jan 2021 22:11:24 +0000 (14:11 -0800)]
Consolidate assignment btm_cb.acl_cb_.btm_acl_pkt_types_supported

Towards encapsulated code

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

3 years agoAdd tBTM_DEVCB::Init/Free
Chris Manton [Sat, 9 Jan 2021 22:40:37 +0000 (14:40 -0800)]
Add tBTM_DEVCB::Init/Free

Towards encapsulated code

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

Change-Id: If3aaeccc0ea876d9d9f5ca87893035cb222b789e

3 years agoAdd param BTM_acl_after_controller_started::controller_t
Chris Manton [Sat, 9 Jan 2021 21:32:06 +0000 (13:32 -0800)]
Add param BTM_acl_after_controller_started::controller_t

Towards injectable code

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

3 years agoAdd tSCO_CB::Init
Chris Manton [Sat, 9 Jan 2021 22:32:08 +0000 (14:32 -0800)]
Add tSCO_CB::Init

Towards encapsulated code

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

Change-Id: I74915b3a39423483206297df7e04a6572fd5ba51

3 years agoRemove useless global level of indirection
Chris Manton [Sat, 9 Jan 2021 22:29:00 +0000 (14:29 -0800)]
Remove useless global level of indirection

Towards encapsulated code

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

Change-Id: I49b167a33a7733d5abf3a290a45f63e801b7401d

3 years agoAdd and Use stack//btm_acl::internal::set_default_packet_types_supported
Chris Manton [Sat, 9 Jan 2021 22:14:52 +0000 (14:14 -0800)]
Add and Use stack//btm_acl::internal::set_default_packet_types_supported

Towards encapsulated code

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

3 years agoMerge "gd: Update random address when command success"
Treehugger Robot [Wed, 20 Jan 2021 02:45:05 +0000 (02:45 +0000)]
Merge "gd: Update random address when command success"

3 years agoMerge changes Icba988d3,Ia8874c80,I36da3481,Ica4914f5
Treehugger Robot [Wed, 20 Jan 2021 02:39:09 +0000 (02:39 +0000)]
Merge changes Icba988d3,Ia8874c80,I36da3481,Ica4914f5

* changes:
  Add test SetSupervisorTimeoutOnConnectionSuccess
  Fully encapsulate tBTM_SEC_DEV_REC::is_originator
  Use tBTM_SEC_DEV_REC::IsLocallyInitiated
  Add API tBTM_SEC_DEV_REC::IsLocallyInitiated

3 years agoMerge "gd: Handle scan parameter"
Treehugger Robot [Wed, 20 Jan 2021 01:44:29 +0000 (01:44 +0000)]
Merge "gd: Handle scan parameter"

3 years agoMerge "gd: Fix bug of AdvertisingCache"
Treehugger Robot [Wed, 20 Jan 2021 01:35:30 +0000 (01:35 +0000)]
Merge "gd: Fix bug of AdvertisingCache"

3 years agorusty-gd: migrate classic acl to a directory, in prep for facade
Zach Johnson [Thu, 31 Dec 2020 18:27:14 +0000 (10:27 -0800)]
rusty-gd: migrate classic acl to a directory, in prep for facade

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

3 years agorusty-gd: some tidying in acl
Zach Johnson [Thu, 31 Dec 2020 03:06:18 +0000 (19:06 -0800)]
rusty-gd: some tidying in acl

use short variable names where the usage context is so small it's self
explanatory (a little more go-like)

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

3 years agorusty-gd: add authentication complete for classic acl
Zach Johnson [Thu, 31 Dec 2020 01:42:24 +0000 (17:42 -0800)]
rusty-gd: add authentication complete for classic acl

also, use common event packet-for-connection forwarnding mechanism
between core and classic

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

3 years agorusty-gd: implement connection request for classic ACL
Zach Johnson [Thu, 31 Dec 2020 01:14:15 +0000 (17:14 -0800)]
rusty-gd: implement connection request for classic ACL

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

3 years agorusty-gd: wire through classic ACL API for disconnect
Zach Johnson [Thu, 31 Dec 2020 01:00:04 +0000 (17:00 -0800)]
rusty-gd: wire through classic ACL API for disconnect

also, since we are unregistering implicitly upon disconnect, no need to
expose that in the core

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

3 years agorusty-gd: expose core byte rx/tx for classic ACL
Zach Johnson [Thu, 31 Dec 2020 00:00:04 +0000 (16:00 -0800)]
rusty-gd: expose core byte rx/tx for classic ACL

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

3 years agorusty-gd: move acl core from lib.rs to core.rs
Zach Johnson [Wed, 30 Dec 2020 22:48:28 +0000 (14:48 -0800)]
rusty-gd: move acl core from lib.rs to core.rs

this allows internals to stay internal

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

3 years agorusty-gd: implement connection complete for classic acl
Zach Johnson [Wed, 30 Dec 2020 22:40:07 +0000 (14:40 -0800)]
rusty-gd: implement connection complete for classic acl

still not hooked up into the core dispatch yet, coming soon

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

3 years agorusty-gd: simplify acl internal requests by using structured enums
Zach Johnson [Wed, 30 Dec 2020 18:52:11 +0000 (10:52 -0800)]
rusty-gd: simplify acl internal requests by using structured enums

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

3 years agorusty-gd: start classic acl manager
Zach Johnson [Wed, 30 Dec 2020 18:44:31 +0000 (10:44 -0800)]
rusty-gd: start classic acl manager

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

3 years agorusty-gd: report acl disconnections
Zach Johnson [Wed, 30 Dec 2020 03:25:46 +0000 (19:25 -0800)]
rusty-gd: report acl disconnections

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

3 years agorusty-gd: implement ACL connection close
Zach Johnson [Wed, 30 Dec 2020 02:07:52 +0000 (18:07 -0800)]
rusty-gd: implement ACL connection close

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

3 years agorusty-gd: add ACL credit control
Zach Johnson [Wed, 30 Dec 2020 01:36:58 +0000 (17:36 -0800)]
rusty-gd: add ACL credit control

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

3 years agorusty-gd: implement outbound fragmentation & dispatch
Zach Johnson [Tue, 29 Dec 2020 21:55:12 +0000 (13:55 -0800)]
rusty-gd: implement outbound fragmentation & dispatch

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

3 years agorusty-gd: add packet reassembler
Zach Johnson [Mon, 28 Dec 2020 22:52:36 +0000 (14:52 -0800)]
rusty-gd: add packet reassembler

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

3 years agorusty-gd: implement vector payloads for packets
Zach Johnson [Mon, 28 Dec 2020 20:50:45 +0000 (12:50 -0800)]
rusty-gd: implement vector payloads for packets

this way, we can get the contents to pass to higher layers from ACL, etc

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

3 years agorusty-gd: start ACL - simple dispatch of inbound traffic
Zach Johnson [Mon, 28 Dec 2020 19:43:02 +0000 (11:43 -0800)]
rusty-gd: start ACL - simple dispatch of inbound traffic

does not do reassembly or anything like that yet

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

3 years agoGD Controller: Add status packet for LE_READ_REMOTE_FEATURES
Jack He [Tue, 19 Jan 2021 22:04:23 +0000 (14:04 -0800)]
GD Controller: Add status packet for LE_READ_REMOTE_FEATURES

* We should expect a command status event after sending LE_READ_REMOTE_FEATURES
  command

Fixes: 177791720
Bug: 177791720
Test: make
Tag: #gd-refactor
Change-Id: Ibff3c620699b06ff2d88016ed7f3f55f2ae334d7

3 years agoAdd test SetSupervisorTimeoutOnConnectionSuccess
Chris Manton [Mon, 11 Jan 2021 06:07:07 +0000 (22:07 -0800)]
Add test SetSupervisorTimeoutOnConnectionSuccess

Towards testable code

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

Change-Id: Icba988d39df5f3210b5e97e3da2dbbca98a12cd4

3 years agoRe-log stack/acl/btm_acl::btm_acl_created
Chris Manton [Mon, 11 Jan 2021 06:30:02 +0000 (22:30 -0800)]
Re-log stack/acl/btm_acl::btm_acl_created

Towards loggable code

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

Change-Id: I1e6ffe540d913839577c6a7969ddf2d073b83332

3 years agoFully encapsulate tBTM_SEC_DEV_REC::is_originator
Chris Manton [Mon, 11 Jan 2021 06:06:47 +0000 (22:06 -0800)]
Fully encapsulate tBTM_SEC_DEV_REC::is_originator

Towards encapsulated code

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

Change-Id: Ia8874c80ceedeb6e331dfbff48e3fc9ddee6cc87

3 years agoRe-log stack/btm/btm_sec::btm_sec_connected
Chris Manton [Mon, 11 Jan 2021 05:53:48 +0000 (21:53 -0800)]
Re-log stack/btm/btm_sec::btm_sec_connected

Towards loggable code

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

Change-Id: I0d613230cdc7a0701aa848effa129cc4b8c58b4b

3 years agoUse tBTM_SEC_DEV_REC::IsLocallyInitiated
Chris Manton [Mon, 11 Jan 2021 06:06:29 +0000 (22:06 -0800)]
Use tBTM_SEC_DEV_REC::IsLocallyInitiated

Towards encapsulated code

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

Change-Id: I36da3481eb54ce016df021fa6d24f3f82555ace8

3 years agoAdd API tBTM_SEC_DEV_REC::IsLocallyInitiated
Chris Manton [Mon, 11 Jan 2021 06:09:38 +0000 (22:09 -0800)]
Add API tBTM_SEC_DEV_REC::IsLocallyInitiated

Towards encapsulated code

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

Change-Id: Ica4914f5030667594f926892f6c7794d87bd6aee

3 years agoUse stack/acl/btm_acl::hci_btm_set_link_supervision_timeout
Chris Manton [Mon, 11 Jan 2021 06:51:33 +0000 (22:51 -0800)]
Use stack/acl/btm_acl::hci_btm_set_link_supervision_timeout

Towards readable code

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

Change-Id: I5fa26134ddd5485d940d7f18a7d26bbd27959a31

3 years agoAdd stack/acl/btm_acl::hci_btm_set_link_supervision_timeout
Chris Manton [Mon, 11 Jan 2021 03:37:13 +0000 (19:37 -0800)]
Add stack/acl/btm_acl::hci_btm_set_link_supervision_timeout

Towards modular and testable code

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

3 years agoTest stack/acl/btm_acl::on_acl_br_edr_{success,failed}
Chris Manton [Sun, 10 Jan 2021 23:39:36 +0000 (15:39 -0800)]
Test stack/acl/btm_acl::on_acl_br_edr_{success,failed}

Try not to re-converge divergent code paths

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working

Change-Id: Ic8a795369972bb38e5ab9bb51c9e735c382680e4

3 years agogd_shim_acl: Plumb stack/acl/btm_acl::on_acl_br_edr_{success,failed}
Chris Manton [Sun, 10 Jan 2021 23:31:15 +0000 (15:31 -0800)]
gd_shim_acl: Plumb stack/acl/btm_acl::on_acl_br_edr_{success,failed}

Try not to re-converge divergent code paths

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working

Change-Id: Ie78d6b8c8d4eca1a24175a07f4e775e92439ce1b

3 years agoUse stack/acl/btm_acl::on_acl_br_edr_{success,failed}
Chris Manton [Sun, 10 Jan 2021 22:51:01 +0000 (14:51 -0800)]
Use stack/acl/btm_acl::on_acl_br_edr_{success,failed}

Try not to re-converge divergent code paths

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working

Change-Id: I9f3abe06f0ee276af583fbcb715f198710f48fec

3 years agoAdd stack/acl/btm_acl::on_acl_br_edr_{success,failed}
Chris Manton [Sun, 10 Jan 2021 22:48:35 +0000 (14:48 -0800)]
Add stack/acl/btm_acl::on_acl_br_edr_{success,failed}

Try not to re-converge divergent code paths

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working

Change-Id: Ib11b50c696c162b9c0aea59c6d92ccf711619808

3 years agoDe-anonymize tBTM_SEC_DEV_REC
Chris Manton [Mon, 11 Jan 2021 05:51:40 +0000 (21:51 -0800)]
De-anonymize tBTM_SEC_DEV_REC

Towards readable code

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

3 years agoInternalize stack/acl/btm_acl::hci_start_role_switch_to_central
Chris Manton [Sun, 17 Jan 2021 17:17:24 +0000 (09:17 -0800)]
Internalize stack/acl/btm_acl::hci_start_role_switch_to_central

Towards encapsulated code

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

3 years agogd: Handle scan parameter
Chienyuan [Fri, 15 Jan 2021 09:23:40 +0000 (17:23 +0800)]
gd: Handle scan parameter

Tag: #gd-refactor
Bug: 177044452
Test: gd/cert/run
Change-Id: Icb9638b8f852350c36010df89d29a2dd224dc89d

3 years agoUse some L2cap APIs in btm_sec
Hansong Zhang [Sun, 17 Jan 2021 09:08:05 +0000 (01:08 -0800)]
Use some L2cap APIs in btm_sec

When we need to start encryption or handle encryption change, link must
be up and L2cap must be already connected.

Test: cert/run
Tag: #gd-refactor
Bug: 141555841
Change-Id: Ifd787141ac3669c377b54bf58f9b53776764d61f

3 years agoSimplify some L2cap code
Hansong Zhang [Sat, 16 Jan 2021 00:31:19 +0000 (16:31 -0800)]
Simplify some L2cap code

Test: cert/run
Tag: #gd-refactor
Bug: 141555841
Change-Id: I0e9f3164892f91231391e58f3b7a97bca9a47b7e