summaryrefslogtreecommitdiff
path: root/net/bluetooth/hci_event.c
diff options
context:
space:
mode:
authorAndrzej Kaczmarek <andrzej.kaczmarek@tieto.com>2011-03-17 12:17:30 +0100
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:07:32 +0200
commitcca20365f85a272c284fc91e901a7da6180ca876 (patch)
treeb1768331df254e60dd7334c6cd2bd73d0105d35f /net/bluetooth/hci_event.c
parent5bcdc61f0f3f1765382a1840cdd52a8237bd4246 (diff)
bluetooth: Add SCO parameters support for socket
Adds ability to setup SCO connection parameters through socket option. ST-Ericsson Linux next: Not tested, ER 256277 ST-Ericsson ID: 256277 ST-Ericsson FOSS-OUT ID: STETL-FOSS-OUT-10137 Change-Id: If859341019fd9f7cc7c0efe95750779e84fac801 Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/30136 Reviewed-by: Par-Gunnar HJALMDAHL <par-gunnar.p.hjalmdahl@stericsson.com> Tested-by: Par-Gunnar HJALMDAHL <par-gunnar.p.hjalmdahl@stericsson.com> Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com> Signed-off-by: Robert Marklund <robert.marklund@stericsson.com>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r--net/bluetooth/hci_event.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 1266f78fa8e..fe1f6f39160 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -1824,6 +1824,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");
@@ -2933,9 +2934,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;
}