Bluetooth: Move hci_abort_conn to hci_conn.c
Subsystems (2)
PATCH v2 1/1 Bluetooth: Move hci_abort_conn to hci_conn.c
hci_abort_conn() is a wrapper around a number of DISCONNECT and CREATE_CONN_CANCEL commands that was being invoked from hci_request request queues, which are now deprecated. There are two versions:hci_abort_conn() which can be invoked from the hci_event thread, and hci_abort_conn_sync() which can be invoked within a hci_sync cmd chain.
--- include/net/bluetooth/hci_core.h | 1 + net/bluetooth/hci_conn.c | 76 ++++++++++++++++++++++++++ net/bluetooth/hci_request.c | 93 -------------------------------- net/bluetooth/hci_request.h | 1 - net/bluetooth/mgmt.c | 16 +++++- 5 files changed, 92 insertions(+), 95 deletions(-)
include/net/bluetooth/hci_core.h +1 -0
@@ -2075,6 +2075,7 @@ int mgmt_phy_configuration_changed(struct hci_dev *hdev, struct sock *skip);void mgmt_adv_monitor_device_lost (struct hci_dev *hdev,u16 handle,bdaddr_t *bdaddr,u8 addr_type); +int hci_abort_conn (struct hci_conn *conn,u8 reason);u8 hci_le_conn_update (struct hci_conn *conn,u16 min,u16 max,u16 latency,u16 to_multiplier); void hci_le_start_enc(struct hci_conn *conn, __le16 ediv, __le64 rand,
net/bluetooth/hci_conn.c +76 -0
79 lines not on this page · raw message
net/bluetooth/hci_request.c +0 -93
99 lines not on this page · raw message
net/bluetooth/hci_request.h +0 -1
@@ -73,6 +73,5 @@ void hci_req_add_le_passive_scan(struct hci_request *req);void hci_req_prepare_suspend (struct hci_dev *hdev,enum suspended_state next); -int hci_abort_conn (struct hci_conn *conn,u8 reason);void hci_request_setup (struct hci_dev *hdev);void hci_request_cancel_all (struct hci_dev *hdev);
net/bluetooth/mgmt.c +15 -1
@@ -3185,6 +3185,19 @@ static int pair_device(struct sock *sk, struct hci_dev *hdev, void *data,return err; } +static int abort_conn_sync (struct hci_dev *hdev,void *data) +{ +struct hci_conn *conn; +__u8 handle = (__u8 )PTR_ERR (data); + + conn =hci_conn_hash_lookup_big (hdev, handle); + +if (!conn) +return 0 ; + +return hci_abort_conn_sync (hdev, conn,HCI_ERROR_REMOTE_USER_TERM ); +} +static int cancel_pair_device (struct sock *sk,struct hci_dev *hdev,void *data,u16 len) {
@@ -3235,7 +3248,8 @@ static int cancel_pair_device(struct sock *sk, struct hci_dev *hdev, void *data, le_addr_type(addr->type));if (conn->conn_reason ==CONN_REASON_PAIR_DEVICE ) -hci_abort_conn (conn,HCI_ERROR_REMOTE_USER_TERM ); +hci_cmd_sync_queue (hdev, abort_conn_sync,ERR_PTR (conn->handle), +NULL ); unlock:hci_dev_unlock (hdev);
Signature · 1 line
2.37.1
This is an automated email and please do not reply to this email.
Dear Submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
While preparing the CI tests, the patches you submitted couldn't be applied to the current HEAD of the repository.
----- Output -----
error: patch failed: net/bluetooth/hci_request.c:909
error: net/bluetooth/hci_request.c: patch does not apply
error: patch failed: net/bluetooth/hci_request.h:73
error: net/bluetooth/hci_request.h: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Please resolve the issue and submit the patches again.
---
Regards,
Linux Bluetooth