Bluetooth: MGMT: Make MGMT_OP_LOAD_CONN_PARAM update existing connection
Subsystems (2)
Luiz Augusto von Dentz
maintainerRFC v4 1/1 Bluetooth: MGMT: Make MGMT_OP_LOAD_CONN_PARAM update existing connection
From: Luiz Augusto von Dentz <[email protected]>
This makes MGMT_OP_LOAD_CONN_PARAM update existing connection by dectecting the request is just for one connection, parameters already exists and there is a connection.
Since this is a new behavior the revision is also updated to enable userspace to detect it.
--- include/net/bluetooth/hci_sync.h | 3 +++ net/bluetooth/hci_sync.c | 18 +++++++++++++ net/bluetooth/mgmt.c | 45 ++++++++++++++++++++++++++++++-- 3 files changed, 64 insertions(+), 2 deletions(-)
include/net/bluetooth/hci_sync.h +3 -0
@@ -136,6 +136,7 @@ int hci_suspend_sync(struct hci_dev *hdev);int hci_resume_sync (struct hci_dev *hdev);struct hci_conn ; +struct hci_conn_params ;int hci_abort_conn_sync (struct hci_dev *hdev,struct hci_conn *conn,u8 reason);
@@ -154,3 +155,5 @@ int hci_connect_acl_sync(struct hci_dev *hdev, struct hci_conn *conn);int hci_connect_le_sync (struct hci_dev *hdev,struct hci_conn *conn);int hci_cancel_connect_sync (struct hci_dev *hdev,struct hci_conn *conn); +int hci_le_conn_update_sync (struct hci_dev *hdev,struct hci_conn *conn, +struct hci_conn_params *params);
net/bluetooth/hci_sync.c +18 -0
@@ -6711,3 +6711,21 @@ int hci_cancel_connect_sync(struct hci_dev *hdev, struct hci_conn *conn)return -ENOENT ; } + +int hci_le_conn_update_sync (struct hci_dev *hdev,struct hci_conn *conn, +struct hci_conn_params *params) +{ +struct hci_cp_le_conn_update cp; + +memset (&cp,0 ,sizeof (cp)); + cp.handle =cpu_to_le16 (conn->handle); + cp.conn_interval_min =cpu_to_le16 (params->conn_min_interval); + cp.conn_interval_max =cpu_to_le16 (params->conn_max_interval); + cp.conn_latency =cpu_to_le16 (params->conn_latency); + cp.supervision_timeout =cpu_to_le16 (params->supervision_timeout); + cp.min_ce_len =cpu_to_le16 (0x0000 ); + cp.max_ce_len =cpu_to_le16 (0x0000 ); + +return __hci_cmd_sync_status (hdev,HCI_OP_LE_CONN_UPDATE , +sizeof (cp), &cp,HCI_CMD_TIMEOUT ); +}
net/bluetooth/mgmt.c +43 -2
81 lines not on this page · raw message
Signature · 1 line
2.45.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/project/bluetooth/list/?series=853196
---Test result---
Test Summary:
CheckPatch PASS 16.53 seconds GitLint FAIL 3.37 seconds SubjectPrefix PASS 0.14 seconds BuildKernel PASS 30.15 seconds CheckAllWarning PASS 32.80 seconds CheckSparse PASS 38.06 seconds CheckSmatch FAIL 35.29 seconds BuildKernel32 PASS 29.14 seconds TestRunnerSetup PASS 524.29 seconds TestRunner_l2cap-tester FAIL 23.05 seconds TestRunner_iso-tester FAIL 37.23 seconds TestRunner_bnep-tester PASS 4.75 seconds TestRunner_mgmt-tester FAIL 122.87 seconds TestRunner_rfcomm-tester PASS 7.38 seconds TestRunner_sco-tester FAIL 17.42 seconds TestRunner_ioctl-tester PASS 7.67 seconds TestRunner_mesh-tester FAIL 6.02 seconds TestRunner_smp-tester PASS 6.82 seconds TestRunner_userchan-tester PASS 4.96 seconds IncrementalBuild PASS 36.21 seconds
Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[RFC,v4] Bluetooth: MGMT: Make MGMT_OP_LOAD_CONN_PARAM update existing connection
WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
1: T1 Title exceeds max length (81>80): "[RFC,v4] Bluetooth: MGMT: Make MGMT_OP_LOAD_CONN_PARAM update existing connection"
##############################
Test: CheckSmatch - FAIL
Desc: Run smatch tool with source
Output:
Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: net/bluetooth/hci_core.o] Error 139 make[4]: *** Deleting file 'net/bluetooth/hci_core.o'
make[3]: *** [scripts/Makefile.build:485: net/bluetooth] Error 2 make[2]: *** [scripts/Makefile.build:485: net] Error 2
make[2]: *** Waiting for unfinished jobs....
Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: drivers/bluetooth/bcm203x.o] Error 139 make[4]: *** Deleting file 'drivers/bluetooth/bcm203x.o'
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:485: drivers/bluetooth] Error 2 make[2]: *** [scripts/Makefile.build:485: drivers] Error 2
make[1]: *** [/github/workspace/src/src/Makefile:1919: .] Error 2
make: *** [Makefile:240: __sub-make] Error 2
##############################
Test: TestRunner_l2cap-tester - FAIL
Desc: Run l2cap-tester with test-runner
Output:
Total: 55, Passed: 53 (96.4%), Failed: 2, Not Run: 0
Failed Test Cases
L2CAP BR/EDR Client - TX Timestamping Timed out 2.313 seconds L2CAP LE Client - TX Timestamping Timed out 2.208 seconds
##############################
Test: TestRunner_iso-tester - FAIL
Desc: Run iso-tester with test-runner
Output:
Total: 122, Passed: 118 (96.7%), Failed: 4, Not Run: 0
Failed Test Cases
ISO Send - TX Timestamping Timed out 2.741 seconds ISO Send - TX Sched Timestamping Timed out 1.990 seconds ISO Send - TX CMSG Timestamping Timed out 2.002 seconds ISO Send - TX No Poll Timestamping Failed 0.162 seconds
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner Output:
Total: 492, Passed: 489 (99.4%), Failed: 1, Not Run: 2
Failed Test Cases
Read Exp Feature - Success (Index None) Failed 0.080 seconds
##############################
Test: TestRunner_sco-tester - FAIL
Desc: Run sco-tester with test-runner Output:
Total: 15, Passed: 14 (93.3%), Failed: 1, Not Run: 0
Failed Test Cases
SCO CVSD Send - TX Timestamping Timed out 2.245 seconds
##############################
Test: TestRunner_mesh-tester - FAIL
Desc: Run mesh-tester with test-runner Output:
Total: 10, Passed: 9 (90.0%), Failed: 1, Not Run: 0
Failed Test Cases
Mesh - Send cancel - 1 Failed 0.104 seconds
---
Regards,
Linux Bluetooth
Luiz Augusto von Dentz
maintainerHi Pauli,
Quoted 76 lines · On Tue, May 14, 2024 at 2:37 PM <[email protected]> wrote:
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/project/bluetooth/list/?series=853196---Test result---
Test Summary:
CheckPatch PASS 16.53 seconds GitLint FAIL 3.37 seconds SubjectPrefix PASS 0.14 seconds BuildKernel PASS 30.15 seconds CheckAllWarning PASS 32.80 seconds CheckSparse PASS 38.06 seconds CheckSmatch FAIL 35.29 seconds BuildKernel32 PASS 29.14 seconds TestRunnerSetup PASS 524.29 seconds TestRunner_l2cap-tester FAIL 23.05 seconds TestRunner_iso-tester FAIL 37.23 seconds TestRunner_bnep-tester PASS 4.75 seconds TestRunner_mgmt-tester FAIL 122.87 seconds TestRunner_rfcomm-tester PASS 7.38 seconds TestRunner_sco-tester FAIL 17.42 seconds TestRunner_ioctl-tester PASS 7.67 seconds TestRunner_mesh-tester FAIL 6.02 seconds TestRunner_smp-tester PASS 6.82 seconds TestRunner_userchan-tester PASS 4.96 seconds IncrementalBuild PASS 36.21 secondsDetails
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[RFC,v4] Bluetooth: MGMT: MakeMGMT_OP_LOAD_CONN_PARAMupdate existing connectionWARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
1: T1 Title exceeds max length (81>80): "[RFC,v4] Bluetooth: MGMT: MakeMGMT_OP_LOAD_CONN_PARAMupdate existing connection"
##############################
Test: CheckSmatch - FAIL
Desc: Run smatch tool with source
Output:Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244:net/bluetooth/hci_core.o] Error 139 make[4]: *** Deleting file 'net/bluetooth/hci_core.o'
make[3]: *** [scripts/Makefile.build:485: net/bluetooth] Error 2 make[2]: *** [scripts/Makefile.build:485: net] Error 2
make[2]: *** Waiting for unfinished jobs....
Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244:drivers/bluetooth/bcm203x.o] Error 139 make[4]: *** Deleting file 'drivers/bluetooth/bcm203x.o'
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:485:drivers/bluetooth] Error 2 make[2]: *** [scripts/Makefile.build:485: drivers] Error 2
make[1]: *** [/github/workspace/src/src/Makefile:1919: .] Error 2
make: *** [Makefile:240: __sub-make] Error 2
##############################
Test: TestRunner_l2cap-tester - FAIL
Desc: Run l2cap-tester with test-runner
Output:
Total: 55, Passed: 53 (96.4%), Failed: 2, Not Run: 0Failed Test Cases
L2CAP BR/EDR Client - TX Timestamping Timed out 2.313 seconds L2CAP LE Client - TX Timestamping Timed out 2.208 seconds##############################
Test: TestRunner_iso-tester - FAIL
Desc: Run iso-tester with test-runner
Output:
Total: 122, Passed: 118 (96.7%), Failed: 4, Not Run: 0
Quoted 5 lines
Failed Test Cases
ISO Send - TX Timestamping Timed out 2.741 seconds ISO Send - TX Sched Timestamping Timed out 1.990 seconds ISO Send - TX CMSG Timestamping Timed out 2.002 seconds ISO Send - TX No Poll Timestamping Failed 0.162 seconds
I guess we should disable (not run) these tests that requires SO_TIMESTAMP for now.
Quoted 14 lines
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner Output:
Total: 492, Passed: 489 (99.4%), Failed: 1, Not Run: 2Failed Test Cases
Read Exp Feature - Success (Index None) Failed 0.080 seconds
##############################
Test: TestRunner_sco-tester - FAIL
Desc: Run sco-tester with test-runner Output:
Total: 15, Passed: 14 (93.3%), Failed: 1, Not Run: 0
Quoted 3 lines
Failed Test Cases
SCO CVSD Send - TX Timestamping Timed out 2.245 seconds
##############################
Ditto.
Quoted 13 lines
Test: TestRunner_mesh-tester - FAIL
Desc: Run mesh-tester with test-runner Output:
Total: 10, Passed: 9 (90.0%), Failed: 1, Not Run: 0Failed Test Cases
Mesh - Send cancel - 1 Failed 0.104 seconds---
Regards,
Linux Bluetooth
Signature · 1 line
Luiz Augusto von Dentz