Bluetooth: lib: Map Connection Failed to be Established to ETIMEDOUT
Subsystems (2)
PATCH 1/1 Bluetooth: lib: Map Connection Failed to be Established to ETIMEDOUT
Connection Failed to be Established / Synchronization Timeout (0x3e) is not handled by bt_to_errno() so it is reported to userspace as ENOSYS.
It is the error the controller uses when the first packets of an LE connection or CIS are not received, and when it cannot synchronize to a periodic advertising train or BIG in time, i.e. a timeout, so map it to ETIMEDOUT like Connection Timeout (0x08).
This changes what userspace sees: connect() on an L2CAP LE or ISO (CIS) socket that fails with 0x3e now reports ETIMEDOUT instead of ENOSYS. BlueZ iso-tester "ISO Connect - Reject" expects ENOSYS for this case and needs "iso-tester: Accept ETIMEDOUT for Connection Failed to be Established" to pass.
--- net/bluetooth/lib.c | 1 + 1 file changed, 1 insertion(+)
net/bluetooth/lib.c +1 -0
@@ -89,6 +89,7 @@ int bt_to_errno(__u16 code)return ENOMEM ;case 0x08 : +case 0x3e :return ETIMEDOUT ;case 0x09 :
base-commit: 4fe38719e6738feaa90486e36b0790dd5d960a96
Signature · 1 line
2.43.0
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/series/1218946/
---Test result---
Test Summary:
CheckPatch PASS 0.76 seconds VerifyFixes PASS 0.13 seconds VerifySignedoff PASS 0.13 seconds GitLint PASS 0.35 seconds SubjectPrefix PASS 0.12 seconds BuildKernel PASS 32.33 seconds CheckAllWarning PASS 36.59 seconds CheckSparse PASS 38.80 seconds BuildKernel32 PASS 32.27 seconds CheckKernelLLVM PASS 35.25 seconds TestRunnerSetup PASS 760.56 seconds TestRunner_l2cap-tester PASS 15.04 seconds TestRunner_iso-tester FAIL 17.17 seconds TestRunner_bnep-tester PASS 3.20 seconds TestRunner_mgmt-tester PASS 89.94 seconds TestRunner_rfcomm-tester PASS 4.55 seconds TestRunner_sco-tester PASS 5.68 seconds TestRunner_ioctl-tester PASS 4.71 seconds TestRunner_mesh-tester PASS 4.60 seconds TestRunner_smp-tester PASS 4.41 seconds TestRunner_userchan-tester PASS 3.26 seconds TestRunner_6lowpan-tester PASS 4.46 seconds IncrementalBuild PASS 29.53 seconds
Details
##############################
Test: TestRunner_iso-tester - FAIL
Desc: Run iso-tester with test-runner
Output:
Total: 213, Passed: 212 (99.5%), Failed: 1, Not Run: 0
Failed Test Cases
ISO Connect - Reject Failed 0.042 seconds
https://github.com/bluez/bluetooth-next/pull/1191
---
Regards,
Linux Bluetooth
Luiz Augusto von Dentz
maintainerHi Simon,
Quoted 9 lines · Simon Mikuda
Connection Failed to be Established / Synchronization Timeout (
0x3e) is not handled bybt_to_errno()so it is reported to userspace as ENOSYS.It is the error the controller uses when the first packets of an LE connection or CIS are not received, and when it cannot synchronize to a periodic advertising train or BIG in time, i.e. a timeout, so map it to ETIMEDOUT like Connection Timeout (
0x08).
Quoted 5 lines
This changes what userspace sees:
connect()on an L2CAP LE or ISO (CIS) socket that fails with0x3enow reports ETIMEDOUT instead of ENOSYS. BlueZ iso-tester "ISO Connect - Reject" expects ENOSYS for this case and needs "iso-tester: Accept ETIMEDOUT for Connection Failed to be Established" to pass.
I don't see any patch for userspace, though; did you forget to send it?
Quoted 22 lines
Signed-off-by Simon Mikuda <[email protected]>--- net/bluetooth/lib.c | 1 + 1 file changed, 1 insertion(+)net/bluetooth/lib.c +1
-0@@ -89,6 +89,7 @@ int bt_to_errno(__u16 code)return ENOMEM ;case 0x08 : +case 0x3e :return ETIMEDOUT ;case 0x09 :base-commit:
4fe38719e6738feaa90486e36b0790dd5d960a96--
2.43.0
Signature · 1 line
Luiz Augusto von Dentz