OSDN Git Service

android-x86/system-bt.git
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 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

3 years agogd_acl: Add and connect btm_pm_on_mode_change
Chris Manton [Mon, 7 Dec 2020 20:35:28 +0000 (12:35 -0800)]
gd_acl: Add and connect btm_pm_on_mode_change

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

Change-Id: I0f811caefcd6d0a50f3e19c17592a40d13256cd7

3 years agoAdd ToLegacyHciMode
Chris Manton [Thu, 10 Dec 2020 21:30:24 +0000 (13:30 -0800)]
Add ToLegacyHciMode

Towards loggable code

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

Change-Id: I6bdaf4b9d73fc95bb02518086bc89c1673a3d3cf

3 years agoUse strict return type HCI_SNIFF_SUB_RATE_SUPPORTED
Chris Manton [Wed, 9 Dec 2020 16:51:56 +0000 (08:51 -0800)]
Use strict return type HCI_SNIFF_SUB_RATE_SUPPORTED

Towards readable code

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

Change-Id: Ieaa3b111093e170d4cca3eab327878f43e92a89b

3 years agoAdd external declaration
Chris Manton [Sun, 13 Dec 2020 00:55:56 +0000 (16:55 -0800)]
Add external declaration

Fixes targets db845c-userdebug aosp_zebu

Test: Builds and compiles
Tag: #refactor
Bug: 175472744
Change-Id: Iee4815d68ca59b0b58d21adfc0b1de9922c67b89

3 years agoMerge "Security: New API; GetOutOfBandData"
Treehugger Robot [Sun, 13 Dec 2020 05:33:30 +0000 (05:33 +0000)]
Merge "Security: New API; GetOutOfBandData"

3 years agoMerge "rusty-gd: insert snoop logger on hal datapath"
Zach Johnson [Sun, 13 Dec 2020 04:17:24 +0000 (04:17 +0000)]
Merge "rusty-gd: insert snoop logger on hal datapath"

3 years agoUse properly typed tHCI_MODE
Chris Manton [Mon, 7 Dec 2020 21:52:48 +0000 (13:52 -0800)]
Use properly typed tHCI_MODE

Towards readable code

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

Change-Id: I7be7d39002e01da7777360d1467d99ea7287565c

3 years agoenum-ify stack/include/hcidefs::tHCI_MODE
Chris Manton [Mon, 7 Dec 2020 21:50:18 +0000 (13:50 -0800)]
enum-ify stack/include/hcidefs::tHCI_MODE

Towards readable code

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

Change-Id: Ia1b8e41a463b57fb8b76624f1739a5c47fbb0cfd

3 years agoenum-ify bta/av/bta_av_int::BTA_AV_ROLE_
Chris Manton [Wed, 9 Dec 2020 16:34:40 +0000 (08:34 -0800)]
enum-ify bta/av/bta_av_int::BTA_AV_ROLE_

Towards readable code

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

Change-Id: I8461819d100f547f367314fbe9162d5397c0e847

3 years agoRe-include bta/dm/bta_dm_act
Chris Manton [Wed, 9 Dec 2020 17:27:57 +0000 (09:27 -0800)]
Re-include bta/dm/bta_dm_act

Towards readable code

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

Change-Id: Ib05009e6cca74c21adb93c28fdb6d6d9f73c2507

3 years agogd_acl: Return errorcode upon connection fail
Chris Manton [Mon, 7 Dec 2020 03:33:49 +0000 (19:33 -0800)]
gd_acl: Return errorcode upon connection fail

Test: classic connections on live system
Bug: 173755948
Bug: 173986615
Tag: #refactor

Change-Id: I06697aae0c0dee1df119d535c77b2f56106faddf

3 years agogd_shim: Skip legacy dumpsys if no registrants
Chris Manton [Sun, 6 Dec 2020 17:23:18 +0000 (09:23 -0800)]
gd_shim: Skip legacy dumpsys if no registrants

Test: dumpsys on live system
Bug: 173755948
Tag: #refactor

Change-Id: I658e091c7f4fcd3977baea7534b8bc6d33a736cb

3 years agobtm: Specify supervision timeout in human readable units
Chris Manton [Sat, 5 Dec 2020 19:44:43 +0000 (11:44 -0800)]
btm: Specify supervision timeout in human readable units

Toward loggable code

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

Change-Id: Ib703546fb8e4e01584961d8a4beb4ab82d13ceb6

3 years agoAdd stack/acl/btm_acl::IsEprAvailable
Chris Manton [Sat, 5 Dec 2020 19:45:13 +0000 (11:45 -0800)]
Add stack/acl/btm_acl::IsEprAvailable

Towards readable code

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

Change-Id: I96ca5c527a46e4e862668aa981822961c4de5b29

3 years agogd: ISO manager boilerplate
Jakub Pawlowski [Wed, 9 Dec 2020 16:46:01 +0000 (17:46 +0100)]
gd: ISO manager boilerplate

Bug: 150670922
Tag: #gd-refactor
Test: PTS tests will be added in upcoming patches
Change-Id: I01ff1091e17c40aebfcf3a0b1f977479574d8f24

3 years agoMerge changes I7393adfc,Ibbce98d9,I6afb1930
Zach Johnson [Sat, 12 Dec 2020 04:56:35 +0000 (04:56 +0000)]
Merge changes I7393adfc,Ibbce98d9,I6afb1930

* changes:
  rusty-gd: reorganize HAL a bit
  rusty-gd: Add btsnoop config
  rusty-gd: add sysprop ffi for android

3 years agoMerge changes I54ab2506,I64ac8a87,I37b7d946,I6e152469
Treehugger Robot [Fri, 11 Dec 2020 23:49:22 +0000 (23:49 +0000)]
Merge changes I54ab2506,I64ac8a87,I37b7d946,I6e152469

* changes:
  btm: Log role change events
  Clean up main/shim/acl:: connection logging
  Re-log stack/btm/btm_sec::btm_sec_connected
  Re-order stack/btm/btm_sec::btm_sec_connected

3 years agoMerge "rusty-gd: Fix offsets for scalar fields."
Zach Johnson [Fri, 11 Dec 2020 23:41:47 +0000 (23:41 +0000)]
Merge "rusty-gd: Fix offsets for scalar fields."

3 years agorusty-gd: insert snoop logger on hal datapath
Zach Johnson [Wed, 9 Dec 2020 22:10:06 +0000 (14:10 -0800)]
rusty-gd: insert snoop logger on hal datapath

does not yet do interesting logging

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

3 years agorusty-gd: reorganize HAL a bit
Zach Johnson [Wed, 9 Dec 2020 20:56:33 +0000 (12:56 -0800)]
rusty-gd: reorganize HAL a bit

remove mpsc:: prefixes, and hide internals so it's not exported as part
of the public api

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

3 years agorusty-gd: Add btsnoop config
Zach Johnson [Wed, 9 Dec 2020 20:11:52 +0000 (12:11 -0800)]
rusty-gd: Add btsnoop config

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

3 years agorusty-gd: add sysprop ffi for android
Zach Johnson [Wed, 9 Dec 2020 18:16:55 +0000 (10:16 -0800)]
rusty-gd: add sysprop ffi for android

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

3 years agoMerge changes Ia521f76e,I5e4b77c1
Zach Johnson [Fri, 11 Dec 2020 23:28:44 +0000 (23:28 +0000)]
Merge changes Ia521f76e,I5e4b77c1

* changes:
  rusty-gd: Allow paths and not just idents in submodules for GDDI
  rusty-gd: implement Stoppable for GDDI

3 years agoMerge "add rust defaults and turn off targets on mac"
Zach Johnson [Fri, 11 Dec 2020 23:11:34 +0000 (23:11 +0000)]
Merge "add rust defaults and turn off targets on mac"

3 years agobtm: Log role change events
Chris Manton [Sat, 5 Dec 2020 19:44:14 +0000 (11:44 -0800)]
btm: Log role change events

Toward loggable code

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

Change-Id: I54ab2506625b810bc61036430aa231602395d0b6

3 years agoClean up main/shim/acl:: connection logging
Chris Manton [Fri, 4 Dec 2020 16:43:09 +0000 (08:43 -0800)]
Clean up main/shim/acl:: connection logging

Toward loggable code

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

Change-Id: I64ac8a874cb3034df24990711e0155e63d4ef282

3 years agoRe-log stack/btm/btm_sec::btm_sec_connected
Chris Manton [Sat, 5 Dec 2020 17:57:03 +0000 (09:57 -0800)]
Re-log stack/btm/btm_sec::btm_sec_connected

Towards readable code

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

Change-Id: I37b7d9468fb7c328af69a37ec44bdb637eb1576c

3 years agoRe-order stack/btm/btm_sec::btm_sec_connected
Chris Manton [Sat, 5 Dec 2020 17:56:54 +0000 (09:56 -0800)]
Re-order stack/btm/btm_sec::btm_sec_connected

Towards readable code

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

Change-Id: I6e1524691e204aee43e1d46ba7b5aceff6f15ff9

3 years agoMerge changes Ife298e71,Ida5002ac
Treehugger Robot [Fri, 11 Dec 2020 21:41:40 +0000 (21:41 +0000)]
Merge changes Ife298e71,Ida5002ac

* changes:
  gd_acl: Diverge in stack/acl/btm_acl:: after connection
  Actively check tACL_CONN:: valid prior to feature use

3 years agoMerge changes I889bcc37,I5c801477,Ic77c6f95
Treehugger Robot [Fri, 11 Dec 2020 21:41:32 +0000 (21:41 +0000)]
Merge changes I889bcc37,I5c801477,Ic77c6f95

* changes:
  Use tACL_CONN:: le and lmp feature(s) upon valid
  Re-order stack/acl/btm_acl::btm_acl_created
  Add tACL_CONN:: le and lmp flags to condition feature validity

3 years agoadd rust defaults and turn off targets on mac
Zach Johnson [Fri, 11 Dec 2020 20:19:26 +0000 (12:19 -0800)]
add rust defaults and turn off targets on mac

Bug: 175349389
Test: compile
Change-Id: I115a5922945b6d06cf1f49ca9191665b2a45b627

3 years agoMerge "Cert: Run script additions"
Treehugger Robot [Fri, 11 Dec 2020 20:50:56 +0000 (20:50 +0000)]
Merge "Cert: Run script additions"

3 years agoSecurity: New API; GetOutOfBandData
Martin Brabham [Tue, 1 Dec 2020 18:56:15 +0000 (10:56 -0800)]
Security: New API; GetOutOfBandData

Add a new API to the SecurityManager.  This API
will allow for a caller to fetch OOB data from the
controller.

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

3 years agorusty-gd: Fix offsets for scalar fields.
Qasim Javed [Fri, 11 Dec 2020 19:14:49 +0000 (11:14 -0800)]
rusty-gd: Fix offsets for scalar fields.

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

Change-Id: I758f0a8397341ae0ec0f8356ab96e9c2ecea14ae

3 years agoMerge changes I6b64dc43,I499835b0
Zach Johnson [Fri, 11 Dec 2020 18:53:50 +0000 (18:53 +0000)]
Merge changes I6b64dc43,I499835b0

* changes:
  rusty-gd: start writing array fields in write_to()
  rusty-gd: add stubs for to_bytes and write_to

3 years agogd_acl: Diverge in stack/acl/btm_acl:: after connection
Chris Manton [Sat, 5 Dec 2020 17:56:19 +0000 (09:56 -0800)]
gd_acl: Diverge in stack/acl/btm_acl:: after connection

Low risk method to allow dual stack operation.

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

Change-Id: Ife298e7122bc5f7afab50b6555d417f699ec941a

3 years agoUse tACL_CONN:: le and lmp feature(s) upon valid
Chris Manton [Sat, 5 Dec 2020 17:55:36 +0000 (09:55 -0800)]
Use tACL_CONN:: le and lmp feature(s) upon valid

Towards synchronized code

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

Change-Id: I889bcc37c2acce5503e60bf1a842778f8527a8da

3 years agoActively check tACL_CONN:: valid prior to feature use
Chris Manton [Sat, 5 Dec 2020 17:56:02 +0000 (09:56 -0800)]
Actively check tACL_CONN:: valid prior to feature use

Towards synchronized code

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

Change-Id: Ida5002acb90d3cf3290e332191b23dabcc882b58

3 years agoRe-order stack/acl/btm_acl::btm_acl_created
Chris Manton [Sat, 5 Dec 2020 17:54:48 +0000 (09:54 -0800)]
Re-order stack/acl/btm_acl::btm_acl_created

Towards readable code

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

Change-Id: I5c8014774856a20f74a965a91c39a07f4084e8f0

3 years agoAdd tACL_CONN:: le and lmp flags to condition feature validity
Chris Manton [Sat, 5 Dec 2020 16:58:22 +0000 (08:58 -0800)]
Add tACL_CONN:: le and lmp flags to condition feature validity

Towards synchronized code

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

Change-Id: Ic77c6f95fdda61805dd8e1188b65c7f35674bf98

3 years agoMerge "fix init flag parsing"
Zach Johnson [Fri, 11 Dec 2020 17:18:41 +0000 (17:18 +0000)]
Merge "fix init flag parsing"

3 years agoMerge "gd ACL: Print warnings for invalid handles"
Treehugger Robot [Fri, 11 Dec 2020 09:49:39 +0000 (09:49 +0000)]
Merge "gd ACL: Print warnings for invalid handles"

3 years agoMerge changes Iddb9d483,Ia3af25d2
Treehugger Robot [Fri, 11 Dec 2020 06:19:44 +0000 (06:19 +0000)]
Merge changes Iddb9d483,Ia3af25d2

* changes:
  gd: implement APIs of Advertising for Android HCI
  gd: Fix flaky tests of LeAddressManager

3 years agorusty-gd: turn off darwin builds
Zach Johnson [Fri, 11 Dec 2020 02:07:21 +0000 (18:07 -0800)]
rusty-gd: turn off darwin builds

Bug: 175349389
Test: compile
Change-Id: Idd133992c743cc24fb8e592c3091bd081a8d2b95

3 years agorusty-gd: start writing array fields in write_to()
Zach Johnson [Fri, 11 Dec 2020 00:50:23 +0000 (16:50 -0800)]
rusty-gd: start writing array fields in write_to()

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

3 years agorusty-gd: add stubs for to_bytes and write_to
Zach Johnson [Thu, 10 Dec 2020 23:52:23 +0000 (15:52 -0800)]
rusty-gd: add stubs for to_bytes and write_to

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

3 years agorusty-gd: Allow paths and not just idents in submodules for GDDI
Zach Johnson [Tue, 8 Dec 2020 19:54:26 +0000 (11:54 -0800)]
rusty-gd: Allow paths and not just idents in submodules for GDDI

cleans up some boilerplate a bit

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

3 years agofix init flag parsing
Zach Johnson [Thu, 10 Dec 2020 20:37:05 +0000 (12:37 -0800)]
fix init flag parsing

late change to fix unit test broke rust side parsing

save pointer so we can restart for rust

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

3 years agorusty-gd: implement Stoppable for GDDI
Zach Johnson [Tue, 8 Dec 2020 00:01:59 +0000 (16:01 -0800)]
rusty-gd: implement Stoppable for GDDI

All implementations are currently nops, but will be changed in an
upcoming CL

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

3 years agoMerge changes I448e8ee9,I3b20f04b,I038364bc
Zach Johnson [Thu, 10 Dec 2020 22:12:58 +0000 (22:12 +0000)]
Merge changes I448e8ee9,I3b20f04b,I038364bc

* changes:
  rusty-gd: forward ACL channels in HciExports, expose over facades
  rusty-gd: simplify hci facade implementation
  rusty-gd: reorg hci internals

3 years agoMerge "rusty-gd: stub out HCI shim FFI"
Zach Johnson [Thu, 10 Dec 2020 20:53:16 +0000 (20:53 +0000)]
Merge "rusty-gd: stub out HCI shim FFI"

3 years agoMerge changes I48e01da5,Ic6a7bff6,I9a568d60,Id1b5926a
Treehugger Robot [Thu, 10 Dec 2020 20:42:59 +0000 (20:42 +0000)]
Merge changes I48e01da5,Ic6a7bff6,I9a568d60,Id1b5926a

* changes:
  Add stack/acl/btm_acl::link_policy_text
  Add stack/include/gatt_api::gatt_op_code_text
  Add API tL2C_LCB::number_of_active_dynamic_channels
  Add stack/l2cap/l2c_api::fixed_channel_text

3 years agoMerge changes I428211dc,I20f897a8
Zach Johnson [Thu, 10 Dec 2020 19:30:47 +0000 (19:30 +0000)]
Merge changes I428211dc,I20f897a8

* changes:
  rusty-gd: reorganize HCI shim to make cpp and rust distinct
  rusty-gd: move common stack logic to bt_main

3 years agoMerge changes I7fe4a9ee,I65e5688c,I0f04b289
Qasim Javed [Thu, 10 Dec 2020 19:23:10 +0000 (19:23 +0000)]
Merge changes I7fe4a9ee,I65e5688c,I0f04b289

* changes:
  rusty-gd: Update new constructor and add parse constructor.
  rusty-gd: Generate constructor for structs
  rusty-gd: Generate struct declarations and enums

3 years agoAdd stack/acl/btm_acl::link_policy_text
Chris Manton [Tue, 1 Dec 2020 23:23:45 +0000 (15:23 -0800)]
Add stack/acl/btm_acl::link_policy_text

Toward loggable code

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

Change-Id: I48e01da55fdaaef9c3d56d49bc1feb13de618bd2

3 years agoAdd stack/include/gatt_api::gatt_op_code_text
Chris Manton [Fri, 20 Nov 2020 18:05:23 +0000 (10:05 -0800)]
Add stack/include/gatt_api::gatt_op_code_text

Toward readable eode

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

Change-Id: Ic6a7bff6be50381f1e9b1df9f22be10f3df2ed29

3 years agoAdd API tL2C_LCB::number_of_active_dynamic_channels
Chris Manton [Thu, 19 Nov 2020 00:24:42 +0000 (16:24 -0800)]
Add API tL2C_LCB::number_of_active_dynamic_channels

Toward loggable code

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

Change-Id: I9a568d60c444c1ec9811f4fd42ac3b371318aad2

3 years agoAdd stack/l2cap/l2c_api::fixed_channel_text
Chris Manton [Thu, 19 Nov 2020 16:49:05 +0000 (08:49 -0800)]
Add stack/l2cap/l2c_api::fixed_channel_text

Toward loggable code

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

Change-Id: Id1b5926a82c7a90ed1c1591a2bf561772e9ce8b1

3 years agoStop address rotation when stack is shutdown
Hansong Zhang [Tue, 8 Dec 2020 20:53:30 +0000 (12:53 -0800)]
Stop address rotation when stack is shutdown

Tag: #stability
Bug: 174293979
Test: Start and stop the stack
Change-Id: I28846762271201384c1902eccc87029b4671f462

3 years agoL2cap shim: Clean up LE dynamic channel part
Hansong Zhang [Fri, 4 Dec 2020 23:37:27 +0000 (15:37 -0800)]
L2cap shim: Clean up LE dynamic channel part

Use cid token as a key for channels, just like what we did for classic,
to support multiple channels for the same PSM.

Also account for channel config and security policy.

Tag: #gd-refactor
Bug: 141555841
Test: cert/run --host
Test: CtsVerifier
Change-Id: Ia5a631e8603bbe51a2b53b1fe955e3f0c1e02325

3 years agorusty-gd: forward ACL channels in HciExports, expose over facades
Zach Johnson [Thu, 3 Dec 2020 01:15:00 +0000 (17:15 -0800)]
rusty-gd: forward ACL channels in HciExports, expose over facades

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

3 years agorusty-gd: stub out HCI shim FFI
Zach Johnson [Wed, 2 Dec 2020 21:45:19 +0000 (13:45 -0800)]
rusty-gd: stub out HCI shim FFI

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

3 years agorusty-gd: simplify hci facade implementation
Zach Johnson [Thu, 3 Dec 2020 01:01:27 +0000 (17:01 -0800)]
rusty-gd: simplify hci facade implementation

the extra complexity wasn't needed on the hal facade, so
we can simplify this one too

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

3 years agorusty-gd: reorg hci internals
Zach Johnson [Thu, 3 Dec 2020 00:30:29 +0000 (16:30 -0800)]
rusty-gd: reorg hci internals

with the intent of adding dynamically registered event receivers:

1. combine incoming and outgoing into a single selected dispatch (to
eliminate need to lock on pending commands)

2. add dynamically registered event receivers

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

3 years agorusty-gd: reorganize HCI shim to make cpp and rust distinct
Zach Johnson [Wed, 2 Dec 2020 00:05:29 +0000 (16:05 -0800)]
rusty-gd: reorganize HCI shim to make cpp and rust distinct

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

3 years agorusty-gd: move common stack logic to bt_main
Zach Johnson [Tue, 1 Dec 2020 21:08:36 +0000 (13:08 -0800)]
rusty-gd: move common stack logic to bt_main

prep for sharing with shim

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

3 years agoenum-ify stack/include/gatt_api::GATT_OP_CODE_
Chris Manton [Fri, 20 Nov 2020 17:48:44 +0000 (09:48 -0800)]
enum-ify stack/include/gatt_api::GATT_OP_CODE_

Toward readable code

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

Change-Id: I133f5bb129540404c1fb07dd5b3c068da725b4e5

3 years agoMerge "Add LE Read ISO link quality"
Jakub Pawlowski [Thu, 10 Dec 2020 08:09:18 +0000 (08:09 +0000)]
Merge "Add LE Read ISO link quality"

3 years agoDO NOT MERGE - Merge Android R QPR1
Xin Li [Thu, 10 Dec 2020 01:44:05 +0000 (17:44 -0800)]
DO NOT MERGE - Merge Android R QPR1

Bug: 172690556
Merged-In: Ibf87b4db0c49db9f489b2937bff9691258f71e16
Change-Id: Ied5bcebdcd24b61fd49e29f6b894b56b08909327

3 years agoMerge changes from topic "revert-1518559-revert-1512686-LIHRZNOOWL-ZWQBPCZFIZ" am...
Zach Johnson [Wed, 9 Dec 2020 21:49:05 +0000 (21:49 +0000)]
Merge changes from topic "revert-1518559-revert-1512686-LIHRZNOOWL-ZWQBPCZFIZ" am: 9409f22301

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1521047

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibf87b4db0c49db9f489b2937bff9691258f71e16

3 years agoMerge changes from topic "revert-1518559-revert-1512686-LIHRZNOOWL-ZWQBPCZFIZ"
Zach Johnson [Wed, 9 Dec 2020 21:02:37 +0000 (21:02 +0000)]
Merge changes from topic "revert-1518559-revert-1512686-LIHRZNOOWL-ZWQBPCZFIZ"

* changes:
  Revert "Revert "rusty-gd: add stack start stubs, define shim lib..."
  Revert^2 "rusty-gd: move init_flag parsing to rust"
  Revert^2 "rusty-gd: compile into libbluetooth"

3 years agoAdd LE Read ISO link quality
Jakub Pawlowski [Tue, 8 Dec 2020 15:06:57 +0000 (16:06 +0100)]
Add LE Read ISO link quality

Tag: #feature
Test: manually verified HCI snoop log content
Bug: 150670922
Change-Id: I0d0f91b1f7e9e61079e429c1c8fb57028b4b52a3

3 years agoCert: Run script additions
Martin Brabham [Fri, 6 Nov 2020 22:14:08 +0000 (14:14 -0800)]
Cert: Run script additions

Default to host, don't require --host.
Most runs are host anyway.  In order to run on device
specify --device.

This will open a new menu for selecting
a device if devices don't exist in the config.  Otherwise,
it'll use the config settings.

Bug: 175149850
Test: cert/run --device
Tag: #gd-refactor
Change-Id: I033adc102833fd18e78e119ae59059bbff1048cb

3 years agoMerge "btm: Add BIS related code to Iso Manager" am: 09a743275c
Jakub Pawlowski [Wed, 9 Dec 2020 18:35:11 +0000 (18:35 +0000)]
Merge "btm: Add BIS related code to Iso Manager" am: 09a743275c

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1398110

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0198d91eb70441c1548aa107d0d3988f8bed4930

3 years agoMerge "btm: Add BIS related code to Iso Manager"
Jakub Pawlowski [Wed, 9 Dec 2020 17:44:55 +0000 (17:44 +0000)]
Merge "btm: Add BIS related code to Iso Manager"

3 years agorusty-gd: Update new constructor and add parse constructor.
Qasim Javed [Tue, 8 Dec 2020 19:32:11 +0000 (11:32 -0800)]
rusty-gd: Update new constructor and add parse constructor.

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

3 years agoRevert "Revert "rusty-gd: add stack start stubs, define shim lib..."
Zach Johnson [Wed, 9 Dec 2020 00:39:55 +0000 (00:39 +0000)]
Revert "Revert "rusty-gd: add stack start stubs, define shim lib..."

Revert submission 1518559-revert-1512686-LIHRZNOOWL

Reason for revert: build system fixed
Reverted Changes:
I760eea76d:Revert "rusty-gd: add stack start stubs, define sh...
I5740575cf:Revert "rusty-gd: move init_flag parsing to rust"
I0cfbe779c:Revert "rusty-gd: compile into libbluetooth"

Change-Id: I5f0f76450889d7906e9a763a4ebc5a46daf673b7

3 years agoRevert^2 "rusty-gd: move init_flag parsing to rust"
Zach Johnson [Wed, 9 Dec 2020 00:39:55 +0000 (00:39 +0000)]
Revert^2 "rusty-gd: move init_flag parsing to rust"

126ad36e2b8cd19d41cd60d056e704d7a5042f71

Change-Id: I93a7ee9a2fb6afda535f25348a7f94fac1a1d116

3 years agoRevert^2 "rusty-gd: compile into libbluetooth"
Zach Johnson [Wed, 9 Dec 2020 00:39:55 +0000 (00:39 +0000)]
Revert^2 "rusty-gd: compile into libbluetooth"

2cdb386684584e5472b77fd0a1bbf2c8d8d83979

Change-Id: I56860a238c483b55b5eb728eb8cd6cfb6ada4d28

3 years agoConnect main::shim::acl to legacy dumpsys operation am: c5362587d2
Chris Manton [Tue, 8 Dec 2020 06:26:47 +0000 (06:26 +0000)]
Connect main::shim::acl to legacy dumpsys operation am: c5362587d2

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1515433

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id8fd80315788c4c368dfde392f86ec360d7e0c69

3 years agoDO NOT MERGE - Merge RQ1A.201205.011
Xin Li [Mon, 7 Dec 2020 03:59:07 +0000 (19:59 -0800)]
DO NOT MERGE - Merge RQ1A.201205.011

Bug: 172690556
Merged-In: I0e8cdb9a00184f62d11fb06bc30f07b2a35bc49e
Change-Id: I7e1304fd99ee313360006f5b9a897de289d3ce2f

3 years agoDO NOT MERGE - Mark RQ1A.201004.001 as merged
Xin Li [Sun, 6 Dec 2020 22:43:22 +0000 (14:43 -0800)]
DO NOT MERGE - Mark RQ1A.201004.001 as merged

Bug: 172690556
Change-Id: I34d9b0eb2cb43984423b2f857bad96bba8acf929

3 years agoConnect main::shim::acl to legacy dumpsys operation
Chris Manton [Tue, 1 Dec 2020 22:11:43 +0000 (14:11 -0800)]
Connect main::shim::acl to legacy dumpsys operation

Toward loggable code

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

Change-Id: I5288fe8eb2f4d9308c896d5c62e99efad35a3e51