Skip to content

Commit

Permalink
Bluetooth: Fix hci_conn timeout routine
Browse files Browse the repository at this point in the history
If occurs a LE or SCO hci_conn timeout and the connection is already
established (BT_CONNECTED state), the connection is not terminated as
expected. This bug can be reproduced using l2test or scotest tool.
Once the connection is established, kill l2test/scotest and the
connection won't be terminated.

This patch fixes hci_conn_disconnect helper so it is able to
terminate LE and SCO connections, as well as ACL.

Signed-off-by: Andre Guedes <[email protected]>
Signed-off-by: Gustavo Padovan <[email protected]>
  • Loading branch information
Andre Guedes authored and Gustavo Padovan committed Jan 31, 2013
1 parent 8cf9fa1 commit 4c02e2d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/bluetooth/hci_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,12 @@ static void hci_conn_disconnect(struct hci_conn *conn)
__u8 reason = hci_proto_disconn_ind(conn);

switch (conn->type) {
case ACL_LINK:
hci_acl_disconn(conn, reason);
break;
case AMP_LINK:
hci_amp_disconn(conn, reason);
break;
default:
hci_acl_disconn(conn, reason);
break;
}
}

Expand Down

0 comments on commit 4c02e2d

Please sign in to comment.