OSDN Git Service

android-x86/system-bt.git
3 years agoMerge "A2DP offload: modify the A2DP offload SCMS-T_Enable with SCMS-T header" am...
Treehugger Robot [Mon, 26 Oct 2020 23:25:40 +0000 (23:25 +0000)]
Merge "A2DP offload: modify the A2DP offload SCMS-T_Enable with SCMS-T header" am: 0b3cb3c353

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

Change-Id: I719322abab346e7e9e82be6139e16b7e7e13a7e8

3 years agoMerge "A2DP offload: modify the A2DP offload SCMS-T_Enable with SCMS-T header"
Treehugger Robot [Mon, 26 Oct 2020 23:13:26 +0000 (23:13 +0000)]
Merge "A2DP offload: modify the A2DP offload SCMS-T_Enable with SCMS-T header"

3 years agoRe-log stack/btm/btm_ble::btm_ble_start_sec_check am: 30abace52c
Chris Manton [Mon, 26 Oct 2020 21:50:35 +0000 (21:50 +0000)]
Re-log stack/btm/btm_ble::btm_ble_start_sec_check am: 30abace52c

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

Change-Id: I18733bde17152ef1fa32987f5a8b3b3901169818

3 years agoRe-log stack/l2cap/l2c_ble::l2ble_sec_access_req am: 2db5d150ee
Chris Manton [Mon, 26 Oct 2020 21:50:02 +0000 (21:50 +0000)]
Re-log  stack/l2cap/l2c_ble::l2ble_sec_access_req am: 2db5d150ee

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

Change-Id: I8ebc05fadefd0618973df1add828511be5b38c76

3 years agobtm_acl_removed: Check for null as acl may have already closed am: fedc86ac10
Chris Manton [Mon, 26 Oct 2020 17:54:46 +0000 (17:54 +0000)]
btm_acl_removed: Check for null as acl may have already closed am: fedc86ac10

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

Change-Id: Ie35b346942e0cf5dd1ba4bdaea97c0ef649cb776

3 years agoRe-log stack/btm/btm_ble::btm_ble_start_sec_check
Chris Manton [Mon, 26 Oct 2020 16:17:17 +0000 (09:17 -0700)]
Re-log stack/btm/btm_ble::btm_ble_start_sec_check

Toward readable code

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

Change-Id: I083d8a4af4af47b9a78f61d4618342abb76acbec

3 years agoRe-log stack/l2cap/l2c_ble::l2ble_sec_access_req
Chris Manton [Mon, 26 Oct 2020 16:17:29 +0000 (09:17 -0700)]
Re-log  stack/l2cap/l2c_ble::l2ble_sec_access_req

Toward readable code

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

Change-Id: I520a8ce93f1192960425291ed905c9bf3aa1cc26

3 years agobtm_acl_removed: Check for null as acl may have already closed
Chris Manton [Mon, 26 Oct 2020 16:16:50 +0000 (09:16 -0700)]
btm_acl_removed: Check for null as acl may have already closed

Bug:159815595
Tag: #refactor
Test: acts.py BleCocTest

Change-Id: I7a5312d4d929280de73442885100714264cd1457

3 years agoMerge "Properly reset tL2C_CCB::ecoc" am: e95eb34646
Treehugger Robot [Mon, 26 Oct 2020 00:55:14 +0000 (00:55 +0000)]
Merge "Properly reset tL2C_CCB::ecoc" am: e95eb34646

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

Change-Id: I4b1d9b3315333677e1e881f89395cbb379a1f0a4

3 years agoMerge "Properly reset tL2C_CCB::ecoc"
Treehugger Robot [Mon, 26 Oct 2020 00:30:15 +0000 (00:30 +0000)]
Merge "Properly reset tL2C_CCB::ecoc"

3 years agoACL: Refactor remote version/feature response am: 63ecb78b44
Hansong Zhang [Sun, 25 Oct 2020 23:34:01 +0000 (23:34 +0000)]
ACL: Refactor remote version/feature response am: 63ecb78b44

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

Change-Id: I6e06a054531172c502b212d7c182c22582585076

3 years agoGD L2cap: Pass more link callbacks to Security am: 9ee148a8b0
Hansong Zhang [Sun, 25 Oct 2020 21:10:25 +0000 (21:10 +0000)]
GD L2cap: Pass more link callbacks to Security am: 9ee148a8b0

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

Change-Id: I24722ec76612dcbc49e20f5fe102a5eb79f2abbb

3 years agogd: Pull out READ_REMOTE_VERSION shared between classic and le am: 18a81f2774
Chris Manton [Sun, 25 Oct 2020 21:09:54 +0000 (21:09 +0000)]
gd: Pull out READ_REMOTE_VERSION shared between classic and le am: 18a81f2774

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

Change-Id: Ib6f3caaf7cc212382b2017a46798d8e2c9c52d10

3 years agoACL: Refactor remote version/feature response
Hansong Zhang [Sat, 24 Oct 2020 20:46:56 +0000 (13:46 -0700)]
ACL: Refactor remote version/feature response

Separate the packet parsing and handling part, so that we can parse the
packet in GD L2cap and handle it in legacy stack.
When GD L2cap is enabled, don't send these request in legacy stack.

Tag: #gd-refactor
Bug: 141555841
Test: cert/run --host
Test: Pair and connect with a headset
Change-Id: I8be299f1e61cb790ce0d0b7a81d3e6a99bc8d336

3 years agoGD L2cap: Pass more link callbacks to Security
Hansong Zhang [Fri, 23 Oct 2020 23:31:17 +0000 (16:31 -0700)]
GD L2cap: Pass more link callbacks to Security

Send Remote version request and supported feature request upon link
connection.
Security might be interested in LMP version and features, and ACL handle
(for legacy).

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

3 years agoProperly reset tL2C_CCB::ecoc
Chris Manton [Sun, 25 Oct 2020 20:25:18 +0000 (13:25 -0700)]
Properly reset tL2C_CCB::ecoc

Bug: 171657571
Tag: #refactor
Test: act.py -tc BleCocTest
Change-Id: I491a7cba9b28dcc4d02d7de4463a3512e8fce719

3 years agogd: Pull out READ_REMOTE_VERSION shared between classic and le
Chris Manton [Sat, 24 Oct 2020 21:09:07 +0000 (14:09 -0700)]
gd: Pull out READ_REMOTE_VERSION shared between classic and le

Test: atest --host bluetooth_test_gd
Test: acts.py BleCocTest ## With gd_hci=false
Test: acts.py BleCocTest ## With gd_acl=true
Bug: 171634583
Tag: #refactor

Change-Id: I53a49fec950755c13e4786be9aae936c0c2b242a

3 years agoOnly send ReadRemoteVersionRequest in legacy mode am: 90b5964bb0
Chris Manton [Sun, 25 Oct 2020 04:25:12 +0000 (04:25 +0000)]
Only send ReadRemoteVersionRequest in legacy mode am: 90b5964bb0

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

Change-Id: I58761ce4ea5cfb6ca0fded6581c34da95616a6ce

3 years agoRevert "Should not send classic commands on le link" am: 4e2fbc54f3
Chris Manton [Sun, 25 Oct 2020 00:20:04 +0000 (00:20 +0000)]
Revert "Should not send classic commands on le link" am: 4e2fbc54f3

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

Change-Id: I44236f77e7191eabb1e83bb7414eac311c815e95

3 years agoOnly send ReadRemoteVersionRequest in legacy mode
Chris Manton [Sat, 24 Oct 2020 21:43:31 +0000 (14:43 -0700)]
Only send ReadRemoteVersionRequest in legacy mode

gd acl can only accept an event for either classic
or le, but not both.

Bug: 166280067
Tag: #refactor
Test: act.py -tc BleCocTest
Change-Id: I719f09a380e7b75da7c40ffc136038ccaea90812

3 years agoRevert "Should not send classic commands on le link"
Chris Manton [Sat, 24 Oct 2020 21:22:03 +0000 (14:22 -0700)]
Revert "Should not send classic commands on le link"

This reverts commit 25b8b04caa3c2c4b218f8d56f5f72e7ca1e24f8c.

Turns out this is a command that may be run on both le and br_edr links

Bug: 166280067
Tag: #refactor
Test: act.py -tc BleCocTest
Change-Id: Ieb3de7c6046f18b30805b7486441039b591f929b

3 years agoGD ACL: on_read_remote_supported_features_complete am: 9b14973622
Hansong Zhang [Sat, 24 Oct 2020 02:28:00 +0000 (02:28 +0000)]
GD ACL: on_read_remote_supported_features_complete am: 9b14973622

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

Change-Id: Ia465ab88b6ee1bdb1fa2405f106f2260846ec527

3 years agoGD ACL: on_read_remote_supported_features_complete
Hansong Zhang [Fri, 23 Oct 2020 23:27:18 +0000 (16:27 -0700)]
GD ACL: on_read_remote_supported_features_complete

Use OnReadRemoteExtendedFeaturesComplete callback to send it to L2cap

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

3 years agoMerge "Cleanup references to system/core/base -> system/libbase" am: 4c901673d3
Baligh Uddin [Sat, 24 Oct 2020 02:04:48 +0000 (02:04 +0000)]
Merge "Cleanup references to system/core/base -> system/libbase" am: 4c901673d3

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

Change-Id: Ic3f0c1a72549cf3f9e83ff7b2683adf4399b2b67

3 years agoMerge "Cleanup references to system/core/base -> system/libbase"
Baligh Uddin [Sat, 24 Oct 2020 01:40:47 +0000 (01:40 +0000)]
Merge "Cleanup references to system/core/base -> system/libbase"

3 years agoClean up log spam in avrcp and a2dp am: ae14ff3764
Hansong Zhang [Fri, 23 Oct 2020 22:05:56 +0000 (22:05 +0000)]
Clean up log spam in avrcp and a2dp am: ae14ff3764

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

Change-Id: I08a44275b4269d542e396685ff4e415226b6d26a

3 years agoMerge changes Ic1411faf,I0ef22f28,I645b787d,Ief031db6,I5c494deb, ... am: f8683222cb
Treehugger Robot [Fri, 23 Oct 2020 20:23:01 +0000 (20:23 +0000)]
Merge changes Ic1411faf,I0ef22f28,I645b787d,Ief031db6,I5c494deb, ... am: f8683222cb

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

Change-Id: Ide2354d20c31492461ad59fc9f833efab2ce6691

3 years agoClean up log spam in avrcp and a2dp
Hansong Zhang [Fri, 23 Oct 2020 19:31:12 +0000 (12:31 -0700)]
Clean up log spam in avrcp and a2dp

Now we don't see bugs in avrcp and a2dp sbc encoder often, move them to
verbose logging.

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I8475b6914edb5c06927d8578d2d035c49a41efdc

3 years agoMerge changes Ic1411faf,I0ef22f28,I645b787d,Ief031db6,I5c494deb, ...
Treehugger Robot [Fri, 23 Oct 2020 18:55:21 +0000 (18:55 +0000)]
Merge changes Ic1411faf,I0ef22f28,I645b787d,Ief031db6,I5c494deb, ...

* changes:
  Remove unused def SMP_DEBUG
  Remove name from BTM_SecAddBleDevice
  Re-log stack/l2cap/l2c_ble::
  enum-ify link stack/acl/btm_acl::policy settings
  Streamline main/shim/acl::_reason
  Streamline stack/btm/btm_ble_addr::btm_ble_addr_resolvable
  Streamline stack/btm/btm_ble_gap::btm_ble_update_adv_flag
  Streamline stack/btm/btm_ble_addr::btm_ble_resolve_random_addr
  enum-ify stack/btm/btm_ble_gap::BTM_BLE_
  Add main/shim/acl_legacy_interface::auth_complete

3 years agoRevert "BTM_ACL: Remove unused code" am: aae7b9eb1d
Jakub Pawlowski [Fri, 23 Oct 2020 15:22:56 +0000 (15:22 +0000)]
Revert "BTM_ACL: Remove unused code" am: aae7b9eb1d

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

Change-Id: I16b2711446eb1327e9ad04a48bd8256ccb1d178f

3 years agoRemove unused def SMP_DEBUG
Chris Manton [Sun, 11 Oct 2020 21:36:53 +0000 (14:36 -0700)]
Remove unused def SMP_DEBUG

Toward readable code

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

Change-Id: Ic1411faf31fd6c4dc66282bfe42a0ec47c969bb1

3 years agoRemove name from BTM_SecAddBleDevice
Chris Manton [Fri, 23 Oct 2020 02:47:49 +0000 (19:47 -0700)]
Remove name from BTM_SecAddBleDevice

bd_name is always nullptr

Toward readable code

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

Change-Id: I0ef22f288425dad0cc08d4e43acc12e5dd51d6dd

3 years agoRe-log stack/l2cap/l2c_ble::
Chris Manton [Thu, 8 Oct 2020 21:25:38 +0000 (14:25 -0700)]
Re-log stack/l2cap/l2c_ble::

Please "don\'t" use apostrophes

Towards grepable code

Bug: 163134718
Tag: #refactor
Test: ble paired 2 phones
Test: act.py -tc BleCocTest
Change-Id: I645b787dffa54d1f1829fca1212a4fa811e1f51e

3 years agoenum-ify link stack/acl/btm_acl::policy settings
Chris Manton [Sun, 11 Oct 2020 03:55:47 +0000 (20:55 -0700)]
enum-ify link stack/acl/btm_acl::policy settings

And also move to only use location
And restrict from header into compilation unit

Toward readable code

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

Change-Id: Ief031db624bf1363ee3ec4043efafcfdc4be1b59

3 years agoStreamline main/shim/acl::_reason
Chris Manton [Tue, 20 Oct 2020 15:06:13 +0000 (08:06 -0700)]
Streamline main/shim/acl::_reason

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

Change-Id: I5c494deb85fbb3101602078dcaeefc98ac695754

3 years agoStreamline stack/btm/btm_ble_addr::btm_ble_addr_resolvable
Chris Manton [Tue, 13 Oct 2020 20:58:56 +0000 (13:58 -0700)]
Streamline stack/btm/btm_ble_addr::btm_ble_addr_resolvable

Toward readable code

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

Change-Id: I6600ac7d3fdc1a9ff099b0ffa8c9b1826c6db456

3 years agoStreamline stack/btm/btm_ble_gap::btm_ble_update_adv_flag
Chris Manton [Tue, 13 Oct 2020 21:19:35 +0000 (14:19 -0700)]
Streamline stack/btm/btm_ble_gap::btm_ble_update_adv_flag

Toward readable code

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

Change-Id: I241cf791f672d0003419c7e8e26b4baf2089d681

3 years agoStreamline stack/btm/btm_ble_addr::btm_ble_resolve_random_addr
Chris Manton [Tue, 13 Oct 2020 20:34:43 +0000 (13:34 -0700)]
Streamline stack/btm/btm_ble_addr::btm_ble_resolve_random_addr

Toward readable code

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

Change-Id: Ifc5c988e6a5dd8540c5465639022a355ee9efcbf

3 years agoenum-ify stack/btm/btm_ble_gap::BTM_BLE_
Chris Manton [Tue, 13 Oct 2020 21:19:08 +0000 (14:19 -0700)]
enum-ify stack/btm/btm_ble_gap::BTM_BLE_

Toward readable code

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

Change-Id: Icb54b5f68c11bcb0a28b1cf25abcaf68c734d6ca

3 years agoAdd main/shim/acl_legacy_interface::auth_complete
Chris Manton [Fri, 16 Oct 2020 01:16:57 +0000 (18:16 -0700)]
Add main/shim/acl_legacy_interface::auth_complete

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

Change-Id: I2ad8753860ec78441a22c7f3e071beb11b9773c6

3 years agoCleanup references to system/core/base -> system/libbase
Baligh Uddin [Fri, 23 Oct 2020 14:33:47 +0000 (14:33 +0000)]
Cleanup references to system/core/base -> system/libbase

BUG: 157656545
Test: TH
Change-Id: I6b04e7340d58215ccf183e4b086023281e0a9951

3 years agoA2DP offload: modify the A2DP offload SCMS-T_Enable with SCMS-T header
Alice Kuo [Wed, 14 Oct 2020 10:31:54 +0000 (18:31 +0800)]
A2DP offload: modify the A2DP offload SCMS-T_Enable with SCMS-T header

Follow the Android HCI requirement for the 'Start A2DP Offload' cmd, it
should bring the SCMS-T header in the 'SCMS-T Enable' field as SCMS-T is
enabled. Get the SCMS-T active status of the peer devices as building
the offload start req cmd, and fill the SCMS-T header based the active
status.

Bug: 170785181
Tag: #feature
Test: connect with Sony WH-1000XM4, check the SCMS-T_Enable correctness
Test: atest --test-mapping system/bt
Change-Id: I6003b50a09f010942b37436497b06e06180b2069

3 years agoRevert "BTM_ACL: Remove unused code"
Jakub Pawlowski [Fri, 23 Oct 2020 11:14:14 +0000 (11:14 +0000)]
Revert "BTM_ACL: Remove unused code"

This reverts commit 85a4ce1ebd16bb20e87edac88ba0cbd71fa92d46.

Reason for revert: This is needed for LE Audio

Change-Id: Iaed065aef5f40e066d08004699c07dea2f48c94a

3 years agoMerge changes from topic "gd_security_shim" am: b39c2d25d6
Treehugger Robot [Fri, 23 Oct 2020 07:48:38 +0000 (07:48 +0000)]
Merge changes from topic "gd_security_shim" am: b39c2d25d6

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

Change-Id: I74fca34c7e6f243e63cb9739e346d7a6427c679b

3 years agoMerge changes from topic "gd_security_shim"
Treehugger Robot [Fri, 23 Oct 2020 07:04:14 +0000 (07:04 +0000)]
Merge changes from topic "gd_security_shim"

* changes:
  GD Security: pipe in determined just_works flag
  GD Security Shim: Make ConfirmationData have strict types

3 years agoRefactor btm_remove_acl am: 309847123f
Hansong Zhang [Fri, 23 Oct 2020 03:53:42 +0000 (03:53 +0000)]
Refactor btm_remove_acl am: 309847123f

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

Change-Id: I9563f7f801fcdc16fa85eb1f576ff484dcc298f9

3 years agoBTM_BLE_GAP: Clean up log spam am: de09caf12b
Hansong Zhang [Fri, 23 Oct 2020 03:53:02 +0000 (03:53 +0000)]
BTM_BLE_GAP: Clean up log spam am: de09caf12b

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

Change-Id: Iae8f6544d7c61d0cc1c65b5aa7da613a13d0bdc9

3 years agoRefactor btm_remove_acl
Hansong Zhang [Thu, 22 Oct 2020 20:17:35 +0000 (13:17 -0700)]
Refactor btm_remove_acl

Use ACL handle instead.

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I4447134f80f39e4afaf051e49c10a55ea68f9f5b

3 years agoBTM_BLE_GAP: Clean up log spam
Hansong Zhang [Thu, 22 Oct 2020 22:45:50 +0000 (15:45 -0700)]
BTM_BLE_GAP: Clean up log spam

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I35bca19f53ca865697f810524bb911c8668e08f5

3 years agoUse stack/acl/btm_acl::acl_process_extended_features am: 9d80c3fa74
Chris Manton [Thu, 22 Oct 2020 22:51:09 +0000 (22:51 +0000)]
Use stack/acl/btm_acl::acl_process_extended_features am: 9d80c3fa74

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

Change-Id: Ia2e01820ae1be0ede09c3cda579d6179c534bd02

3 years agoAdd stack/acl/btm_acl::acl_process_extended_features am: ee487ce726
Chris Manton [Thu, 22 Oct 2020 22:51:05 +0000 (22:51 +0000)]
Add stack/acl/btm_acl::acl_process_extended_features am: ee487ce726

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

Change-Id: Ie017bda4820042152b7dba13b127032232dc7c77

3 years agoAdd main/shim/acl_legacy_interface::btm_acl_role_changed am: 77a9259dbb
Chris Manton [Thu, 22 Oct 2020 22:51:01 +0000 (22:51 +0000)]
Add main/shim/acl_legacy_interface::btm_acl_role_changed am: 77a9259dbb

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

Change-Id: Ife29ea667cdcac1bf60d4b159b65876e9c217587

3 years agoAdd tHCI_STATUS to btm_acl_role_changed am: 1c9237a289
Chris Manton [Thu, 22 Oct 2020 22:50:57 +0000 (22:50 +0000)]
Add tHCI_STATUS to btm_acl_role_changed am: 1c9237a289

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

Change-Id: Ifad9f10ca3ff62a5a08b0b90499b44a074a6802d

3 years agoShould not send classic commands on le link am: 25b8b04caa
Chris Manton [Thu, 22 Oct 2020 22:50:53 +0000 (22:50 +0000)]
Should not send classic commands on le link am: 25b8b04caa

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

Change-Id: I285ef816b8abace08dae2f59fc6b92a3d0255ec6

3 years agoReturn after gd acl creates connection am: 175ea68186
Chris Manton [Thu, 22 Oct 2020 22:50:07 +0000 (22:50 +0000)]
Return after gd acl creates connection am: 175ea68186

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

Change-Id: I06d98ef95e339d983b35350e483e555550ab3153

3 years agoL2cap API: Use GD L2cap flag am: 43a4028ecb
Hansong Zhang [Thu, 22 Oct 2020 21:29:29 +0000 (21:29 +0000)]
L2cap API: Use GD L2cap flag am: 43a4028ecb

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

Change-Id: I036c088835c279d6054bae09f7ea54e7f1802a48

3 years agoBTM_ACL: Remove unused code am: 85a4ce1ebd
Hansong Zhang [Thu, 22 Oct 2020 20:47:50 +0000 (20:47 +0000)]
BTM_ACL: Remove unused code am: 85a4ce1ebd

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

Change-Id: Ie5aecd881f87bc5ae2efd7ba03d0678014a29a5a

3 years agoUse stack/acl/btm_acl::acl_process_extended_features
Chris Manton [Thu, 22 Oct 2020 17:35:56 +0000 (10:35 -0700)]
Use stack/acl/btm_acl::acl_process_extended_features

Bug: 166280067
Tag: #refactor
Test: Pair classic device

Change-Id: I1a87ea23c8b4590a313652dca78b0e51354ecb33

3 years agoAdd stack/acl/btm_acl::acl_process_extended_features
Chris Manton [Thu, 22 Oct 2020 17:35:39 +0000 (10:35 -0700)]
Add stack/acl/btm_acl::acl_process_extended_features

Bug: 166280067
Tag: #refactor
Test: Pair classic device

Change-Id: I1136fae14a3673f6dc76b8d3d08414525690f8b3

3 years agoAdd main/shim/acl_legacy_interface::btm_acl_role_changed
Chris Manton [Thu, 22 Oct 2020 17:32:05 +0000 (10:32 -0700)]
Add main/shim/acl_legacy_interface::btm_acl_role_changed

Bug: 166280067
Tag: #refactor
Test: Pair classic device

Change-Id: Ie4f2c31ed449a5bf9353efb3ab640cbbbfab211f

3 years agoAdd tHCI_STATUS to btm_acl_role_changed
Chris Manton [Thu, 22 Oct 2020 19:55:44 +0000 (12:55 -0700)]
Add tHCI_STATUS to btm_acl_role_changed

Bug: 166280067
Tag: #refactor
Test: Pair classic device

Change-Id: I5ba4b72585e9cd9e0e0e45935f6e4a328fc28581

3 years agoShould not send classic commands on le link
Chris Manton [Tue, 20 Oct 2020 23:57:27 +0000 (16:57 -0700)]
Should not send classic commands on le link

Bug: 171491610
Tag: #refactor
Test: verified on wireshark

Change-Id: I1428ea803a6dd327a81209a4f710d96a8d6612be

3 years agoReturn after gd acl creates connection
Chris Manton [Thu, 22 Oct 2020 17:47:09 +0000 (10:47 -0700)]
Return after gd acl creates connection

Bug: 166280067
Tag: #refactor
Test: Pair classic device

Change-Id: Ie18dc8ba759b6fd20b7cd041a86c86b94c7e9e1f

3 years agobtm_acl_encrypt_change: Use handle directly am: e61cae84a1
Hansong Zhang [Thu, 22 Oct 2020 06:56:28 +0000 (06:56 +0000)]
btm_acl_encrypt_change: Use handle directly am: e61cae84a1

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

Change-Id: I8a3a6d4c31615792fc9c91e03f332a4edd4ee10a

3 years agoFlatten btm_sec_start_encryption am: 2da963b73e
Hansong Zhang [Thu, 22 Oct 2020 06:56:24 +0000 (06:56 +0000)]
Flatten btm_sec_start_encryption am: 2da963b73e

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

Change-Id: I460c4318572d27f5a504064ac8d9da632ab8e961

3 years agoMerge changes Ie1b2f0f6,I5f115595,I7c766087,If341f69a,Idba0190c, ... am: 8b39458f97
Treehugger Robot [Thu, 22 Oct 2020 06:52:20 +0000 (06:52 +0000)]
Merge changes Ie1b2f0f6,I5f115595,I7c766087,If341f69a,Idba0190c, ... am: 8b39458f97

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

Change-Id: I566ef8d048349e2bc0a7a4e8a87aa3577c1d80e7

3 years agoL2cap API: Use GD L2cap flag
Hansong Zhang [Mon, 19 Oct 2020 22:47:35 +0000 (15:47 -0700)]
L2cap API: Use GD L2cap flag

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

3 years agoBTM_ACL: Remove unused code
Hansong Zhang [Thu, 22 Oct 2020 06:16:52 +0000 (23:16 -0700)]
BTM_ACL: Remove unused code

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I1ddd384d8527313ac447c3d2b794a24f461117e9

3 years agobtm_acl_encrypt_change: Use handle directly
Hansong Zhang [Wed, 21 Oct 2020 23:18:52 +0000 (16:18 -0700)]
btm_acl_encrypt_change: Use handle directly

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I7cc183ca8094315e00e3e924a77f0fec8d47c941

3 years agoFlatten btm_sec_start_encryption
Hansong Zhang [Wed, 21 Oct 2020 22:03:32 +0000 (15:03 -0700)]
Flatten btm_sec_start_encryption

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ie0c0709ef3f625657704cc41f40377a60d8c3523

3 years agoMerge changes Ie1b2f0f6,I5f115595,I7c766087,If341f69a,Idba0190c, ...
Treehugger Robot [Wed, 21 Oct 2020 23:27:25 +0000 (23:27 +0000)]
Merge changes Ie1b2f0f6,I5f115595,I7c766087,If341f69a,Idba0190c, ...

* changes:
  Use acl_create_le_connection_with_id
  Add acl_create_le_connection_with_id
  Plumb through acl_create|cancel_le_connection
  Add bd_features_text
  Remove def stack/hcic/hcicmds::BT_10A
  Proper interface around disconnect_reason
  Use tHCI_STATUS in btm_sec_disconnect
  Allow gd acl to take DISCONNECT when enabled
  Connect main/shim/acl_legacy_interface::acl_ble_enhanced_connection_complete_from_shim
  Add stack/acl/btm_acl::btm_acl_disconnected

3 years agoRefactor btm_sec_set_peer_sec_caps am: e0ccee6ba5
Hansong Zhang [Wed, 21 Oct 2020 19:11:02 +0000 (19:11 +0000)]
Refactor btm_sec_set_peer_sec_caps am: e0ccee6ba5

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

Change-Id: I820667b46a0b6fd4435531e13fcf4e10c3ebe81a

3 years agoRefactor btm_sec_set_peer_sec_caps
Hansong Zhang [Wed, 21 Oct 2020 01:48:52 +0000 (18:48 -0700)]
Refactor btm_sec_set_peer_sec_caps

No need to pass acl_cb

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I7cb1bae627c731106ab3a93442acb8f6bb2018fa

3 years agoRemove unused def BTM_MAX_PRE_SM4_LKEY_TYPE am: f41cc0b1dd
Chris Manton [Wed, 21 Oct 2020 16:54:52 +0000 (16:54 +0000)]
Remove unused def BTM_MAX_PRE_SM4_LKEY_TYPE am: f41cc0b1dd

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

Change-Id: I5201f85d5c8b3a0674c8781fda6437f10b2a22ae

3 years agoUse acl_create_le_connection_with_id
Chris Manton [Tue, 20 Oct 2020 21:42:47 +0000 (14:42 -0700)]
Use acl_create_le_connection_with_id

Bug: 166280067
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: Ie1b2f0f60367ad15834b28ee896989674c6f3614

3 years agoAdd acl_create_le_connection_with_id
Chris Manton [Tue, 20 Oct 2020 21:42:21 +0000 (14:42 -0700)]
Add acl_create_le_connection_with_id

Bug: 166280067
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: I5f1155951394c3fc073a2b5ef2f57f9e2db2cab4

3 years agoPlumb through acl_create|cancel_le_connection
Chris Manton [Tue, 20 Oct 2020 19:33:54 +0000 (12:33 -0700)]
Plumb through acl_create|cancel_le_connection

Bug: 166280067
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: I7c766087716777c274866bff20c197ea41fc80f8

3 years agoAdd bd_features_text
Chris Manton [Sat, 17 Oct 2020 23:11:11 +0000 (16:11 -0700)]
Add bd_features_text

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: If341f69a65b484d88275d95a60cfd15ab64ede5e

3 years agoRemove def stack/hcic/hcicmds::BT_10A
Chris Manton [Sun, 11 Oct 2020 15:53:41 +0000 (08:53 -0700)]
Remove def stack/hcic/hcicmds::BT_10A

Always false; untested when true

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: Idba0190c8f5f8bb2eab6c93d4f4e9687fc58874b

3 years agoProper interface around disconnect_reason
Chris Manton [Sat, 10 Oct 2020 23:37:11 +0000 (16:37 -0700)]
Proper interface around disconnect_reason

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: I10d4bc9ae642c16cf5622adf541db999f442a48f

3 years agoUse tHCI_STATUS in btm_sec_disconnect
Chris Manton [Thu, 15 Oct 2020 21:22:32 +0000 (14:22 -0700)]
Use tHCI_STATUS in btm_sec_disconnect

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: Idc93062d96aa45c0e4ed385a3fa09e6cbdabf915

3 years agoAllow gd acl to take DISCONNECT when enabled
Chris Manton [Tue, 20 Oct 2020 16:40:18 +0000 (09:40 -0700)]
Allow gd acl to take DISCONNECT when enabled

Bug: 166280067
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: Ib460b3c9c63572753d51aaf1c49f56024b6d4bfb

3 years agoConnect main/shim/acl_legacy_interface::acl_ble_enhanced_connection_complete_from_shim
Chris Manton [Tue, 20 Oct 2020 16:36:07 +0000 (09:36 -0700)]
Connect main/shim/acl_legacy_interface::acl_ble_enhanced_connection_complete_from_shim

Bug: 166280067
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: I26ae8837788425a74d7202a40b3e7fc7b2c7a279

3 years agoAdd stack/acl/btm_acl::btm_acl_disconnected
Chris Manton [Fri, 16 Oct 2020 15:54:53 +0000 (08:54 -0700)]
Add stack/acl/btm_acl::btm_acl_disconnected

Also connect to shim acl

Bug: 166280067
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Test: classic paired Bose SoundLink

Change-Id: I8a3d7ef1f44b637a053e85a98765a3db5498e590

3 years agoRemove unused def BTM_MAX_PRE_SM4_LKEY_TYPE
Chris Manton [Sat, 17 Oct 2020 22:54:42 +0000 (15:54 -0700)]
Remove unused def BTM_MAX_PRE_SM4_LKEY_TYPE

Towards readable code

Bug: 163134718
Tag: #refactor
Test: Compiled and passed basic functionality

Change-Id: Icba095ec66c4d9b65cec5269729defa0e25c3760

3 years agoGD Security: pipe in determined just_works flag
Martin Brabham [Wed, 7 Oct 2020 21:53:38 +0000 (14:53 -0700)]
GD Security: pipe in determined just_works flag

Bug: 162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Test: atest --host bluetooth_test_gd
Change-Id: I480898445bf65f8034a1519cc3fba4572e613c56

3 years agoGD Security Shim: Make ConfirmationData have strict types
Martin Brabham [Wed, 21 Oct 2020 07:41:42 +0000 (00:41 -0700)]
GD Security Shim: Make ConfirmationData have strict types

Bug: 162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Test: atest --host bluetooth_test_gd
Test: atest --host bluetooth_test_common
Change-Id: I6684d53b7fe154d80d0869333f1d6d19459d1090

3 years agoUse stack/l2cap/l2c_link::l2c_packets_completed am: 2986a9862f
Chris Manton [Wed, 21 Oct 2020 07:43:32 +0000 (07:43 +0000)]
Use stack/l2cap/l2c_link::l2c_packets_completed am: 2986a9862f

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

Change-Id: I7031343b009ac63a7ed78ee71b8f515571240be2

3 years agoRe-log entry into stack/gatt/gatt_api::GATT_ am: 5264c950cb
Chris Manton [Wed, 21 Oct 2020 07:43:28 +0000 (07:43 +0000)]
Re-log entry into stack/gatt/gatt_api::GATT_ am: 5264c950cb

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

Change-Id: Ic7cea9dd9b41cda1ceda962b177cd8353ea757cc

3 years agoRe-log stack/gap/gap_ble::client_connect_cback am: 65a2221eeb
Chris Manton [Wed, 21 Oct 2020 07:43:24 +0000 (07:43 +0000)]
Re-log stack/gap/gap_ble::client_connect_cback am: 65a2221eeb

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

Change-Id: I24b490b9bab1d022b7d212a45c57b59315229095

3 years agoAdd stack/l2cap/l2c_link::l2c_packets_completed am: c9aad46809
Chris Manton [Wed, 21 Oct 2020 07:43:20 +0000 (07:43 +0000)]
Add stack/l2cap/l2c_link::l2c_packets_completed am: c9aad46809

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

Change-Id: I21dd10730e7265da6fee579322ae383799c237a2

3 years agoAdd stack/acl/ble_acl::acl_ble_enhanced_connection_complete_from_shim am: 9712953a45
Chris Manton [Wed, 21 Oct 2020 07:43:11 +0000 (07:43 +0000)]
Add stack/acl/ble_acl::acl_ble_enhanced_connection_complete_from_shim am: 9712953a45

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

Change-Id: Ib2d85e2b0ddd3c7c30ee3dfeef05a5d7c556993b

3 years agoRemove never set #def BTIF_MIXED_MODE_INCLUDED am: 688b5a2a69
Chris Manton [Wed, 21 Oct 2020 07:42:39 +0000 (07:42 +0000)]
Remove never set #def BTIF_MIXED_MODE_INCLUDED am: 688b5a2a69

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

Change-Id: I54ec73251752c97718d4522940da468fff9cfda0

3 years agogd: Third entry gd acl shim am: 697d478004
Chris Manton [Wed, 21 Oct 2020 06:51:38 +0000 (06:51 +0000)]
gd: Third entry gd acl shim am: 697d478004

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

Change-Id: I51fea25854a9053ccd1aba839e5b63e0fcc27119

3 years agoUse stack/l2cap/l2c_link::l2c_packets_completed
Chris Manton [Wed, 7 Oct 2020 15:44:35 +0000 (08:44 -0700)]
Use stack/l2cap/l2c_link::l2c_packets_completed

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

Change-Id: I52ed1f0130500c516933b30ac28b029443ee53f4

3 years agoRe-log entry into stack/gatt/gatt_api::GATT_
Chris Manton [Mon, 19 Oct 2020 23:57:27 +0000 (16:57 -0700)]
Re-log entry into stack/gatt/gatt_api::GATT_

Towards readable code

Bug: 163134718
Tag: #refactor
Test: Compiled and passed basic functionality
Change-Id: I79e887df6f1ff67eab94d6eefb8b63f88273a77a

3 years agoRe-log stack/gap/gap_ble::client_connect_cback
Chris Manton [Mon, 19 Oct 2020 21:19:15 +0000 (14:19 -0700)]
Re-log stack/gap/gap_ble::client_connect_cback

Towards readable code

Bug: 163134718
Tag: #refactor
Test: Compiled and passed basic functionality

Change-Id: Ic1093dbfe77fd980fb8045bc0e16599a9978192c

3 years agoAdd stack/l2cap/l2c_link::l2c_packets_completed
Chris Manton [Wed, 7 Oct 2020 15:43:12 +0000 (08:43 -0700)]
Add stack/l2cap/l2c_link::l2c_packets_completed

Towards readable code

Bug: 163134718
Tag: #refactor
Test: Compiled and passed basic functionality

Change-Id: I956eb147794fee1f1c04c08853587891bfdf205b

3 years agoAdd stack/acl/ble_acl::acl_ble_enhanced_connection_complete_from_shim
Chris Manton [Mon, 19 Oct 2020 20:57:43 +0000 (13:57 -0700)]
Add stack/acl/ble_acl::acl_ble_enhanced_connection_complete_from_shim

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

Change-Id: I6b112841a85ad394223e98cc32f2661029a39f75

3 years agoRemove never set #def BTIF_MIXED_MODE_INCLUDED
Chris Manton [Sat, 17 Oct 2020 22:46:00 +0000 (15:46 -0700)]
Remove never set #def BTIF_MIXED_MODE_INCLUDED

Towards readable code

Bug: 163134718
Tag: #refactor
Test: Compiled and passed basic functionality

Change-Id: I37a71035318f104274768f9ce3c5746527f80d80