Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328179
b: refs/heads/master
c: db47427
h: refs/heads/master
i:
  328177: 4318d71
  328175: 83bdc6b
v: v3
  • Loading branch information
Vinicius Costa Gomes authored and Gustavo Padovan committed Aug 15, 2012
1 parent 32e90e3 commit 833d5fd
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d04aef4cccf203fdfd1716e9ba458060cbab0928
refs/heads/master: db4742756ae2a836618cd5acf599522573589149
32 changes: 22 additions & 10 deletions trunk/net/bluetooth/hci_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,18 +497,10 @@ static struct hci_conn *hci_connect_le(struct hci_dev *hdev, bdaddr_t *dst,
return le;
}

/* Create SCO, ACL or LE connection.
* Device _must_ be locked */
struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst,
__u8 dst_type, __u8 sec_level, __u8 auth_type)
static struct hci_conn *hci_connect_acl(struct hci_dev *hdev, bdaddr_t *dst,
u8 sec_level, u8 auth_type)
{
struct hci_conn *acl;
struct hci_conn *sco;

BT_DBG("%s dst %s", hdev->name, batostr(dst));

if (type == LE_LINK)
return hci_connect_le(hdev, dst, dst_type, sec_level, auth_type);

acl = hci_conn_hash_lookup_ba(hdev, ACL_LINK, dst);
if (!acl) {
Expand All @@ -526,6 +518,26 @@ struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst,
hci_acl_create_connection(acl);
}

return acl;
}

/* Create SCO, ACL or LE connection.
* Device _must_ be locked */
struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst,
__u8 dst_type, __u8 sec_level, __u8 auth_type)
{
struct hci_conn *acl;
struct hci_conn *sco;

BT_DBG("%s dst %s", hdev->name, batostr(dst));

if (type == LE_LINK)
return hci_connect_le(hdev, dst, dst_type, sec_level, auth_type);

acl = hci_connect_acl(hdev, dst, sec_level, auth_type);
if (IS_ERR(acl))
return acl;

if (type == ACL_LINK)
return acl;

Expand Down

0 comments on commit 833d5fd

Please sign in to comment.