diff options
| author | Vinicius Costa Gomes <vinicius.gomes@openbossa.org> | 2012-08-17 20:37:59 -0400 |
|---|---|---|
| committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-08-21 13:54:42 -0400 |
| commit | f91c8468df97d0ac18132eb38283524a74317901 (patch) | |
| tree | 32c8c4d2aea373cba1e8c44c694b9355afd4abc5 /net/bluetooth | |
| parent | 144ad33020a0af66fbb188ef3f13ca91c5326a69 (diff) | |
Bluetooth: Fix establishing ESCO links
Commit 4cd2d98340b4f03d5532c30fdaeb451b035429cb "Bluetooth: Simplify
the connection type handling" broke the creation of ESCO links.
This patch adds a type parameter to hci_connect_sco() so it creates
the connection of the right kind.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth')
| -rw-r--r-- | net/bluetooth/hci_conn.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 98670b1df17b..3e65c021df50 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c | |||
| @@ -521,8 +521,8 @@ static struct hci_conn *hci_connect_acl(struct hci_dev *hdev, bdaddr_t *dst, | |||
| 521 | return acl; | 521 | return acl; |
| 522 | } | 522 | } |
| 523 | 523 | ||
| 524 | static struct hci_conn *hci_connect_sco(struct hci_dev *hdev, bdaddr_t *dst, | 524 | static struct hci_conn *hci_connect_sco(struct hci_dev *hdev, int type, |
| 525 | u8 sec_level, u8 auth_type) | 525 | bdaddr_t *dst, u8 sec_level, u8 auth_type) |
| 526 | { | 526 | { |
| 527 | struct hci_conn *acl; | 527 | struct hci_conn *acl; |
| 528 | struct hci_conn *sco; | 528 | struct hci_conn *sco; |
| @@ -531,9 +531,9 @@ static struct hci_conn *hci_connect_sco(struct hci_dev *hdev, bdaddr_t *dst, | |||
| 531 | if (IS_ERR(acl)) | 531 | if (IS_ERR(acl)) |
| 532 | return acl; | 532 | return acl; |
| 533 | 533 | ||
| 534 | sco = hci_conn_hash_lookup_ba(hdev, SCO_LINK, dst); | 534 | sco = hci_conn_hash_lookup_ba(hdev, type, dst); |
| 535 | if (!sco) { | 535 | if (!sco) { |
| 536 | sco = hci_conn_add(hdev, SCO_LINK, dst); | 536 | sco = hci_conn_add(hdev, type, dst); |
| 537 | if (!sco) { | 537 | if (!sco) { |
| 538 | hci_conn_put(acl); | 538 | hci_conn_put(acl); |
| 539 | return ERR_PTR(-ENOMEM); | 539 | return ERR_PTR(-ENOMEM); |
| @@ -574,7 +574,8 @@ struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, | |||
| 574 | case ACL_LINK: | 574 | case ACL_LINK: |
| 575 | return hci_connect_acl(hdev, dst, sec_level, auth_type); | 575 | return hci_connect_acl(hdev, dst, sec_level, auth_type); |
| 576 | case SCO_LINK: | 576 | case SCO_LINK: |
| 577 | return hci_connect_sco(hdev, dst, sec_level, auth_type); | 577 | case ESCO_LINK: |
| 578 | return hci_connect_sco(hdev, type, dst, sec_level, auth_type); | ||
| 578 | } | 579 | } |
| 579 | 580 | ||
| 580 | return ERR_PTR(-EINVAL); | 581 | return ERR_PTR(-EINVAL); |
