aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-07-14 14:13:49 -0400
committerMarcel Holtmann <marcel@holtmann.org>2008-07-14 14:13:49 -0400
commit769be974d0c7b4fe1a52f9cdaad22259b60953f7 (patch)
treeb07af753550c892beb7223d474298806cbf919d5 /include/net
parenta8bd28baf21b9ee6b8486666b771283e566c0d31 (diff)
[Bluetooth] Use ACL config stage to retrieve remote features
The Bluetooth technology introduces new features on a regular basis and for some of them it is important that the hardware on both sides support them. For features like Simple Pairing it is important that the host stacks on both sides have switched this feature on. To make valid decisions, a config stage during ACL link establishment has been introduced that retrieves remote features and if needed also the remote extended features (known as remote host features) before signalling this link as connected. This change introduces full reference counting of incoming and outgoing ACL links and the Bluetooth core will disconnect both if no owner of it is present. To better handle interoperability during the pairing phase the disconnect timeout for incoming connections has been increased to 10 seconds. This is five times more than for outgoing connections. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/hci.h2
-rw-r--r--include/net/bluetooth/hci_core.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 5ac0a18db63c..55576e848827 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -180,6 +180,8 @@ enum {
180 180
181#define LMP_SNIFF_SUBR 0x02 181#define LMP_SNIFF_SUBR 0x02
182 182
183#define LMP_SIMPLE_PAIR 0x08
184
183/* Connection modes */ 185/* Connection modes */
184#define HCI_CM_ACTIVE 0x0000 186#define HCI_CM_ACTIVE 0x0000
185#define HCI_CM_HOLD 0x0001 187#define HCI_CM_HOLD 0x0001
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index f73cc2945700..28fbd0caa534 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -348,7 +348,7 @@ static inline void hci_conn_put(struct hci_conn *conn)
348 if (conn->state == BT_CONNECTED) { 348 if (conn->state == BT_CONNECTED) {
349 timeo = msecs_to_jiffies(HCI_DISCONN_TIMEOUT); 349 timeo = msecs_to_jiffies(HCI_DISCONN_TIMEOUT);
350 if (!conn->out) 350 if (!conn->out)
351 timeo *= 2; 351 timeo *= 5;
352 } else 352 } else
353 timeo = msecs_to_jiffies(10); 353 timeo = msecs_to_jiffies(10);
354 } else 354 } else
@@ -463,6 +463,7 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
463#define lmp_sniff_capable(dev) ((dev)->features[0] & LMP_SNIFF) 463#define lmp_sniff_capable(dev) ((dev)->features[0] & LMP_SNIFF)
464#define lmp_sniffsubr_capable(dev) ((dev)->features[5] & LMP_SNIFF_SUBR) 464#define lmp_sniffsubr_capable(dev) ((dev)->features[5] & LMP_SNIFF_SUBR)
465#define lmp_esco_capable(dev) ((dev)->features[3] & LMP_ESCO) 465#define lmp_esco_capable(dev) ((dev)->features[3] & LMP_ESCO)
466#define lmp_ssp_capable(dev) ((dev)->features[6] & LMP_SIMPLE_PAIR)
466 467
467/* ----- HCI protocols ----- */ 468/* ----- HCI protocols ----- */
468struct hci_proto { 469struct hci_proto {