Bluetooth: hci_conn: Fix not setting conn_timeout for Broadcast Receiver
Subsystems (2)
Luiz Augusto von Dentz
maintainerPATCH 1/1 Bluetooth: hci_conn: Fix not setting conn_timeout for Broadcast Receiver
From: Luiz Augusto von Dentz <[email protected]>
Broadcast Receiver requires creating PA sync but the command just generates a status so this makes use of __hci_cmd_sync_status_sk to wait for HCI_EV_LE_PA_SYNC_ESTABLISHED, also because of this chance it is not longer necessary to use a custom method to serialize the process of creating the PA sync since the cmd_work_sync itself ensures only one command would be pending which now awaits for HCI_EV_LE_PA_SYNC_ESTABLISHED before proceeding to next connection.
--- include/net/bluetooth/hci_core.h | 2 - include/net/bluetooth/hci_sync.h | 2 + net/bluetooth/hci_conn.c | 92 +------------------------------- net/bluetooth/hci_event.c | 4 -- net/bluetooth/hci_sync.c | 65 ++++++++++++++++++++++ 5 files changed, 69 insertions(+), 96 deletions(-)
include/net/bluetooth/hci_core.h +0 -2
@@ -960,7 +960,6 @@ enum {HCI_CONN_CREATE_BIG_SYNC ,HCI_CONN_BIG_SYNC ,HCI_CONN_BIG_SYNC_FAILED , -HCI_CONN_CREATE_PA_SYNC ,HCI_CONN_PA_SYNC , HCI_CONN_PA_SYNC_FAILED, };
@@ -1524,7 +1523,6 @@ bool hci_setup_sync(struct hci_conn *conn, __u16 handle);void hci_sco_setup (struct hci_conn *conn,__u8 status);bool hci_iso_setup_path (struct hci_conn *conn);int hci_le_create_cis_pending (struct hci_dev *hdev); -int hci_pa_create_sync_pending (struct hci_dev *hdev);int hci_le_big_create_sync_pending (struct hci_dev *hdev);int hci_conn_check_create_cis (struct hci_conn *conn);
include/net/bluetooth/hci_sync.h +2 -0
@@ -185,3 +185,5 @@ 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); + +int hci_connect_pa_sync (struct hci_dev *hdev,struct hci_conn *conn);
net/bluetooth/hci_conn.c +2 -90
107 lines not on this page · raw message
net/bluetooth/hci_event.c +0 -4
@@ -6387,8 +6387,6 @@ static void hci_le_pa_sync_estabilished_evt(struct hci_dev *hdev, void *data, goto unlock; } -clear_bit (HCI_CONN_CREATE_PA_SYNC , &conn->flags); - conn->sync_handle =le16_to_cpu (ev->handle); conn->sid =HCI_SID_INVALID ;
@@ -6418,8 +6416,6 @@ static void hci_le_pa_sync_estabilished_evt(struct hci_dev *hdev, void *data, } unlock: -/* Handle any other pending PA sync command */ -hci_pa_create_sync_pending (hdev);hci_dev_unlock (hdev); }
net/bluetooth/hci_sync.c +65 -0
68 lines not on this page · raw message
Signature · 1 line
2.49.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=951731
---Test result---
Test Summary:
CheckPatch PENDING 0.33 seconds GitLint PENDING 0.19 seconds SubjectPrefix PASS 29.43 seconds BuildKernel PASS 24.06 seconds CheckAllWarning PASS 26.49 seconds CheckSparse WARNING 29.70 seconds BuildKernel32 PASS 23.68 seconds TestRunnerSetup PASS 453.02 seconds TestRunner_l2cap-tester PASS 24.70 seconds TestRunner_iso-tester PASS 30.66 seconds TestRunner_bnep-tester PASS 5.78 seconds TestRunner_mgmt-tester FAIL 123.23 seconds TestRunner_rfcomm-tester PASS 7.72 seconds TestRunner_sco-tester PASS 29.02 seconds TestRunner_ioctl-tester PASS 9.50 seconds TestRunner_mesh-tester FAIL 8.16 seconds TestRunner_smp-tester PASS 7.12 seconds TestRunner_userchan-tester PASS 5.50 seconds IncrementalBuild PENDING 0.70 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: CheckSparse - WARNING
Desc: Run sparse tool with linux kernel
Output:net/bluetooth/hci_event.c: note: in included file (through include/net/bluetooth/hci_core.h):
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 490, Passed: 485 (99.0%), Failed: 1, Not Run: 4
Failed Test Cases
LL Privacy - Set Flags 3 (2 Devices to RL) Failed 0.171 seconds
##############################
Test: TestRunner_mesh-tester - FAIL
Desc: Run mesh-tester with test-runner
Output:
BUG: KASAN: slab-use-after-free in run_timer_softirq+0x76f/0x7d0 WARNING: CPU: 0 PID: 66 at kernel/workqueue.c:2257 __queue_work+0x93e/0xba0
Total: 10, Passed: 9 (90.0%), Failed: 1, Not Run: 0
Failed Test Cases
Mesh - Send cancel - 1 Failed 0.100 seconds
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series Output:
---
Regards,
Linux Bluetooth