Bluetooth: Handle disconnect for LE links.

Additional check whether the disconnect request is
coming on LE link.

Change-Id: I525efe6f3b0eeafbec2c5b60ba0a10b7cd298eea
Signed-off-by: Inga Stotland <ingas@codeaurora.org>
This commit is contained in:
Inga Stotland 2011-08-23 16:13:39 -07:00 committed by Stephen Boyd
parent 4c0394c36c
commit a9342681d8

View file

@ -1110,8 +1110,12 @@ static int disconnect(struct sock *sk, u16 index, unsigned char *data, u16 len)
conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &cp->bdaddr);
if (!conn) {
err = cmd_status(sk, index, MGMT_OP_DISCONNECT, ENOTCONN);
goto failed;
conn = hci_conn_hash_lookup_ba(hdev, LE_LINK, &cp->bdaddr);
if (!conn) {
err = cmd_status(sk, index, MGMT_OP_DISCONNECT,
ENOTCONN);
goto failed;
}
}
cmd = mgmt_pending_add(sk, MGMT_OP_DISCONNECT, index, data, len);