diff options
Diffstat (limited to 'net/bluetooth/hci_conn.c')
-rw-r--r-- | net/bluetooth/hci_conn.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 98f97a1e9bbb..2435e830ba60 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c | |||
@@ -123,6 +123,8 @@ void hci_add_sco(struct hci_conn *conn, __u16 handle) | |||
123 | conn->state = BT_CONNECT; | 123 | conn->state = BT_CONNECT; |
124 | conn->out = 1; | 124 | conn->out = 1; |
125 | 125 | ||
126 | conn->attempt++; | ||
127 | |||
126 | cp.handle = cpu_to_le16(handle); | 128 | cp.handle = cpu_to_le16(handle); |
127 | cp.pkt_type = cpu_to_le16(conn->pkt_type); | 129 | cp.pkt_type = cpu_to_le16(conn->pkt_type); |
128 | 130 | ||
@@ -139,6 +141,8 @@ void hci_setup_sync(struct hci_conn *conn, __u16 handle) | |||
139 | conn->state = BT_CONNECT; | 141 | conn->state = BT_CONNECT; |
140 | conn->out = 1; | 142 | conn->out = 1; |
141 | 143 | ||
144 | conn->attempt++; | ||
145 | |||
142 | cp.handle = cpu_to_le16(handle); | 146 | cp.handle = cpu_to_le16(handle); |
143 | cp.pkt_type = cpu_to_le16(conn->pkt_type); | 147 | cp.pkt_type = cpu_to_le16(conn->pkt_type); |
144 | 148 | ||
@@ -216,12 +220,13 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst) | |||
216 | break; | 220 | break; |
217 | case SCO_LINK: | 221 | case SCO_LINK: |
218 | if (lmp_esco_capable(hdev)) | 222 | if (lmp_esco_capable(hdev)) |
219 | conn->pkt_type = hdev->esco_type & SCO_ESCO_MASK; | 223 | conn->pkt_type = (hdev->esco_type & SCO_ESCO_MASK) | |
224 | (hdev->esco_type & EDR_ESCO_MASK); | ||
220 | else | 225 | else |
221 | conn->pkt_type = hdev->pkt_type & SCO_PTYPE_MASK; | 226 | conn->pkt_type = hdev->pkt_type & SCO_PTYPE_MASK; |
222 | break; | 227 | break; |
223 | case ESCO_LINK: | 228 | case ESCO_LINK: |
224 | conn->pkt_type = hdev->esco_type; | 229 | conn->pkt_type = hdev->esco_type & ~EDR_ESCO_MASK; |
225 | break; | 230 | break; |
226 | } | 231 | } |
227 | 232 | ||