summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_request.h
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2015-10-22 09:49:37 +0200
committerMarcel Holtmann <marcel@holtmann.org>2015-10-22 11:37:22 +0200
commitdcc0f0d9ce839e1cc97b95d9dac364047bd1b975 (patch)
tree776ada825bb3dafaf02520fd95da1397467d8862 /net/bluetooth/hci_request.h
parentBluetooth: hci_bcm: checking for ERR_PTR instead of NULL (diff)
downloadlinux-dcc0f0d9ce839e1cc97b95d9dac364047bd1b975.tar.xz
linux-dcc0f0d9ce839e1cc97b95d9dac364047bd1b975.zip
Bluetooth: Introduce hci_req helper to abort a connection
There are several different places needing to make sure that a connection gets disconnected or canceled. The exact action needed depends on the connection state, so centralizing this logic can save quite a lot of code duplication. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_request.h')
-rw-r--r--net/bluetooth/hci_request.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bluetooth/hci_request.h b/net/bluetooth/hci_request.h
index bf6df92f42db..25c7f1305dcb 100644
--- a/net/bluetooth/hci_request.h
+++ b/net/bluetooth/hci_request.h
@@ -55,3 +55,7 @@ int hci_update_random_address(struct hci_request *req, bool require_privacy,
void hci_update_background_scan(struct hci_dev *hdev);
void __hci_update_background_scan(struct hci_request *req);
+
+int hci_abort_conn(struct hci_conn *conn, u8 reason);
+void __hci_abort_conn(struct hci_request *req, struct hci_conn *conn,
+ u8 reason);