Bluetooth: Don't use hci_acl_connect_cancel() for incoming connections
[pandora-kernel.git] / net / bluetooth / hci_conn.c
index 61309b2..fa47d5d 100644 (file)
@@ -171,10 +171,8 @@ static void hci_conn_timeout(unsigned long arg)
        switch (conn->state) {
        case BT_CONNECT:
        case BT_CONNECT2:
-               if (conn->type == ACL_LINK)
+               if (conn->type == ACL_LINK && conn->out)
                        hci_acl_connect_cancel(conn);
-               else
-                       hci_acl_disconn(conn, 0x13);
                break;
        case BT_CONFIG:
        case BT_CONNECTED:
@@ -292,6 +290,8 @@ int hci_conn_del(struct hci_conn *conn)
 
        hci_conn_del_sysfs(conn);
 
+       hci_dev_put(hdev);
+
        return 0;
 }