aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2006-10-15 11:30:56 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-10-16 02:14:30 -0400
commit4c67bc74f016b0d360b8573e18969c0ff7926974 (patch)
treed5eec3da59b642f48e7fcc2034b6d90b5fa54e01 /include/net
parente9c4bec63eac001651d6d30239dd4175cc3698ef (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 'include/net')
-rw-r--r--include/net/bluetooth/hci_core.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index df22efcfcc0b..c0fc39620f36 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -153,6 +153,7 @@ struct hci_conn {
153 __u8 mode; 153 __u8 mode;
154 __u8 type; 154 __u8 type;
155 __u8 out; 155 __u8 out;
156 __u8 attempt;
156 __u8 dev_class[3]; 157 __u8 dev_class[3];
157 __u8 features[8]; 158 __u8 features[8];
158 __u16 interval; 159 __u16 interval;
@@ -289,6 +290,22 @@ static inline struct hci_conn *hci_conn_hash_lookup_ba(struct hci_dev *hdev,
289 return NULL; 290 return NULL;
290} 291}
291 292
293static inline struct hci_conn *hci_conn_hash_lookup_state(struct hci_dev *hdev,
294 __u8 type, __u16 state)
295{
296 struct hci_conn_hash *h = &hdev->conn_hash;
297 struct list_head *p;
298 struct hci_conn *c;
299
300 list_for_each(p, &h->list) {
301 c = list_entry(p, struct hci_conn, list);
302 if (c->type == type && c->state == state)
303 return c;
304 }
305 return NULL;
306}
307
308void hci_acl_connect(struct hci_conn *conn);
292void hci_acl_disconn(struct hci_conn *conn, __u8 reason); 309void hci_acl_disconn(struct hci_conn *conn, __u8 reason);
293void hci_add_sco(struct hci_conn *conn, __u16 handle); 310void hci_add_sco(struct hci_conn *conn, __u16 handle);
294 311