diff options
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r-- | net/bluetooth/hci_event.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index f91ba690f5d2..55534244c3a0 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -484,6 +484,15 @@ static void hci_cc_read_local_features(struct hci_dev *hdev, struct sk_buff *skb | |||
484 | if (hdev->features[4] & LMP_EV5) | 484 | if (hdev->features[4] & LMP_EV5) |
485 | hdev->esco_type |= (ESCO_EV5); | 485 | hdev->esco_type |= (ESCO_EV5); |
486 | 486 | ||
487 | if (hdev->features[5] & LMP_EDR_ESCO_2M) | ||
488 | hdev->esco_type |= (ESCO_2EV3); | ||
489 | |||
490 | if (hdev->features[5] & LMP_EDR_ESCO_3M) | ||
491 | hdev->esco_type |= (ESCO_3EV3); | ||
492 | |||
493 | if (hdev->features[5] & LMP_EDR_3S_ESCO) | ||
494 | hdev->esco_type |= (ESCO_2EV5 | ESCO_3EV5); | ||
495 | |||
487 | BT_DBG("%s features 0x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x", hdev->name, | 496 | BT_DBG("%s features 0x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x", hdev->name, |
488 | hdev->features[0], hdev->features[1], | 497 | hdev->features[0], hdev->features[1], |
489 | hdev->features[2], hdev->features[3], | 498 | hdev->features[2], hdev->features[3], |
@@ -914,7 +923,8 @@ static inline void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *s | |||
914 | if (ev->status) { | 923 | if (ev->status) { |
915 | hci_proto_connect_cfm(conn, ev->status); | 924 | hci_proto_connect_cfm(conn, ev->status); |
916 | hci_conn_del(conn); | 925 | hci_conn_del(conn); |
917 | } | 926 | } else if (ev->link_type != ACL_LINK) |
927 | hci_proto_connect_cfm(conn, ev->status); | ||
918 | 928 | ||
919 | unlock: | 929 | unlock: |
920 | hci_dev_unlock(hdev); | 930 | hci_dev_unlock(hdev); |
@@ -1009,9 +1019,7 @@ static inline void hci_disconn_complete_evt(struct hci_dev *hdev, struct sk_buff | |||
1009 | if (conn) { | 1019 | if (conn) { |
1010 | conn->state = BT_CLOSED; | 1020 | conn->state = BT_CLOSED; |
1011 | 1021 | ||
1012 | hci_conn_del_sysfs(conn); | 1022 | hci_proto_disconn_cfm(conn, ev->reason); |
1013 | |||
1014 | hci_proto_disconn_ind(conn, ev->reason); | ||
1015 | hci_conn_del(conn); | 1023 | hci_conn_del(conn); |
1016 | } | 1024 | } |
1017 | 1025 | ||
@@ -1600,7 +1608,8 @@ static inline void hci_remote_ext_features_evt(struct hci_dev *hdev, struct sk_b | |||
1600 | 1608 | ||
1601 | if (conn->state == BT_CONFIG) { | 1609 | if (conn->state == BT_CONFIG) { |
1602 | if (!ev->status && hdev->ssp_mode > 0 && | 1610 | if (!ev->status && hdev->ssp_mode > 0 && |
1603 | conn->ssp_mode > 0 && conn->out) { | 1611 | conn->ssp_mode > 0 && conn->out && |
1612 | conn->sec_level != BT_SECURITY_SDP) { | ||
1604 | struct hci_cp_auth_requested cp; | 1613 | struct hci_cp_auth_requested cp; |
1605 | cp.handle = ev->handle; | 1614 | cp.handle = ev->handle; |
1606 | hci_send_cmd(hdev, HCI_OP_AUTH_REQUESTED, | 1615 | hci_send_cmd(hdev, HCI_OP_AUTH_REQUESTED, |
@@ -1637,6 +1646,13 @@ static inline void hci_sync_conn_complete_evt(struct hci_dev *hdev, struct sk_bu | |||
1637 | conn->type = SCO_LINK; | 1646 | conn->type = SCO_LINK; |
1638 | } | 1647 | } |
1639 | 1648 | ||
1649 | if (conn->out && ev->status == 0x1c && conn->attempt < 2) { | ||
1650 | conn->pkt_type = (hdev->esco_type & SCO_ESCO_MASK) | | ||
1651 | (hdev->esco_type & EDR_ESCO_MASK); | ||
1652 | hci_setup_sync(conn, conn->link->handle); | ||
1653 | goto unlock; | ||
1654 | } | ||
1655 | |||
1640 | if (!ev->status) { | 1656 | if (!ev->status) { |
1641 | conn->handle = __le16_to_cpu(ev->handle); | 1657 | conn->handle = __le16_to_cpu(ev->handle); |
1642 | conn->state = BT_CONNECTED; | 1658 | conn->state = BT_CONNECTED; |