diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2006-10-15 11:30:56 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-10-16 02:14:30 -0400 |
commit | 4c67bc74f016b0d360b8573e18969c0ff7926974 (patch) | |
tree | d5eec3da59b642f48e7fcc2034b6d90b5fa54e01 /net/bluetooth/hci_conn.c | |
parent | e9c4bec63eac001651d6d30239dd4175cc3698ef (diff) |
[Bluetooth] Support concurrent connect requests
Most Bluetooth chips don't support concurrent connect requests, because
this would involve a multiple baseband page with only one radio. In the
case an upper layer like L2CAP requests a concurrent connect these chips
return the error "Command Disallowed" for the second request. If this
happens it the responsibility of the Bluetooth core to queue the request
and try again after the previous connect attempt has been completed.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_conn.c')
-rw-r--r-- | net/bluetooth/hci_conn.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 90e3a285a17e..6cd5711fa28a 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c | |||
@@ -51,7 +51,7 @@ | |||
51 | #define BT_DBG(D...) | 51 | #define BT_DBG(D...) |
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | static void hci_acl_connect(struct hci_conn *conn) | 54 | void hci_acl_connect(struct hci_conn *conn) |
55 | { | 55 | { |
56 | struct hci_dev *hdev = conn->hdev; | 56 | struct hci_dev *hdev = conn->hdev; |
57 | struct inquiry_entry *ie; | 57 | struct inquiry_entry *ie; |
@@ -63,6 +63,8 @@ static void hci_acl_connect(struct hci_conn *conn) | |||
63 | conn->out = 1; | 63 | conn->out = 1; |
64 | conn->link_mode = HCI_LM_MASTER; | 64 | conn->link_mode = HCI_LM_MASTER; |
65 | 65 | ||
66 | conn->attempt++; | ||
67 | |||
66 | memset(&cp, 0, sizeof(cp)); | 68 | memset(&cp, 0, sizeof(cp)); |
67 | bacpy(&cp.bdaddr, &conn->dst); | 69 | bacpy(&cp.bdaddr, &conn->dst); |
68 | cp.pscan_rep_mode = 0x02; | 70 | cp.pscan_rep_mode = 0x02; |
@@ -80,7 +82,7 @@ static void hci_acl_connect(struct hci_conn *conn) | |||
80 | cp.role_switch = 0x01; | 82 | cp.role_switch = 0x01; |
81 | else | 83 | else |
82 | cp.role_switch = 0x00; | 84 | cp.role_switch = 0x00; |
83 | 85 | ||
84 | hci_send_cmd(hdev, OGF_LINK_CTL, OCF_CREATE_CONN, sizeof(cp), &cp); | 86 | hci_send_cmd(hdev, OGF_LINK_CTL, OCF_CREATE_CONN, sizeof(cp), &cp); |
85 | } | 87 | } |
86 | 88 | ||