OSDN Git Service

android-x86/system-bt.git
3 years agoSerialize L2CAP connect ind/cfm, config ind, cfm am: b737b6dcda am: 23615d56c8 am...
Hansong Zhang [Mon, 28 Sep 2020 22:03:49 +0000 (22:03 +0000)]
Serialize L2CAP connect ind/cfm, config ind, cfm am: b737b6dcda am: 23615d56c8 am: f2b0bbfe61

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

Change-Id: I646c9e27831f9fbde6ede9edbd7c174034eab0a5

3 years agoL2cap: Auto send ConnectRsp am: d8d7224c2e am: 1b00239503 am: 22e091bdec
Hansong Zhang [Mon, 28 Sep 2020 22:03:48 +0000 (22:03 +0000)]
L2cap: Auto send ConnectRsp am: d8d7224c2e am: 1b00239503 am: 22e091bdec

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

Change-Id: Ic904100b9355d60a6e320b8773868245597c0424

3 years agoCheck for control block nullptr on l2cap error am: d77658a680 am: 7a0ce3e74c am:...
Hansong Zhang [Mon, 28 Sep 2020 22:03:47 +0000 (22:03 +0000)]
Check for control block nullptr on l2cap error am: d77658a680 am: 7a0ce3e74c am: 91e5f57877

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

Change-Id: I369e4d631e4463303b8058f88ad20f75ab4c4869

3 years agoL2cap channel cb: Store who initiated dynamic channel am: 7bfe49749a am: d1b11fe61f...
Hansong Zhang [Mon, 28 Sep 2020 22:03:46 +0000 (22:03 +0000)]
L2cap channel cb: Store who initiated dynamic channel am: 7bfe49749a am: d1b11fe61f am: b2065b15d3

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

Change-Id: Id140a3345f73d1fcc461db2222875c7a8dbe5328

3 years agoWe always send pL2CA_ConfigCfm_Cb with status OK am: 40b23cc4ab am: 1bb6f231ce am...
Hansong Zhang [Mon, 28 Sep 2020 22:03:45 +0000 (22:03 +0000)]
We always send pL2CA_ConfigCfm_Cb with status OK am: 40b23cc4ab am: 1bb6f231ce am: e2b2f0ab37

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

Change-Id: Ice3d5df0f95b8904621541d657e40009807f24b6

3 years agoL2cap shim clean up am: ee79913590 am: 6ca4f683bd am: 572ed18ef8
Hansong Zhang [Mon, 28 Sep 2020 22:03:44 +0000 (22:03 +0000)]
L2cap shim clean up am: ee79913590 am: 6ca4f683bd am: 572ed18ef8

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

Change-Id: Iace9796ada5cb3048531d50689717313967fbe54

3 years agoL2CAP_FLUSHABLE_PKT is never used am: 6b63057385 am: 6c7a566cd4 am: 79bf67498a
Hansong Zhang [Mon, 28 Sep 2020 22:03:43 +0000 (22:03 +0000)]
L2CAP_FLUSHABLE_PKT is never used am: 6b63057385 am: 6c7a566cd4 am: 79bf67498a

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

Change-Id: I63df4eaffc6fc76b50a8443c92aa908a011eef41

3 years agoMinor clean up in l2c_api am: 324f7e9cec am: adc9e08a37 am: e329fba87d
Hansong Zhang [Mon, 28 Sep 2020 22:03:42 +0000 (22:03 +0000)]
Minor clean up in l2c_api am: 324f7e9cec am: adc9e08a37 am: e329fba87d

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

Change-Id: I05aa766112e6f0661f685c351b72b12a0a2ba3d7

3 years agoL2cap: Simplify DisconnectRsp am: 014930dadc am: fe33b32020 am: f04645054c
Hansong Zhang [Mon, 28 Sep 2020 22:03:41 +0000 (22:03 +0000)]
L2cap: Simplify DisconnectRsp am: 014930dadc am: fe33b32020 am: f04645054c

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

Change-Id: I5110e92c0284e9ccaeb4879e7c3fd4aefa6fe0fb

3 years agoRemove unused L2cap code am: 2d291bead0 am: f56c1b1e0a am: ee9b12cbc6
Hansong Zhang [Mon, 28 Sep 2020 22:03:01 +0000 (22:03 +0000)]
Remove unused L2cap code am: 2d291bead0 am: f56c1b1e0a am: ee9b12cbc6

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

Change-Id: Ifadf45c4fc32eb3921666754d837164f0be848ed

3 years agoSimplify avdt_sec_check_complete_term am: 1d6fa5e136 am: 41cb6069c9 am: 4d1656d1ea
Hansong Zhang [Mon, 28 Sep 2020 22:02:58 +0000 (22:02 +0000)]
Simplify avdt_sec_check_complete_term am: 1d6fa5e136 am: 41cb6069c9 am: 4d1656d1ea

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

Change-Id: I308d2990de91b66bd32d32551bca5e58ef26a851

3 years agoSimplify bnep_sec_check_complete am: 86fbde4a5e am: e96b0443a4 am: 57455d8f4d
Hansong Zhang [Mon, 28 Sep 2020 22:02:56 +0000 (22:02 +0000)]
Simplify bnep_sec_check_complete am: 86fbde4a5e am: e96b0443a4 am: 57455d8f4d

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

Change-Id: I8ecdf770320d59674245cb6c5bdf54316d25e47d

3 years agoSerialize L2CAP connect ind/cfm, config ind, cfm am: b737b6dcda am: 23615d56c8
Hansong Zhang [Mon, 28 Sep 2020 21:42:17 +0000 (21:42 +0000)]
Serialize L2CAP connect ind/cfm, config ind, cfm am: b737b6dcda am: 23615d56c8

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

Change-Id: I35a95dc88c823a66d01e1b4003bae26640ee2e07

3 years agoL2cap: Auto send ConnectRsp am: d8d7224c2e am: 1b00239503
Hansong Zhang [Mon, 28 Sep 2020 21:42:16 +0000 (21:42 +0000)]
L2cap: Auto send ConnectRsp am: d8d7224c2e am: 1b00239503

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

Change-Id: I60141e2d1aa5df7d608fccc6701cd754644c21b7

3 years agoCheck for control block nullptr on l2cap error am: d77658a680 am: 7a0ce3e74c
Hansong Zhang [Mon, 28 Sep 2020 21:42:15 +0000 (21:42 +0000)]
Check for control block nullptr on l2cap error am: d77658a680 am: 7a0ce3e74c

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

Change-Id: Ib226e9357eb13baa7c971261702856b9cf715c55

3 years agoL2cap channel cb: Store who initiated dynamic channel am: 7bfe49749a am: d1b11fe61f
Hansong Zhang [Mon, 28 Sep 2020 21:42:14 +0000 (21:42 +0000)]
L2cap channel cb: Store who initiated dynamic channel am: 7bfe49749a am: d1b11fe61f

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

Change-Id: I5c59b64189a4e929e474a7c6d13747d3cd527eb6

3 years agoWe always send pL2CA_ConfigCfm_Cb with status OK am: 40b23cc4ab am: 1bb6f231ce
Hansong Zhang [Mon, 28 Sep 2020 21:42:14 +0000 (21:42 +0000)]
We always send pL2CA_ConfigCfm_Cb with status OK am: 40b23cc4ab am: 1bb6f231ce

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

Change-Id: Ib027c448ea97732bec594a8bdd37c8845c9e1b68

3 years agoL2cap shim clean up am: ee79913590 am: 6ca4f683bd
Hansong Zhang [Mon, 28 Sep 2020 21:42:12 +0000 (21:42 +0000)]
L2cap shim clean up am: ee79913590 am: 6ca4f683bd

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

Change-Id: I4514eb872e52bde4326e7afc03877be8ae9cd944

3 years agoL2CAP_FLUSHABLE_PKT is never used am: 6b63057385 am: 6c7a566cd4
Hansong Zhang [Mon, 28 Sep 2020 21:42:08 +0000 (21:42 +0000)]
L2CAP_FLUSHABLE_PKT is never used am: 6b63057385 am: 6c7a566cd4

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

Change-Id: Ib3048441c7adeb7a4ff48cee5881b2359347167c

3 years agoMinor clean up in l2c_api am: 324f7e9cec am: adc9e08a37
Hansong Zhang [Mon, 28 Sep 2020 21:42:04 +0000 (21:42 +0000)]
Minor clean up in l2c_api am: 324f7e9cec am: adc9e08a37

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

Change-Id: I36cf6452ba6324ba18fffa2d26f63ecfa10a38e9

3 years agoL2cap: Simplify DisconnectRsp am: 014930dadc am: fe33b32020
Hansong Zhang [Mon, 28 Sep 2020 21:42:01 +0000 (21:42 +0000)]
L2cap: Simplify DisconnectRsp am: 014930dadc am: fe33b32020

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

Change-Id: Ib2672bb56d2793da4473f7b104f82605d7f7979f

3 years agoRemove unused L2cap code am: 2d291bead0 am: f56c1b1e0a
Hansong Zhang [Mon, 28 Sep 2020 21:41:32 +0000 (21:41 +0000)]
Remove unused L2cap code am: 2d291bead0 am: f56c1b1e0a

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

Change-Id: I7c17ef1a11a3e0b6ac8f98bccfbba91b7f892648

3 years agoSimplify avdt_sec_check_complete_term am: 1d6fa5e136 am: 41cb6069c9
Hansong Zhang [Mon, 28 Sep 2020 21:41:30 +0000 (21:41 +0000)]
Simplify avdt_sec_check_complete_term am: 1d6fa5e136 am: 41cb6069c9

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

Change-Id: I3a2c972f6d2103003156efef3df8035d9658451d

3 years agoSimplify bnep_sec_check_complete am: 86fbde4a5e am: e96b0443a4
Hansong Zhang [Mon, 28 Sep 2020 21:41:27 +0000 (21:41 +0000)]
Simplify bnep_sec_check_complete am: 86fbde4a5e am: e96b0443a4

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

Change-Id: I87d9fd1e93064f2b4c0a9f2cd3387a38698c8146

3 years agoSerialize L2CAP connect ind/cfm, config ind, cfm am: b737b6dcda
Hansong Zhang [Mon, 28 Sep 2020 20:55:14 +0000 (20:55 +0000)]
Serialize L2CAP connect ind/cfm, config ind, cfm am: b737b6dcda

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

Change-Id: I20205d2b00a0576eb2413dce747356262db40bf2

3 years agoL2cap: Auto send ConnectRsp am: d8d7224c2e
Hansong Zhang [Mon, 28 Sep 2020 20:55:12 +0000 (20:55 +0000)]
L2cap: Auto send ConnectRsp am: d8d7224c2e

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

Change-Id: I260ba6995b80b8f1ffc8bfee879c9b27d3320b04

3 years agoCheck for control block nullptr on l2cap error am: d77658a680
Hansong Zhang [Mon, 28 Sep 2020 20:55:08 +0000 (20:55 +0000)]
Check for control block nullptr on l2cap error am: d77658a680

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

Change-Id: I3c574634a60a0a4f376b8670330a848045689efb

3 years agoL2cap channel cb: Store who initiated dynamic channel am: 7bfe49749a
Hansong Zhang [Mon, 28 Sep 2020 20:55:05 +0000 (20:55 +0000)]
L2cap channel cb: Store who initiated dynamic channel am: 7bfe49749a

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

Change-Id: I3c642a89b7ca5c38fad8ed3905f224a32c67a738

3 years agoWe always send pL2CA_ConfigCfm_Cb with status OK am: 40b23cc4ab
Hansong Zhang [Mon, 28 Sep 2020 20:55:02 +0000 (20:55 +0000)]
We always send pL2CA_ConfigCfm_Cb with status OK am: 40b23cc4ab

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

Change-Id: I21c840a6db17549af0a378cf5af3f57c91facd93

3 years agoL2cap shim clean up am: ee79913590
Hansong Zhang [Mon, 28 Sep 2020 20:54:58 +0000 (20:54 +0000)]
L2cap shim clean up am: ee79913590

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

Change-Id: I4158575f6fc937f5c061aad1e9bf14b72381c274

3 years agoL2CAP_FLUSHABLE_PKT is never used am: 6b63057385
Hansong Zhang [Mon, 28 Sep 2020 20:54:55 +0000 (20:54 +0000)]
L2CAP_FLUSHABLE_PKT is never used am: 6b63057385

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

Change-Id: Ie5273670372d83b30ff1f6cf3406843496d917d7

3 years agoMinor clean up in l2c_api am: 324f7e9cec
Hansong Zhang [Mon, 28 Sep 2020 20:54:51 +0000 (20:54 +0000)]
Minor clean up in l2c_api am: 324f7e9cec

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

Change-Id: I436a7ffeabe9c926062f05831aea7056396b1158

3 years agoL2cap: Simplify DisconnectRsp am: 014930dadc
Hansong Zhang [Mon, 28 Sep 2020 20:54:48 +0000 (20:54 +0000)]
L2cap: Simplify DisconnectRsp am: 014930dadc

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

Change-Id: Iefab338e11f2815cce8e352d679f2e410cae93a0

3 years agoRemove unused L2cap code am: 2d291bead0
Hansong Zhang [Mon, 28 Sep 2020 20:54:29 +0000 (20:54 +0000)]
Remove unused L2cap code am: 2d291bead0

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

Change-Id: Ie3beca412e99a47bfe4d2d07452ed1d98388d0ef

3 years agoSimplify avdt_sec_check_complete_term am: 1d6fa5e136
Hansong Zhang [Mon, 28 Sep 2020 20:54:24 +0000 (20:54 +0000)]
Simplify avdt_sec_check_complete_term am: 1d6fa5e136

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

Change-Id: Ie361553e46e0bf5c56503b0a1153d9791bba476f

3 years agoSimplify bnep_sec_check_complete am: 86fbde4a5e
Hansong Zhang [Mon, 28 Sep 2020 20:53:44 +0000 (20:53 +0000)]
Simplify bnep_sec_check_complete am: 86fbde4a5e

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

Change-Id: Idb4a0b924b656e23556d6161da055fe6a8de2398

3 years agol2c_csm: Use pL2CA_Error_Cb on error am: 30a07c56e1 am: 7f4a3dac18 am: 76d953e9b6
Hansong Zhang [Mon, 28 Sep 2020 20:13:35 +0000 (20:13 +0000)]
l2c_csm: Use pL2CA_Error_Cb on error am: 30a07c56e1 am: 7f4a3dac18 am: 76d953e9b6

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

Change-Id: I3256c8fce9a6949953aeec0a9f9455c303849462

3 years agoRegard L2CAP_CFG_PENDING as failure am: 5b85860bd5 am: eb9cc47787 am: 48584bc8ab
Hansong Zhang [Mon, 28 Sep 2020 20:13:32 +0000 (20:13 +0000)]
Regard L2CAP_CFG_PENDING as failure am: 5b85860bd5 am: eb9cc47787 am: 48584bc8ab

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

Change-Id: Ice44d8442da97fc1e77e57ff3b5bdbc984169f2c

3 years agol2c_csm: Use pL2CA_Error_Cb on error am: 30a07c56e1 am: 7f4a3dac18
Hansong Zhang [Mon, 28 Sep 2020 19:55:17 +0000 (19:55 +0000)]
l2c_csm: Use pL2CA_Error_Cb on error am: 30a07c56e1 am: 7f4a3dac18

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

Change-Id: Ib1984734eda6f9ce33fcbefce71d59ffc68d34b0

3 years agoRegard L2CAP_CFG_PENDING as failure am: 5b85860bd5 am: eb9cc47787
Hansong Zhang [Mon, 28 Sep 2020 19:55:15 +0000 (19:55 +0000)]
Regard L2CAP_CFG_PENDING as failure am: 5b85860bd5 am: eb9cc47787

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

Change-Id: I9aca2ee3eaa75ae8e5b855cf1c4ccadc2e9202bb

3 years agol2c_csm: Use pL2CA_Error_Cb on error am: 30a07c56e1
Hansong Zhang [Mon, 28 Sep 2020 19:03:43 +0000 (19:03 +0000)]
l2c_csm: Use pL2CA_Error_Cb on error am: 30a07c56e1

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

Change-Id: I5d53012f81c0ee4358948654418600b897f1f34b

3 years agoRegard L2CAP_CFG_PENDING as failure am: 5b85860bd5
Hansong Zhang [Mon, 28 Sep 2020 19:02:50 +0000 (19:02 +0000)]
Regard L2CAP_CFG_PENDING as failure am: 5b85860bd5

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

Change-Id: I9d42ccf85dc915acb2561a63d2718bbb1d5c08bf

3 years agoSerialize L2CAP connect ind/cfm, config ind, cfm
Hansong Zhang [Mon, 28 Sep 2020 06:59:00 +0000 (23:59 -0700)]
Serialize L2CAP connect ind/cfm, config ind, cfm

Make them happen at one place.

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

3 years agoL2cap: Auto send ConnectRsp
Hansong Zhang [Sun, 27 Sep 2020 23:49:17 +0000 (16:49 -0700)]
L2cap: Auto send ConnectRsp

In the past, L2cap user can decide whether to accept or reject a
ConnectReq. If reject, the channel is closed.

Now let L2cap layer always auto accept the remote ConnectReq and start
config process. If the L2cap user wants to reject, they can send a
DisconnectReq. According to L2cap state machine, a DisconnectReq after
ConnectRsp terminates the channel, which is equivalent to sending a
negative ConnectRsp, as before.

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

3 years agoCheck for control block nullptr on l2cap error
Hansong Zhang [Sun, 27 Sep 2020 23:30:03 +0000 (16:30 -0700)]
Check for control block nullptr on l2cap error

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

3 years agoL2cap channel cb: Store who initiated dynamic channel
Hansong Zhang [Sun, 27 Sep 2020 23:12:43 +0000 (16:12 -0700)]
L2cap channel cb: Store who initiated dynamic channel

Use pL2CA_ConfigCfm_Cb to let user know the direction.

Later the user can run check in ConnectInd or ConnectCfm callback.

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

3 years agoWe always send pL2CA_ConfigCfm_Cb with status OK
Hansong Zhang [Sun, 27 Sep 2020 22:53:12 +0000 (15:53 -0700)]
We always send pL2CA_ConfigCfm_Cb with status OK

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

3 years agoL2cap shim clean up
Hansong Zhang [Sun, 27 Sep 2020 22:18:57 +0000 (15:18 -0700)]
L2cap shim clean up

Now we send ConfigReq and ConfigRsp automatically, we need to send
callbacks automatically.

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

3 years agoL2CAP_FLUSHABLE_PKT is never used
Hansong Zhang [Sun, 27 Sep 2020 21:23:20 +0000 (14:23 -0700)]
L2CAP_FLUSHABLE_PKT is never used

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

3 years agoIntroduce pL2CA_Error_Cb am: b6e5a07555 am: cc102a7286 am: 0dcc4aea20
Hansong Zhang [Mon, 28 Sep 2020 17:31:22 +0000 (17:31 +0000)]
Introduce pL2CA_Error_Cb am: b6e5a07555 am: cc102a7286 am: 0dcc4aea20

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

Change-Id: I2a938c79536402305cd1097f6a2bd8deea68a001

3 years agol2c_csm: Remove unused variable am: 5020f1c00f am: 1e68d372f3 am: 9f16dc312c
Hansong Zhang [Mon, 28 Sep 2020 17:31:19 +0000 (17:31 +0000)]
l2c_csm: Remove unused variable am: 5020f1c00f am: 1e68d372f3 am: 9f16dc312c

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

Change-Id: I0ee02fd48260243ef426688765bf05db344a0811

3 years agoIntroduce pL2CA_Error_Cb am: b6e5a07555 am: cc102a7286
Hansong Zhang [Mon, 28 Sep 2020 17:09:20 +0000 (17:09 +0000)]
Introduce pL2CA_Error_Cb am: b6e5a07555 am: cc102a7286

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

Change-Id: Icae7a509d9d3cdd276e8911175c02408ce44dd58

3 years agol2c_csm: Remove unused variable am: 5020f1c00f am: 1e68d372f3
Hansong Zhang [Mon, 28 Sep 2020 17:09:17 +0000 (17:09 +0000)]
l2c_csm: Remove unused variable am: 5020f1c00f am: 1e68d372f3

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

Change-Id: I471805d4fb858f14122a743102788ec7f19fcd24

3 years agoIntroduce pL2CA_Error_Cb am: b6e5a07555
Hansong Zhang [Mon, 28 Sep 2020 16:48:11 +0000 (16:48 +0000)]
Introduce pL2CA_Error_Cb am: b6e5a07555

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

Change-Id: I4af7949c994761ee6b3a7b6c2808a8077fafdfc7

3 years agol2c_csm: Remove unused variable am: 5020f1c00f
Hansong Zhang [Mon, 28 Sep 2020 16:47:19 +0000 (16:47 +0000)]
l2c_csm: Remove unused variable am: 5020f1c00f

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

Change-Id: I7a4ad9d2b31de4811798dcbb206702be137de7b2

3 years agoMinor clean up in l2c_api
Hansong Zhang [Sun, 27 Sep 2020 07:24:48 +0000 (00:24 -0700)]
Minor clean up in l2c_api

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

3 years agoL2cap: Simplify DisconnectRsp
Hansong Zhang [Sun, 27 Sep 2020 07:12:49 +0000 (00:12 -0700)]
L2cap: Simplify DisconnectRsp

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

3 years agoRemove unused L2cap code
Hansong Zhang [Sun, 27 Sep 2020 07:03:53 +0000 (00:03 -0700)]
Remove unused L2cap code

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

3 years agoSimplify avdt_sec_check_complete_term
Hansong Zhang [Sun, 27 Sep 2020 00:59:51 +0000 (17:59 -0700)]
Simplify avdt_sec_check_complete_term

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

3 years agoSimplify bnep_sec_check_complete
Hansong Zhang [Sun, 27 Sep 2020 00:42:02 +0000 (17:42 -0700)]
Simplify bnep_sec_check_complete

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

3 years agol2c_csm: Use pL2CA_Error_Cb on error
Hansong Zhang [Sat, 26 Sep 2020 23:58:47 +0000 (16:58 -0700)]
l2c_csm: Use pL2CA_Error_Cb on error

Note that we only have two result codes, because the user only needs to
know whether it's during ConnectRsp or ConfigRsp (except for HIDH
retry), which we need further research.

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

3 years agoRegard L2CAP_CFG_PENDING as failure
Hansong Zhang [Sat, 26 Sep 2020 23:48:40 +0000 (16:48 -0700)]
Regard L2CAP_CFG_PENDING as failure

Since all L2CAP users disconnect if the status is not OK.

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

3 years agoIntroduce pL2CA_Error_Cb
Hansong Zhang [Sat, 26 Sep 2020 23:39:28 +0000 (16:39 -0700)]
Introduce pL2CA_Error_Cb

L2CAP notifies users error in ConnectRsp and ConfigRsp through this
callback function (not linked so far). Next step is we send success
through pL2CA_ConnectCfm_Cb and pL2CA_ConfigCfm_Cb.

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

3 years agol2c_csm: Remove unused variable
Hansong Zhang [Sat, 26 Sep 2020 23:20:31 +0000 (16:20 -0700)]
l2c_csm: Remove unused variable

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

3 years agoMerge "Add missing runtime dependency of android.hardware.bluetooth@1.1-service.btlin...
Treehugger Robot [Mon, 28 Sep 2020 03:45:33 +0000 (03:45 +0000)]
Merge "Add missing runtime dependency of android.hardware.bluetooth@1.1-service.btlinux" am: 960730c35b am: c45116e6e5 am: a430fb8a56

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

Change-Id: If75103e0e812e67a70f9f46d53575d1e0a84e97a

3 years agoMerge "Add missing runtime dependency of android.hardware.bluetooth@1.1-service.btlin...
Treehugger Robot [Mon, 28 Sep 2020 03:32:59 +0000 (03:32 +0000)]
Merge "Add missing runtime dependency of android.hardware.bluetooth@1.1-service.btlinux" am: 960730c35b am: c45116e6e5

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

Change-Id: I969910892c7a24aedbf42e03bca7d9a4f9484844

3 years agoMerge "Add missing runtime dependency of android.hardware.bluetooth@1.1-service.btlin...
Treehugger Robot [Mon, 28 Sep 2020 03:01:03 +0000 (03:01 +0000)]
Merge "Add missing runtime dependency of android.hardware.bluetooth@1.1-service.btlinux" am: 960730c35b

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

Change-Id: Ic78e1a205f0e6c32291968257f6e069b1579dfb9

3 years agoMerge "Add missing runtime dependency of android.hardware.bluetooth@1.1-service.btlinux"
Treehugger Robot [Mon, 28 Sep 2020 02:28:06 +0000 (02:28 +0000)]
Merge "Add missing runtime dependency of android.hardware.bluetooth@1.1-service.btlinux"

3 years agoMerge "Set apex_available property" am: 9a5637591a am: f99b45ed3d am: 61d8361c56
Treehugger Robot [Mon, 28 Sep 2020 01:31:10 +0000 (01:31 +0000)]
Merge "Set apex_available property" am: 9a5637591a am: f99b45ed3d am: 61d8361c56

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

Change-Id: I65c48bdce23f76e1be79dfb8f48ecb0bb2c61a05

3 years agoMerge "Set apex_available property" am: 9a5637591a am: f99b45ed3d
Treehugger Robot [Mon, 28 Sep 2020 00:57:12 +0000 (00:57 +0000)]
Merge "Set apex_available property" am: 9a5637591a am: f99b45ed3d

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

Change-Id: Iea0150cbb7c04df34d3f15acbe424c4f15593934

3 years agoMerge "Set apex_available property" am: 9a5637591a
Treehugger Robot [Mon, 28 Sep 2020 00:38:30 +0000 (00:38 +0000)]
Merge "Set apex_available property" am: 9a5637591a

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

Change-Id: I56e4f7d5776bace6a9bec765aedc4a6f34add49f

3 years agoMerge "Set apex_available property"
Treehugger Robot [Mon, 28 Sep 2020 00:05:12 +0000 (00:05 +0000)]
Merge "Set apex_available property"

3 years agoL2CAP ERTM: Fix p_ccb->max_rx_mtu am: 8308c24d8a am: 3e88869b74 am: 90a30506ad
Hansong Zhang [Sun, 27 Sep 2020 16:47:50 +0000 (16:47 +0000)]
L2CAP ERTM: Fix p_ccb->max_rx_mtu am: 8308c24d8a am: 3e88869b74 am: 90a30506ad

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

Change-Id: I1f24834646a08017c4026a9c811485bde4df8bfc

3 years agoL2CAP ERTM: Fix p_ccb->max_rx_mtu am: 8308c24d8a am: 3e88869b74
Hansong Zhang [Sun, 27 Sep 2020 16:34:17 +0000 (16:34 +0000)]
L2CAP ERTM: Fix p_ccb->max_rx_mtu am: 8308c24d8a am: 3e88869b74

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

Change-Id: Ib50039db4ee485c69e51bb8fe7efc42ec6f20135

3 years agoL2CAP ERTM: Fix p_ccb->max_rx_mtu am: 8308c24d8a
Hansong Zhang [Sun, 27 Sep 2020 16:11:38 +0000 (16:11 +0000)]
L2CAP ERTM: Fix p_ccb->max_rx_mtu am: 8308c24d8a

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

Change-Id: I07e1644a16015e7ec5d7876a365a28ecf4eee2de

3 years agoUse hidh_on_l2cap_error for error handling am: 95149a585c am: 2170acaf97 am: 3a33c8af12
Hansong Zhang [Sun, 27 Sep 2020 08:19:18 +0000 (08:19 +0000)]
Use hidh_on_l2cap_error for error handling am: 95149a585c am: 2170acaf97 am: 3a33c8af12

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

Change-Id: Idb941b6b98f3dc293c2098eb88034ac9c6bcabc3

3 years agoUse hidd_on_l2cap_error for error handling am: 407ad73659 am: 39bb8732ce am: 9758cb6f5f
Hansong Zhang [Sun, 27 Sep 2020 08:19:17 +0000 (08:19 +0000)]
Use hidd_on_l2cap_error for error handling am: 407ad73659 am: 39bb8732ce am: 9758cb6f5f

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

Change-Id: I173cc0e65d727ec7c89a27bb31c34d1fda3f8aed

3 years agoHID: Simplify security check code am: a412f6bbb3 am: 0959d40562 am: 79adca1aa0
Hansong Zhang [Sun, 27 Sep 2020 08:19:15 +0000 (08:19 +0000)]
HID: Simplify security check code am: a412f6bbb3 am: 0959d40562 am: 79adca1aa0

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

Change-Id: I0a82f337914dd9ae4d4eab6fa59222c8fd26ed84

3 years agoUse rfc_on_l2cap_error for error handling am: d3c390b077 am: ab41398cec am: d610c365aa
Hansong Zhang [Sun, 27 Sep 2020 08:19:12 +0000 (08:19 +0000)]
Use rfc_on_l2cap_error for error handling am: d3c390b077 am: ab41398cec am: d610c365aa

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

Change-Id: I69ccb1002c7c5e10a9cbdc78bf23ca748300cf7d

3 years agoUse avct_on_l2cap_error for error handling am: 4e82f0d26c am: 45353d3326 am: 5e21b02228
Hansong Zhang [Sun, 27 Sep 2020 08:19:10 +0000 (08:19 +0000)]
Use avct_on_l2cap_error for error handling am: 4e82f0d26c am: 45353d3326 am: 5e21b02228

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

Change-Id: I2f13911309bc8d89caa3fff64ff97a94a785b3d3

3 years agoUse avdt_on_l2cap_error for error handling am: ece51101ed am: c06e9e0a8d am: e1e75053a1
Hansong Zhang [Sun, 27 Sep 2020 08:19:09 +0000 (08:19 +0000)]
Use avdt_on_l2cap_error for error handling am: ece51101ed am: c06e9e0a8d am: e1e75053a1

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

Change-Id: Icb24390a2f2fd8e35d838d78bcdd0bd5ddc8a5b8

3 years agoUse avct_br_on_l2cap_error am: 4e00fa771a am: df5d0dee30 am: b74c13572b
Hansong Zhang [Sun, 27 Sep 2020 08:19:05 +0000 (08:19 +0000)]
Use avct_br_on_l2cap_error am: 4e00fa771a am: df5d0dee30 am: b74c13572b

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

Change-Id: Ia31da2c63ea7bf9f29c46a77a8d22e904c55ad9e

3 years agoUse hidh_on_l2cap_error for error handling am: 95149a585c am: 2170acaf97
Hansong Zhang [Sun, 27 Sep 2020 07:50:19 +0000 (07:50 +0000)]
Use hidh_on_l2cap_error for error handling am: 95149a585c am: 2170acaf97

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

Change-Id: Ifc98b7f512de9b454ec8b6ab6e920ae79e8ec693

3 years agoUse hidd_on_l2cap_error for error handling am: 407ad73659 am: 39bb8732ce
Hansong Zhang [Sun, 27 Sep 2020 07:50:17 +0000 (07:50 +0000)]
Use hidd_on_l2cap_error for error handling am: 407ad73659 am: 39bb8732ce

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

Change-Id: Iffa5f30c581db924287123cfb6d477e87a2e32e0

3 years agoHID: Simplify security check code am: a412f6bbb3 am: 0959d40562
Hansong Zhang [Sun, 27 Sep 2020 07:50:15 +0000 (07:50 +0000)]
HID: Simplify security check code am: a412f6bbb3 am: 0959d40562

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

Change-Id: I912bf5b992b7e4e87104f951984ac3c744362836

3 years agoUse rfc_on_l2cap_error for error handling am: d3c390b077 am: ab41398cec
Hansong Zhang [Sun, 27 Sep 2020 07:50:13 +0000 (07:50 +0000)]
Use rfc_on_l2cap_error for error handling am: d3c390b077 am: ab41398cec

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

Change-Id: Icf147ed35c5fd9a552655fe90bce777fa5df9b05

3 years agoUse avct_on_l2cap_error for error handling am: 4e82f0d26c am: 45353d3326
Hansong Zhang [Sun, 27 Sep 2020 07:50:11 +0000 (07:50 +0000)]
Use avct_on_l2cap_error for error handling am: 4e82f0d26c am: 45353d3326

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

Change-Id: I305f7dec303a1ea359ebea455c93241496307eab

3 years agoUse avdt_on_l2cap_error for error handling am: ece51101ed am: c06e9e0a8d
Hansong Zhang [Sun, 27 Sep 2020 07:50:08 +0000 (07:50 +0000)]
Use avdt_on_l2cap_error for error handling am: ece51101ed am: c06e9e0a8d

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

Change-Id: Ic9ad867a8b13b12db4269d8a9a2f0e7e4bac844a

3 years agoUse avct_br_on_l2cap_error am: 4e00fa771a am: df5d0dee30
Hansong Zhang [Sun, 27 Sep 2020 07:50:05 +0000 (07:50 +0000)]
Use avct_br_on_l2cap_error am: 4e00fa771a am: df5d0dee30

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

Change-Id: I698d4293782587ccb4a01429ebc1da08a28c47c5

3 years agoUse hidh_on_l2cap_error for error handling am: 95149a585c
Hansong Zhang [Sun, 27 Sep 2020 07:25:37 +0000 (07:25 +0000)]
Use hidh_on_l2cap_error for error handling am: 95149a585c

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

Change-Id: I306d906901998af5c5cf41b844e32b16df7a7722

3 years agoUse hidd_on_l2cap_error for error handling am: 407ad73659
Hansong Zhang [Sun, 27 Sep 2020 07:25:34 +0000 (07:25 +0000)]
Use hidd_on_l2cap_error for error handling am: 407ad73659

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

Change-Id: Ice0383502cc4ed8210dd326671a17fbecbf5e154

3 years agoHID: Simplify security check code am: a412f6bbb3
Hansong Zhang [Sun, 27 Sep 2020 07:25:31 +0000 (07:25 +0000)]
HID: Simplify security check code am: a412f6bbb3

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

Change-Id: I6f128e6bd65565bf44ad6e1257c92fb26c692258

3 years agoUse rfc_on_l2cap_error for error handling am: d3c390b077
Hansong Zhang [Sun, 27 Sep 2020 07:25:28 +0000 (07:25 +0000)]
Use rfc_on_l2cap_error for error handling am: d3c390b077

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

Change-Id: I70c2c8bf6286149d4a09cce25d67fe4a1a311c61

3 years agoUse avct_on_l2cap_error for error handling am: 4e82f0d26c
Hansong Zhang [Sun, 27 Sep 2020 07:25:25 +0000 (07:25 +0000)]
Use avct_on_l2cap_error for error handling am: 4e82f0d26c

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

Change-Id: Id17abbde51854c5b624f6a7527244e4aa11eff01

3 years agoUse avdt_on_l2cap_error for error handling am: ece51101ed
Hansong Zhang [Sun, 27 Sep 2020 07:25:21 +0000 (07:25 +0000)]
Use avdt_on_l2cap_error for error handling am: ece51101ed

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

Change-Id: I26b046a88658c748960d09e4f3499ad09ae48a37

3 years agoUse avct_br_on_l2cap_error am: 4e00fa771a
Hansong Zhang [Sun, 27 Sep 2020 07:24:40 +0000 (07:24 +0000)]
Use avct_br_on_l2cap_error am: 4e00fa771a

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

Change-Id: Ib7c8310fc78799f021ca72a51576ea13cda577f2

3 years agoL2CAP ERTM: Fix p_ccb->max_rx_mtu
Hansong Zhang [Sun, 27 Sep 2020 06:38:13 +0000 (23:38 -0700)]
L2CAP ERTM: Fix p_ccb->max_rx_mtu

Use the old value, which was removed in
I78c3d65fdaf14addf80607ce5105221e52447a9e.

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

3 years agoUse hidh_on_l2cap_error for error handling
Hansong Zhang [Sat, 26 Sep 2020 06:06:13 +0000 (23:06 -0700)]
Use hidh_on_l2cap_error for error handling

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

3 years agoUse hidd_on_l2cap_error for error handling
Hansong Zhang [Sat, 26 Sep 2020 06:18:33 +0000 (23:18 -0700)]
Use hidd_on_l2cap_error for error handling

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

3 years agoHID: Simplify security check code
Hansong Zhang [Sat, 26 Sep 2020 06:04:26 +0000 (23:04 -0700)]
HID: Simplify security check code

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