OSDN Git Service

android-x86/system-bt.git
4 years agoEliminate useless stack vars l2c_link_send_to_lower_ am: d76d774ea2
Chris Manton [Sun, 23 Aug 2020 16:34:49 +0000 (16:34 +0000)]
Eliminate useless stack vars l2c_link_send_to_lower_ am: d76d774ea2

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

Change-Id: Idfc7352f387c5a63b03da11b51b5ba908f887339

4 years agoUse acl data passing API am: ee555f6ded
Chris Manton [Sun, 23 Aug 2020 16:34:34 +0000 (16:34 +0000)]
Use acl data passing API am: ee555f6ded

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

Change-Id: If386d3a6e521ec533fd3626935b0fb7f48ebb322

4 years agoadd acl data passing API am: 98cb1c46e0
Chris Manton [Sun, 23 Aug 2020 16:34:32 +0000 (16:34 +0000)]
add acl data passing API am: 98cb1c46e0

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

Change-Id: I10d628f8a1e9aadd40606bc06d0552b7568c3869

4 years agoSmooth l2c_link_send_to_lower/br_edr and ble am: 438bbe6f6e
Chris Manton [Sun, 23 Aug 2020 16:34:31 +0000 (16:34 +0000)]
Smooth l2c_link_send_to_lower/br_edr and ble am: 438bbe6f6e

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

Change-Id: Ied18d747c2718db3b53eb9cdbadeba82b17e0e26

4 years agoStreamline l2c_link_send_to_lower/br_edr and ble am: 5f843c24f5
Chris Manton [Sun, 23 Aug 2020 16:34:30 +0000 (16:34 +0000)]
Streamline l2c_link_send_to_lower/br_edr and ble am: 5f843c24f5

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

Change-Id: I93a027333be6dc4ee614759c6be126e1ec7e5ce4

4 years agoBreak out l2c_link_send_to_lower into br_edr and ble am: f0c7c82eba
Chris Manton [Sun, 23 Aug 2020 16:34:28 +0000 (16:34 +0000)]
Break out l2c_link_send_to_lower into br_edr and ble am: f0c7c82eba

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

Change-Id: I39f6532327a909edeb936421e4f047e44e950605

4 years agoAdd const stack/l2cap/l2c_link::l2c_link_send_to_lower am: 4edcd50c43
Chris Manton [Sun, 23 Aug 2020 16:34:26 +0000 (16:34 +0000)]
Add const stack/l2cap/l2c_link::l2c_link_send_to_lower am: 4edcd50c43

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

Change-Id: Ib4f2583d095abda871fb1d931fb386a65400927e

4 years agoRemove def L2CAP_HCI_FLOW_CONTROL_DEBUG am: 49743f152b
Chris Manton [Sun, 23 Aug 2020 16:34:23 +0000 (16:34 +0000)]
Remove def L2CAP_HCI_FLOW_CONTROL_DEBUG am: 49743f152b

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

Change-Id: If85ebf7ee398b1a809177bef3b9c40a055d42846

4 years agoBreak out data passing events am: 67c21c423b
Chris Manton [Sun, 23 Aug 2020 16:34:22 +0000 (16:34 +0000)]
Break out data passing events am: 67c21c423b

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

Change-Id: I5866b5a90d7a0cc7f844268edb2f488117028b84

4 years agoRe-order conditional stack/l2cap/l2c_link::l2c_link_send_to_lower am: bdb4bc4d69
Chris Manton [Sun, 23 Aug 2020 16:34:19 +0000 (16:34 +0000)]
Re-order conditional stack/l2cap/l2c_link::l2c_link_send_to_lower am: bdb4bc4d69

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

Change-Id: Ib97b5dd762aa2aa4ab6e9ac4ac936b0e6447bff4

4 years agoGroup controller acccess stack/l2cap/l2c_link::l2c_link_send_to_lower am: 1c3bc9cc69
Chris Manton [Sun, 23 Aug 2020 16:34:16 +0000 (16:34 +0000)]
Group controller acccess stack/l2cap/l2c_link::l2c_link_send_to_lower am: 1c3bc9cc69

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

Change-Id: Iad28310f46f52e943d83407778d2879ae4834a95

4 years agoColocate dec/def stack/l2cap/l2c_link::l2c_link_send_to_lower am: bd07b7ee83
Chris Manton [Sun, 23 Aug 2020 16:34:14 +0000 (16:34 +0000)]
Colocate dec/def stack/l2cap/l2c_link::l2c_link_send_to_lower am: bd07b7ee83

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

Change-Id: I6fb94921500c84c23d11e4ffdb8e92bf10e1822f

4 years agoEliminate useless stack vars l2c_link_send_to_lower_
Chris Manton [Sun, 23 Aug 2020 01:29:55 +0000 (18:29 -0700)]
Eliminate useless stack vars l2c_link_send_to_lower_

xmit_window
acl_data_size

Towards readability

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I649b9d0fbcf16cacdbfac74cac0a414e50109202

4 years agoUse acl data passing API
Chris Manton [Sat, 22 Aug 2020 16:30:34 +0000 (09:30 -0700)]
Use acl data passing API

stack/l2cap/l2c_link::l2c_link_send_to_lower

Towards proper interfaces

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I0a31c891be3b1042d90fc17c3662d4e69b530648

4 years agoadd acl data passing API
Chris Manton [Sat, 22 Aug 2020 15:46:16 +0000 (08:46 -0700)]
add acl data passing API

stack/l2cap/l2c_link::l2c_link_send_to_lower

Towards proper interfaces

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

Change-Id: I48d067c679715e2fc6987347b92b8177fca9d512

4 years agoSmooth l2c_link_send_to_lower/br_edr and ble
Chris Manton [Sat, 22 Aug 2020 15:41:54 +0000 (08:41 -0700)]
Smooth l2c_link_send_to_lower/br_edr and ble

stack/l2cap/l2c_link::l2c_link_send_to_lower

Towards proper interfaces

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

Change-Id: Ia464ddf48f403d542f361b872c7c8a68c5de50af

4 years agoStreamline l2c_link_send_to_lower/br_edr and ble
Chris Manton [Sat, 22 Aug 2020 15:38:07 +0000 (08:38 -0700)]
Streamline l2c_link_send_to_lower/br_edr and ble

stack/l2cap/l2c_link::l2c_link_send_to_lower

Towards proper interfaces

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

Change-Id: I075af46d4f194fe44c5389b1ab5aa8341a3356ef

4 years agoBreak out l2c_link_send_to_lower into br_edr and ble
Chris Manton [Sat, 22 Aug 2020 15:31:48 +0000 (08:31 -0700)]
Break out l2c_link_send_to_lower into br_edr and ble

stack/l2cap/l2c_link::l2c_link_send_to_lower

Towards proper interfaces

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

Change-Id: Ia8c833a0ab806429743bd974d595cc102b738c5c

4 years agoAdd const stack/l2cap/l2c_link::l2c_link_send_to_lower
Chris Manton [Sat, 22 Aug 2020 15:26:49 +0000 (08:26 -0700)]
Add const stack/l2cap/l2c_link::l2c_link_send_to_lower

Pull out fit-in-buffer conditions

Towards proper interfaces

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

Change-Id: I861f7dc5eef2ee032a8e08c681ee5f18c7b5d277

4 years agoRemove def L2CAP_HCI_FLOW_CONTROL_DEBUG
Chris Manton [Fri, 21 Aug 2020 22:35:08 +0000 (15:35 -0700)]
Remove def L2CAP_HCI_FLOW_CONTROL_DEBUG

Towards readability

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I43cc934c5b0aabf5c1d05bf906277af3b52db5d0

4 years agoBreak out data passing events
Chris Manton [Fri, 21 Aug 2020 22:23:58 +0000 (15:23 -0700)]
Break out data passing events

Towards readability

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I2fe1987d46c660d7c9407a896c25961649533b6b

4 years agoRe-order conditional stack/l2cap/l2c_link::l2c_link_send_to_lower
Chris Manton [Fri, 21 Aug 2020 20:49:26 +0000 (13:49 -0700)]
Re-order conditional stack/l2cap/l2c_link::l2c_link_send_to_lower

Towards readability

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I5f893d86c383c871051aa550d75f17ead8143585

4 years agoGroup controller acccess stack/l2cap/l2c_link::l2c_link_send_to_lower
Chris Manton [Fri, 21 Aug 2020 17:17:44 +0000 (10:17 -0700)]
Group controller acccess stack/l2cap/l2c_link::l2c_link_send_to_lower

Also add transport and link_xmit_quota

Towards proper interfaces

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Idcb98de26e07174dbe1732ce048cf96cefaa60c5

4 years agoColocate dec/def stack/l2cap/l2c_link::l2c_link_send_to_lower
Chris Manton [Fri, 21 Aug 2020 17:08:52 +0000 (10:08 -0700)]
Colocate dec/def stack/l2cap/l2c_link::l2c_link_send_to_lower

Towards proper interfaces

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I63693185bf9450ef94de4863d90bda1ef6315ee8

4 years agoMerge "GD-Cert: Override parameters during cert test" am: e1aad0ff93
Treehugger Robot [Sat, 22 Aug 2020 02:01:31 +0000 (02:01 +0000)]
Merge "GD-Cert: Override parameters during cert test" am: e1aad0ff93

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

Change-Id: I862ec8fd973be68dd8f468d49745f4808530c9fa

4 years agoMerge "GD-Cert: Override parameters during cert test"
Treehugger Robot [Sat, 22 Aug 2020 01:35:39 +0000 (01:35 +0000)]
Merge "GD-Cert: Override parameters during cert test"

4 years agoRefactor: Fix BT device name length issue am: 624c787a77
xiaoshun.xu [Sat, 22 Aug 2020 01:15:00 +0000 (01:15 +0000)]
Refactor: Fix BT device name length issue am: 624c787a77

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

Change-Id: Id27936b443e58edc6878de983494741ecb9c8d75

4 years agoGD-Cert: Override parameters during cert test
Jack He [Fri, 21 Aug 2020 23:46:19 +0000 (16:46 -0700)]
GD-Cert: Override parameters during cert test

* Allow overriding system properties and paramters
  at runtime
* Override them into right values during cert testing to
  allow output collection

Bug: 165828962
Test: gd/cert/run --host
Tag: #gd-refactor
Change-Id: I1ebc8058cdb57eaa5442278f535e3750eec9dbad

4 years agoRefactor: Fix BT device name length issue
xiaoshun.xu [Tue, 18 Aug 2020 17:57:09 +0000 (01:57 +0800)]
Refactor: Fix BT device name length issue

BT device name only show 247bytes on settings, it supposed to show
248bytes if local device and remote device have 248bytes' name.
Increasing the argument passed to function strlcpy&memcpy bt 1
will resolve the issue.

Tag: #refactor
Bug: 162480697
Sponsor: mylesgw
Test: cert/run --host
Change-Id: Ib3fa7d78e39f0a9330658f9ce2b4a67003d7114d

4 years agoMerge changes Iddb20c40,Iddc3cd02 am: b5fc1d92bb
Treehugger Robot [Fri, 21 Aug 2020 22:31:14 +0000 (22:31 +0000)]
Merge changes Iddb20c40,Iddc3cd02 am: b5fc1d92bb

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

Change-Id: I088919d1f00151d7e787a6d92412d267e4fbc573

4 years agoMerge changes Iddb20c40,Iddc3cd02
Treehugger Robot [Fri, 21 Aug 2020 22:06:38 +0000 (22:06 +0000)]
Merge changes Iddb20c40,Iddc3cd02

* changes:
  GD-HCI: Send original command instead of status packet upwards
  BTM-PM: Get rid of BTM_PM_DEBUG flag

4 years agoGD-HCI: Send original command instead of status packet upwards
Jack He [Fri, 21 Aug 2020 20:29:20 +0000 (13:29 -0700)]
GD-HCI: Send original command instead of status packet upwards

* Legacy stack expects original command when command status is available
* Add verbose logging for command complete and command status
* Wrap pending command in OsiObject so that it can be auto-freed by
  C++ unique_ptr

Bug: 165181021
Test: make, flash, test A2DP and HFP
Tag: #gd-refactor
Change-Id: Iddb20c405dc2f0326de53d3531464cbba65d6076

4 years agoBTM-PM: Get rid of BTM_PM_DEBUG flag
Jack He [Fri, 21 Aug 2020 06:18:18 +0000 (23:18 -0700)]
BTM-PM: Get rid of BTM_PM_DEBUG flag

* Instead of using a build time flag, use a LOG_VERBOSE
  to control the verbosity of BTM power manager logs
* Add more logging on error paths

Bug: 165181021
Test: make
Tag: #refactor
Change-Id: Iddc3cd025c2078ade4d7dd9d608a8e64b0987034

4 years agoMerge "InternalEnforceSecurityPolicy: Check if record is temporary" am: abfca966cc
Treehugger Robot [Fri, 21 Aug 2020 20:05:18 +0000 (20:05 +0000)]
Merge "InternalEnforceSecurityPolicy: Check if record is temporary" am: abfca966cc

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

Change-Id: I607f3274440886b1082a0bc7c71ad5bdf52fda82

4 years agoMerge "InternalEnforceSecurityPolicy: Check if record is temporary"
Treehugger Robot [Fri, 21 Aug 2020 19:58:22 +0000 (19:58 +0000)]
Merge "InternalEnforceSecurityPolicy: Check if record is temporary"

4 years agoMerge changes I7eb89883,I93295962,I3ffe28ef,Ice072495,Iba166d9a, ... am: f37124363b
Treehugger Robot [Fri, 21 Aug 2020 19:48:07 +0000 (19:48 +0000)]
Merge changes I7eb89883,I93295962,I3ffe28ef,Ice072495,Iba166d9a, ... am: f37124363b

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

Change-Id: I3c8ccca4915df7d78f506ee037ebaf156760cbd9

4 years agoMerge changes I7eb89883,I93295962,I3ffe28ef,Ice072495,Iba166d9a, ...
Treehugger Robot [Fri, 21 Aug 2020 19:33:10 +0000 (19:33 +0000)]
Merge changes I7eb89883,I93295962,I3ffe28ef,Ice072495,Iba166d9a, ...

* changes:
  Simplify stack/l2cap/l2c_utils::l2cu_create_conn_br_edr
  Simplify stack/l2cap/l2c_link::l2c_link_role_changed
  Remove poor placement for SCN from tACL_CB
  add stack/btm/btm_scn
  Add tBTM_CB::btm_scn[BTM_MAX_SCN_]
  Simplify stack/l2cap/l2c_utils::l2cu_adj_id
  Precisely name tL2C_CB::tL2C_LCB::id
  Remove tL2C_CB::tL2C_LCB::info_rx_bits
  Encapsulate tL2C_CB::tL2C_LCB::link_flush_tout_
  Precisely name tL2C_CB::num_used_lcbs
  Encapsulate tL2C_CB::tL2C_LCB::disc_reason
  Remove set-once-never-execute l2cb.is_flush_active

4 years agoMerge "Clear advertising cache if bad advertisement is received" am: 9ee4839847
Treehugger Robot [Fri, 21 Aug 2020 18:46:56 +0000 (18:46 +0000)]
Merge "Clear advertising cache if bad advertisement is received" am: 9ee4839847

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

Change-Id: I913dbe7a39c45cb33bef3e5490f765230f4b79a9

4 years agoInternalEnforceSecurityPolicy: Check if record is temporary
Hansong Zhang [Wed, 19 Aug 2020 23:41:21 +0000 (16:41 -0700)]
InternalEnforceSecurityPolicy: Check if record is temporary

If we want AUTHENTICATED_ENCRYPTED_TRANSPORT, temporary link key is not
sufficient.  Pair again.

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

4 years agoMerge "Clear advertising cache if bad advertisement is received"
Treehugger Robot [Fri, 21 Aug 2020 18:14:10 +0000 (18:14 +0000)]
Merge "Clear advertising cache if bad advertisement is received"

4 years agoClear advertising cache if bad advertisement is received
Henrik Davidsen [Thu, 20 Aug 2020 11:23:01 +0000 (12:23 +0100)]
Clear advertising cache if bad advertisement is received

Cache of advertisements from a device was not cleared if a bad
extended advertisement was received which caused that new
advertisements from same device address was rejected as invalid.

Tag: #stability
Test: receive malformed advertisement
Signed-off-by: Henrik Davidsen <h.davidsen@samsung.com>
Change-Id: If07010954fef235b696c8a120026934a7aeadcb5

4 years agoMerge "GD Security: Improve Enforce() workflow" am: cd7786f840
Treehugger Robot [Fri, 21 Aug 2020 17:31:25 +0000 (17:31 +0000)]
Merge "GD Security: Improve Enforce() workflow" am: cd7786f840

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

Change-Id: Ia7864cf1ed6c0bb07cb76d9f4a3f1ca2a8059e8b

4 years agoMerge "GD Security: Improve Enforce() workflow"
Treehugger Robot [Fri, 21 Aug 2020 17:15:26 +0000 (17:15 +0000)]
Merge "GD Security: Improve Enforce() workflow"

4 years agoSimplify stack/l2cap/l2c_utils::l2cu_create_conn_br_edr
Chris Manton [Tue, 18 Aug 2020 03:50:27 +0000 (20:50 -0700)]
Simplify stack/l2cap/l2c_utils::l2cu_create_conn_br_edr

Towards proper interfaces

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I7eb89883f5289bc89692e26c6f290f42f609009c

4 years agoSimplify stack/l2cap/l2c_link::l2c_link_role_changed
Chris Manton [Tue, 18 Aug 2020 04:38:01 +0000 (21:38 -0700)]
Simplify stack/l2cap/l2c_link::l2c_link_role_changed

Towards proper interfaces

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I93295962cedb99ce46fb23489649eec445fc540a

4 years agoRemove poor placement for SCN from tACL_CB
Chris Manton [Tue, 18 Aug 2020 23:06:34 +0000 (16:06 -0700)]
Remove poor placement for SCN from tACL_CB

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I3ffe28efe945cfc8a9abc3c96d790827625b0281

4 years agoadd stack/btm/btm_scn
Chris Manton [Tue, 18 Aug 2020 22:57:04 +0000 (15:57 -0700)]
add stack/btm/btm_scn

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

Change-Id: Ice072495e981d02bfc5cbd6dce18436165b28f0d

4 years agoAdd tBTM_CB::btm_scn[BTM_MAX_SCN_]
Chris Manton [Tue, 18 Aug 2020 22:42:53 +0000 (15:42 -0700)]
Add tBTM_CB::btm_scn[BTM_MAX_SCN_]

To be moved out of tACL_CB

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Iba166d9a8576f910a8406864a5d5d0e9faffce72

4 years agoSimplify stack/l2cap/l2c_utils::l2cu_adj_id
Chris Manton [Fri, 21 Aug 2020 15:42:35 +0000 (08:42 -0700)]
Simplify stack/l2cap/l2c_utils::l2cu_adj_id

The first term in the condition is always true

Towards proper interfaces

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ib96d78cbaef78450eee30b1aa8291506d4161c5c

4 years agoPrecisely name tL2C_CB::tL2C_LCB::id
Chris Manton [Fri, 21 Aug 2020 15:38:58 +0000 (08:38 -0700)]
Precisely name tL2C_CB::tL2C_LCB::id

Signalling id

Towards proper interfaces

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I0233757a9a74479f8b5d6b34c558a257b70977bd

4 years agoRemove tL2C_CB::tL2C_LCB::info_rx_bits
Chris Manton [Fri, 21 Aug 2020 15:17:21 +0000 (08:17 -0700)]
Remove tL2C_CB::tL2C_LCB::info_rx_bits

Write once; read never

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I53690a990985b7aaeb7570326f9726cb644a66e0

4 years agoEncapsulate tL2C_CB::tL2C_LCB::link_flush_tout_
Chris Manton [Fri, 21 Aug 2020 15:09:43 +0000 (08:09 -0700)]
Encapsulate tL2C_CB::tL2C_LCB::link_flush_tout_

Towards proper interfaces

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ic8d6f5712129031bd16510d7ba745ae19afbce77

4 years agoPrecisely name tL2C_CB::num_used_lcbs
Chris Manton [Fri, 21 Aug 2020 04:56:23 +0000 (21:56 -0700)]
Precisely name tL2C_CB::num_used_lcbs

From: tL2C_CB::tL2C_LCB::num_links_active

Towards proper interfaces

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I053469981e035493bc37de98fb44123622618859

4 years agoEncapsulate tL2C_CB::tL2C_LCB::disc_reason
Chris Manton [Fri, 21 Aug 2020 04:29:48 +0000 (21:29 -0700)]
Encapsulate tL2C_CB::tL2C_LCB::disc_reason

Towards proper interfaces

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I475eb9127e50dc58b7a0bc8f6f269db9ab63a94a

4 years agoRemove set-once-never-execute l2cb.is_flush_active
Chris Manton [Fri, 21 Aug 2020 04:46:54 +0000 (21:46 -0700)]
Remove set-once-never-execute l2cb.is_flush_active

Towards proper interfaces

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I8a5d32e2d190fd11bba2f8b70020730681ca881f

4 years agoFix address passing when we accept incoming connection am: 4354abb3ed
Jakub Pawlowski [Fri, 21 Aug 2020 07:27:09 +0000 (07:27 +0000)]
Fix address passing when we accept incoming connection am: 4354abb3ed

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

Change-Id: I40de75420e7df4499ec6341869d31c3dea2ccd7d

4 years agoFix address passing when we accept incoming connection
Jakub Pawlowski [Fri, 24 Jul 2020 10:58:56 +0000 (12:58 +0200)]
Fix address passing when we accept incoming connection

Tag: #gd-refactor
Bug: 155399771
Test: gd/cert/run --host LeSecurityTest
Change-Id: I21ceb49fe1b69e447e3d2e282db5d02b7a0c1bfe

4 years agoGD Security: Improve Enforce() workflow
Hansong Zhang [Wed, 19 Aug 2020 21:52:53 +0000 (14:52 -0700)]
GD Security: Improve Enforce() workflow

InternalEnforceSecurityPolicy establishes the requirement
- ENCRYPTED_TRANSPORT: If paired but not encrypted, just wait for
  encryption change; if unpaired, pair with NO_BOND_NO_MITM
- AUTHENTICATED_ENCRYPTED_TRANSPORT: Similar as above, but we need to
  pair again if existing LK is not authenticated. Exception: If no MITM
  is needed during pairing, we assume authenticated LK is not possible,
  so we allow connection. In the future, use IO cap to check.

When link is encrypted, or new pairing is complete, we invoke
UpdateLinkSecurityCondition.

Test: cert/run --host
Test: CtsVerifier Insecure RFCOMM client
Tag: #gd-refactor
Bug: 141555841
Change-Id: Ic5792c8e967cd068e08df4702393ae3188c6d4e8

4 years agoMerge "AclManager: Handle default data length" am: 3eeb3f9a47
Treehugger Robot [Thu, 20 Aug 2020 22:35:04 +0000 (22:35 +0000)]
Merge "AclManager: Handle default data length" am: 3eeb3f9a47

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

Change-Id: Ibe08664b9b564811d097fc9254bfbd78460216b2

4 years agoMerge "Remove unused API" am: 321029a933
Treehugger Robot [Thu, 20 Aug 2020 22:34:58 +0000 (22:34 +0000)]
Merge "Remove unused API" am: 321029a933

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

Change-Id: I45b93527625fce65cde9f9e97a5b19fa2eb8a417

4 years agoMerge changes I4b15d054,Id53d86f3,Icc604d09,Ib19ee20d,I550d96d1, ... am: 6c68f8edaa
Treehugger Robot [Thu, 20 Aug 2020 22:34:52 +0000 (22:34 +0000)]
Merge changes I4b15d054,Id53d86f3,Icc604d09,Ib19ee20d,I550d96d1, ... am: 6c68f8edaa

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

Change-Id: I57b3e63ea7dbd90fd9e457e391c2a6425ff439a1

4 years agoMerge "AclManager: Handle default data length"
Treehugger Robot [Thu, 20 Aug 2020 22:20:44 +0000 (22:20 +0000)]
Merge "AclManager: Handle default data length"

4 years agoMerge "Remove unused API"
Treehugger Robot [Thu, 20 Aug 2020 22:18:42 +0000 (22:18 +0000)]
Merge "Remove unused API"

4 years agoMerge changes I4b15d054,Id53d86f3,Icc604d09,Ib19ee20d,I550d96d1, ...
Treehugger Robot [Thu, 20 Aug 2020 21:08:21 +0000 (21:08 +0000)]
Merge changes I4b15d054,Id53d86f3,Icc604d09,Ib19ee20d,I550d96d1, ...

* changes:
  Unify def tBTM_SEC_CBACK=>tBTM_SEC_CALLBACK
  Simplify stack/acl/btm_acl::btm_acl_created()
  Removed unused tACL_CONN fields
  Use API stack/acl/btm_acl
  Add APIs to stack/acl/btm_acl
  Use API stack/acl/btm_acl::btm_acl_connection_request
  Add API stack/acl/btm_acl::btm_acl_connection_request
  Wrap tL2C_LCB::link_role in API
  Rename btm_dev_support_switch
  Streamline stack/btm/btm_dev::btm_dev_support_switch
  Replace BTM_ACL_PKT_TYPES_MASK_

4 years agoMerge changes I1aa0ab27,Ice003a60 am: 05a62c110f
Jakub Pawlowski [Thu, 20 Aug 2020 20:25:50 +0000 (20:25 +0000)]
Merge changes I1aa0ab27,Ice003a60 am: 05a62c110f

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

Change-Id: I84ededccd9010746a66c47ba17f67dc1b434b950

4 years agoRemove unused API
Hansong Zhang [Thu, 20 Aug 2020 18:31:07 +0000 (11:31 -0700)]
Remove unused API

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

4 years agoMerge changes I1aa0ab27,Ice003a60
Jakub Pawlowski [Thu, 20 Aug 2020 20:16:20 +0000 (20:16 +0000)]
Merge changes I1aa0ab27,Ice003a60

* changes:
  hci: Add Broadcast Isochronous Sets related commands
  hci: Add additional iso related commands

4 years agoUnify def tBTM_SEC_CBACK=>tBTM_SEC_CALLBACK
Chris Manton [Thu, 20 Aug 2020 17:39:23 +0000 (10:39 -0700)]
Unify def tBTM_SEC_CBACK=>tBTM_SEC_CALLBACK

The names were aliases to each other

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I4b15d054adc53b0e13f916fc08dcaf17c91d6008

4 years agoSimplify stack/acl/btm_acl::btm_acl_created()
Chris Manton [Tue, 18 Aug 2020 17:34:35 +0000 (10:34 -0700)]
Simplify stack/acl/btm_acl::btm_acl_created()

Remove copy once/read never fields:
DEV_CLASS
BD_NAME

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Id53d86f370777cc999c4a060aa99a87edd2eb08c

4 years agoRemoved unused tACL_CONN fields
Chris Manton [Tue, 18 Aug 2020 17:25:30 +0000 (10:25 -0700)]
Removed unused tACL_CONN fields

tACL_CONN::BD_NAME
tACL_CONN::DEV_CLASS

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Icc604d09c9ca5e5ca30d6af622214f2580437f3a

4 years agoUse API stack/acl/btm_acl
Chris Manton [Thu, 20 Aug 2020 16:54:12 +0000 (09:54 -0700)]
Use API stack/acl/btm_acl

Towards proper interfaces

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ib19ee20ddf598ba0bf1d74a12a5686d7558f2fce

4 years agoAdd APIs to stack/acl/btm_acl
Chris Manton [Thu, 20 Aug 2020 16:35:52 +0000 (09:35 -0700)]
Add APIs to stack/acl/btm_acl

acl_accept_connection_request
acl_reject_connection_request

Towards proper interfaces

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I550d96d1dc04b5576996db919def6580c9a947d1

4 years agoUse API stack/acl/btm_acl::btm_acl_connection_request
Chris Manton [Thu, 20 Aug 2020 16:17:37 +0000 (09:17 -0700)]
Use API stack/acl/btm_acl::btm_acl_connection_request

Towards proper interfaces

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ie02b35f15f6e773b6f6a793c33b675f2208865fe

4 years agoAdd API stack/acl/btm_acl::btm_acl_connection_request
Chris Manton [Thu, 20 Aug 2020 15:59:29 +0000 (08:59 -0700)]
Add API stack/acl/btm_acl::btm_acl_connection_request

Towards proper interfaces

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Iaa2bc3870b87b1394ed7363afa0827b93a9bb2ca

4 years agoWrap tL2C_LCB::link_role in API
Chris Manton [Thu, 20 Aug 2020 15:48:32 +0000 (08:48 -0700)]
Wrap tL2C_LCB::link_role in API

Towards proper interfaces

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I4a10763a8107f0a9dbc0ddf62d0671fe9b41a63f

4 years agoRename btm_dev_support_switch
Chris Manton [Mon, 17 Aug 2020 22:00:19 +0000 (15:00 -0700)]
Rename btm_dev_support_switch

=>btm_dev_support_role_switch

Streamline stack/btm/btm_dev::btm_dev_support_switch

Bug: 162984360
Tag: #refactor
Test: compiles and devices pair and work
Change-Id: I529006c587b67c6545656febc5a5f2b1daabe186

4 years agoStreamline stack/btm/btm_dev::btm_dev_support_switch
Chris Manton [Mon, 17 Aug 2020 21:32:08 +0000 (14:32 -0700)]
Streamline stack/btm/btm_dev::btm_dev_support_switch

Bug: 162984360
Tag: #refactor
Test: compiles and devices pair and work

Change-Id: I838a258471b484c29dc3828e1c940065451a10b0

4 years agoReplace BTM_ACL_PKT_TYPES_MASK_
Chris Manton [Sun, 16 Aug 2020 18:27:01 +0000 (11:27 -0700)]
Replace BTM_ACL_PKT_TYPES_MASK_

BTM_ACL_PKT_TYPES_MASK_DM1=>HCI_PKT_TYPES_MASK_DM1
BTM_ACL_PKT_TYPES_MASK_DH1=>HCI_PKT_TYPES_MASK_DH1
BTM_ACL_PKT_TYPES_MASK_DM3=>HCI_PKT_TYPES_MASK_DM3
BTM_ACL_PKT_TYPES_MASK_DH3=>HCI_PKT_TYPES_MASK_DH3
BTM_ACL_PKT_TYPES_MASK_DM5=>HCI_PKT_TYPES_MASK_DM5
BTM_ACL_PKT_TYPES_MASK_DH5=>HCI_PKT_TYPES_MASK_DH5
BTM_ACL_PKT_TYPES_MASK_NO_2_DH1=>HCI_PKT_TYPES_MASK_NO_2_DH1
BTM_ACL_PKT_TYPES_MASK_NO_3_DH1=>HCI_PKT_TYPES_MASK_NO_3_DH1
BTM_ACL_PKT_TYPES_MASK_NO_2_DH3=>HCI_PKT_TYPES_MASK_NO_2_DH3
BTM_ACL_PKT_TYPES_MASK_NO_3_DH3=>HCI_PKT_TYPES_MASK_NO_3_DH3
BTM_ACL_PKT_TYPES_MASK_NO_2_DH5=>HCI_PKT_TYPES_MASK_NO_2_DH5
BTM_ACL_PKT_TYPES_MASK_NO_3_DH5=>HCI_PKT_TYPES_MASK_NO_3_DH5

Towards proper interfaces

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I6c1420266afdb584612cf96cbfae32d437a83a90

4 years agoMerge changes Icedbc393,I396b7959 am: 180041861a
Treehugger Robot [Thu, 20 Aug 2020 18:27:34 +0000 (18:27 +0000)]
Merge changes Icedbc393,I396b7959 am: 180041861a

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

Change-Id: I4a71138fb8424378a0ba9a4189588208ce0c9466

4 years agoMerge changes Icedbc393,I396b7959
Treehugger Robot [Thu, 20 Aug 2020 18:19:52 +0000 (18:19 +0000)]
Merge changes Icedbc393,I396b7959

* changes:
  Check for MITM required.
  Fall back to local AuthenticationRequirements to set values

4 years agoAclManager: Handle default data length
Myles Watson [Wed, 19 Aug 2020 06:26:22 +0000 (23:26 -0700)]
AclManager: Handle default data length

Bug: 145832107
Test: cert/run --host
Tag: #gd-refactor
Change-Id: I851f22db86687801232621e738deeecf2df51834

4 years agop_auth_complete_callback is no-op for HCI_SUCCESS case am: 31ecf7784a
Hansong Zhang [Thu, 20 Aug 2020 17:16:48 +0000 (17:16 +0000)]
p_auth_complete_callback is no-op for HCI_SUCCESS case am: 31ecf7784a

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

Change-Id: I734ca7cd44d3b63edc70c31e937625a41778a265

4 years agoMerge "Ensure IO Cap Response received before processing UserConfirmationRequest...
Treehugger Robot [Thu, 20 Aug 2020 17:16:37 +0000 (17:16 +0000)]
Merge "Ensure IO Cap Response received before processing UserConfirmationRequest" am: a63b1eef93

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

Change-Id: I95e24d14e9ecf6fe1f2e869dcb685335cffdac2c

4 years agop_auth_complete_callback is no-op for HCI_SUCCESS case
Hansong Zhang [Thu, 20 Aug 2020 07:56:47 +0000 (00:56 -0700)]
p_auth_complete_callback is no-op for HCI_SUCCESS case

Remove.

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

4 years agoMerge "Ensure IO Cap Response received before processing UserConfirmationRequest"
Treehugger Robot [Thu, 20 Aug 2020 17:09:36 +0000 (17:09 +0000)]
Merge "Ensure IO Cap Response received before processing UserConfirmationRequest"

4 years agoMerge changes I83637165,I4af96edd,I8e0ef282,I6bd6f659,I25e6810c, ... am: 7b5c5cba7d
Treehugger Robot [Thu, 20 Aug 2020 17:03:37 +0000 (17:03 +0000)]
Merge changes I83637165,I4af96edd,I8e0ef282,I6bd6f659,I25e6810c, ... am: 7b5c5cba7d

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

Change-Id: Icf865fd9bff51b9a20c358624c1190664a2ae951

4 years agoMerge changes I83637165,I4af96edd,I8e0ef282,I6bd6f659,I25e6810c, ...
Treehugger Robot [Thu, 20 Aug 2020 16:40:08 +0000 (16:40 +0000)]
Merge changes I83637165,I4af96edd,I8e0ef282,I6bd6f659,I25e6810c, ...

* changes:
  Wrap l2c::IsBonding in API
  Streamline includes stack/l2cap/l2c_link
  Move l2cu_get_next_buffer_to_send
  Move stack/l2cap/::l2cu_get_next_channel_in_rr
  Remove def L2CAP_ROUND_ROBIN_CHANNEL_SERVICE
  Remove def L2CAP_NUM_FIXED_CHNLS Optimization

4 years agostack/btm: Support Reading Peer SCA am: b59379b6ca
Jakub Tyszkowski [Thu, 20 Aug 2020 15:54:31 +0000 (15:54 +0000)]
stack/btm: Support Reading Peer SCA am: b59379b6ca

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

Change-Id: I006399ccfb41410ecd7af32502ee2fa230894c2e

4 years agohci: Add Broadcast Isochronous Sets related commands
Grzegorz Kołodziejczyk [Tue, 11 Aug 2020 12:59:41 +0000 (14:59 +0200)]
hci: Add Broadcast Isochronous Sets related commands

This is required for audio broadcaster functionality.

Bug: 150670922
Tag: #feature
Sponsor: jpawlowski@
Test: compilation
Change-Id: I1aa0ab271e188f70eda579f212e6870557cef7e5

4 years agohci: Add additional iso related commands
Grzegorz Kołodziejczyk [Tue, 11 Aug 2020 13:07:19 +0000 (15:07 +0200)]
hci: Add additional iso related commands

These are not necessary for the upcoming le audio implementation
but may become useful in near future.

Bug: 150670922
Tag: #feature
Sponsor: jpawlowski@
Test: compilation
Change-Id: Ice003a604da44d5430b6b356e6f16d0fcbdf1873

4 years agoWrap l2c::IsBonding in API
Chris Manton [Thu, 20 Aug 2020 06:04:53 +0000 (23:04 -0700)]
Wrap l2c::IsBonding in API

Towards proper interfaces

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I8363716501145101ea025bd44aa35fa7f870b2eb

4 years agoStreamline includes stack/l2cap/l2c_link
Chris Manton [Thu, 20 Aug 2020 00:50:06 +0000 (17:50 -0700)]
Streamline includes stack/l2cap/l2c_link

Towards proper interfaces

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I4af96eddeb1dd30d10b766df1f617b4381a4e2f3

4 years agoMove l2cu_get_next_buffer_to_send
Chris Manton [Thu, 20 Aug 2020 00:23:45 +0000 (17:23 -0700)]
Move l2cu_get_next_buffer_to_send

From: stack/l2cap/l2c_utils
Into: stack/l2cap/l2c_link

Towards proper interfaces

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

Change-Id: I8e0ef282d5bae9a0deb0e465b326d7889d67d5e8

4 years agoMove stack/l2cap/::l2cu_get_next_channel_in_rr
Chris Manton [Thu, 20 Aug 2020 00:27:41 +0000 (17:27 -0700)]
Move stack/l2cap/::l2cu_get_next_channel_in_rr

From: stack/l2cap/l2c_utils
Into: stack/l2cap/l2c_link

Towards proper interfaces

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I6bd6f659d312c893564de7d3c07d429d38da76a8

4 years agoRemove def L2CAP_ROUND_ROBIN_CHANNEL_SERVICE
Chris Manton [Wed, 19 Aug 2020 23:40:24 +0000 (16:40 -0700)]
Remove def L2CAP_ROUND_ROBIN_CHANNEL_SERVICE

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I25e6810c157914ebca1d5d135394f70c4f3ffdaf

4 years agoRemove def L2CAP_NUM_FIXED_CHNLS Optimization
Chris Manton [Wed, 19 Aug 2020 23:10:27 +0000 (16:10 -0700)]
Remove def L2CAP_NUM_FIXED_CHNLS Optimization

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Idbfc3b0dd32cdb6161b38f8436e4b5d3a89b6d0a

4 years agoMerge "btm: Initial Iso Manager implementation" am: c55a0e8f0e
Jakub Pawlowski [Thu, 20 Aug 2020 12:42:35 +0000 (12:42 +0000)]
Merge "btm: Initial Iso Manager implementation" am: c55a0e8f0e

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

Change-Id: I0976ea5973aedda82619ee3bdd942e052322f069

4 years agostack/btm: Support Reading Peer SCA
Jakub Tyszkowski [Tue, 18 Aug 2020 11:15:55 +0000 (13:15 +0200)]
stack/btm: Support Reading Peer SCA

Bug: 150670922
Tag: #feature
Sponsor: jpawlowski@
Test: compilation
Change-Id: Ia65d8aea66850a780909c240291934ea668cb6ea

4 years agoMerge "btm: Initial Iso Manager implementation"
Jakub Pawlowski [Thu, 20 Aug 2020 12:33:38 +0000 (12:33 +0000)]
Merge "btm: Initial Iso Manager implementation"

4 years agoMerge "GD-HCI: Flush snoop log to kernel buffer on every write" am: e3a5239a92
Treehugger Robot [Thu, 20 Aug 2020 11:49:21 +0000 (11:49 +0000)]
Merge "GD-HCI: Flush snoop log to kernel buffer on every write" am: e3a5239a92

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

Change-Id: Ib24868326ffa039734944a90f91d212f1501d3e2