diff options
author | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-04-06 11:11:36 +0200 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-04-06 11:11:36 +0200 |
commit | bb14f8e91a4d2bdb8643f6f166299ada8d015377 (patch) | |
tree | f212dc9be4f26684bd06bfd138444282b457949a /net/bluetooth/hci_event.c | |
parent | 180bbb1528515d262ae4bcb7244379b8dcfc9674 (diff) | |
parent | 025ddfad021effc8ea256d8aa09ddf3b1b8972e6 (diff) |
Merge topic branch 'other' into integration-linux-ux500-3.3
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r-- | net/bluetooth/hci_event.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 001307f8105..4c0dfef28ca 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -1645,6 +1645,7 @@ static inline void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *sk conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr); if (!conn) { + /* pkt_type not yet used for incoming connections */ conn = hci_conn_add(hdev, ev->link_type, &ev->bdaddr); if (!conn) { BT_ERR("No memory for new connection"); @@ -1672,9 +1673,12 @@ static inline void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *sk sizeof(cp), &cp); } else { struct hci_cp_accept_sync_conn_req cp; + __u16 pkt_type; + + pkt_type = conn->pkt_type ^ EDR_ESCO_MASK; bacpy(&cp.bdaddr, &ev->bdaddr); - cp.pkt_type = cpu_to_le16(conn->pkt_type); + cp.pkt_type = cpu_to_le16(pkt_type); cp.tx_bandwidth = cpu_to_le32(0x00001f40); cp.rx_bandwidth = cpu_to_le32(0x00001f40); @@ -2677,9 +2681,8 @@ static inline void hci_sync_conn_complete_evt(struct hci_dev *hdev, struct sk_bu case 0x1c: /* SCO interval rejected */ case 0x1a: /* Unsupported Remote Feature */ case 0x1f: /* Unspecified error */ - if (conn->out && conn->attempt < 2) { - conn->pkt_type = (hdev->esco_type & SCO_ESCO_MASK) | - (hdev->esco_type & EDR_ESCO_MASK); + if (conn->out && !conn->no_autoretry && conn->attempt < 2) { + conn->pkt_type = hdev->esco_type & SCO_ESCO_MASK; hci_setup_sync(conn, conn->link->handle); goto unlock; } |