diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2012-10-31 09:46:34 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-11-01 18:27:09 -0400 |
commit | 419e08c1121ab346bf5f66fe0a21950529355cee (patch) | |
tree | b6cae064f3d8dc9f5be29ced705caae341b956a9 /net/bluetooth/amp.c | |
parent | e58917b990ef0cc3903aa962236a0dae4f1f81a0 (diff) |
Bluetooth: Disconnect logical link when deleting chan
Disconnect logical link for high speed channel hs_hchan
associated with L2CAP channel chan.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth/amp.c')
-rw-r--r-- | net/bluetooth/amp.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/net/bluetooth/amp.c b/net/bluetooth/amp.c index 0f3fef34eabc..917e034b9aa5 100644 --- a/net/bluetooth/amp.c +++ b/net/bluetooth/amp.c | |||
@@ -422,6 +422,20 @@ done: | |||
422 | hci_dev_put(hdev); | 422 | hci_dev_put(hdev); |
423 | } | 423 | } |
424 | 424 | ||
425 | void amp_disconnect_logical_link(struct hci_chan *hchan) | ||
426 | { | ||
427 | struct hci_conn *hcon = hchan->conn; | ||
428 | struct hci_cp_disconn_logical_link cp; | ||
429 | |||
430 | if (hcon->state != BT_CONNECTED) { | ||
431 | BT_DBG("hchan %p not connected", hchan); | ||
432 | return; | ||
433 | } | ||
434 | |||
435 | cp.log_handle = cpu_to_le16(hchan->handle); | ||
436 | hci_send_cmd(hcon->hdev, HCI_OP_DISCONN_LOGICAL_LINK, sizeof(cp), &cp); | ||
437 | } | ||
438 | |||
425 | void amp_destroy_logical_link(struct hci_chan *hchan, u8 reason) | 439 | void amp_destroy_logical_link(struct hci_chan *hchan, u8 reason) |
426 | { | 440 | { |
427 | BT_DBG("hchan %p", hchan); | 441 | BT_DBG("hchan %p", hchan); |