From 2c4fadc10be892e1acb5affc448efac6dcec871d Mon Sep 17 00:00:00 2001 From: Vinicius Costa Gomes Date: Fri, 27 Jul 2012 19:32:59 -0300 Subject: [PATCH] --- yaml --- r: 328181 b: refs/heads/master c: 4cd2d98340b4f03d5532c30fdaeb451b035429cb h: refs/heads/master i: 328179: 833d5fd8b3771ec1cd76424c6cc0ac0cc0c2c0fc v: v3 --- [refs] | 2 +- trunk/net/bluetooth/hci_conn.c | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 9a5225de2a50..2899b406f463 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b7d839bfff78a01705f3d7b0acd5257dc7b067c9 +refs/heads/master: 4cd2d98340b4f03d5532c30fdaeb451b035429cb diff --git a/trunk/net/bluetooth/hci_conn.c b/trunk/net/bluetooth/hci_conn.c index de7df88a396b..2e7b7765e0ea 100644 --- a/trunk/net/bluetooth/hci_conn.c +++ b/trunk/net/bluetooth/hci_conn.c @@ -568,13 +568,16 @@ struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, { BT_DBG("%s dst %s", hdev->name, batostr(dst)); - if (type == LE_LINK) + switch (type) { + case LE_LINK: return hci_connect_le(hdev, dst, dst_type, sec_level, auth_type); - - if (type == ACL_LINK) + case ACL_LINK: return hci_connect_acl(hdev, dst, sec_level, auth_type); + case SCO_LINK: + return hci_connect_sco(hdev, dst, sec_level, auth_type); + } - return hci_connect_sco(hdev, dst, sec_level, auth_type); + return ERR_PTR(-EINVAL); } /* Check link security requirement */