Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH v2 1/3] Bluetooth: Fix hci_conn timeout routine
@ 2013-01-30 14:50 Andre Guedes
  2013-01-30 14:50 ` [PATCH v2 2/3] Bluetooth: Rename hci_acl_disconn Andre Guedes
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Andre Guedes @ 2013-01-30 14:50 UTC (permalink / raw)
  To: linux-bluetooth

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 <andre.guedes@openbossa.org>
---
 net/bluetooth/hci_conn.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 25bfce0..4925a02 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -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;
 	}
 }
 
-- 
1.8.1.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-02-20 17:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-30 14:50 [PATCH v2 1/3] Bluetooth: Fix hci_conn timeout routine Andre Guedes
2013-01-30 14:50 ` [PATCH v2 2/3] Bluetooth: Rename hci_acl_disconn Andre Guedes
2013-02-20 17:41   ` Gustavo Padovan
2013-01-30 14:50 ` [PATCH v2 3/3] Bluetooth: Reduce critical section in sco_conn_ready Andre Guedes
2013-01-31 17:39 ` [PATCH v2 1/3] Bluetooth: Fix hci_conn timeout routine Gustavo Padovan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox