aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-07-14 14:13:48 -0400
committerMarcel Holtmann <marcel@holtmann.org>2008-07-14 14:13:48 -0400
commit41a96212b3b7b3cd59e8e8d33e6dabf0e21d9778 (patch)
tree3ba680af5e3f984d7b32a25c4d71685a54541a8f /include/net/bluetooth
parent333140b57fa7867bc92e5ee879b6ac4ef5e1d867 (diff)
[Bluetooth] Track status of remote Simple Pairing mode
The Simple Pairing process can only be used if both sides have the support enabled in the host stack. The current Bluetooth specification has three ways to detect this support. If an Extended Inquiry Result has been sent during inquiry then it is safe to assume that Simple Pairing is enabled. It is not allowed to enable Extended Inquiry without Simple Pairing. During the remote name request phase a notification with the remote host supported features will be sent to indicate Simple Pairing support. Also the second page of the remote extended features can indicate support for Simple Pairing. For all three cases the value of remote Simple Pairing mode is stored in the inquiry cache for later use. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net/bluetooth')
-rw-r--r--include/net/bluetooth/hci.h6
-rw-r--r--include/net/bluetooth/hci_core.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 6d0c04a81fc7..5ac0a18db63c 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -816,6 +816,12 @@ struct hci_ev_simple_pair_complete {
816 bdaddr_t bdaddr; 816 bdaddr_t bdaddr;
817} __attribute__ ((packed)); 817} __attribute__ ((packed));
818 818
819#define HCI_EV_REMOTE_HOST_FEATURES 0x3d
820struct hci_ev_remote_host_features {
821 bdaddr_t bdaddr;
822 __u8 features[8];
823} __attribute__ ((packed));
824
819/* Internal events generated by Bluetooth stack */ 825/* Internal events generated by Bluetooth stack */
820#define HCI_EV_STACK_INTERNAL 0xfd 826#define HCI_EV_STACK_INTERNAL 0xfd
821struct hci_ev_stack_internal { 827struct hci_ev_stack_internal {
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index b85754e29a78..f73cc2945700 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -40,6 +40,7 @@ struct inquiry_data {
40 __u8 dev_class[3]; 40 __u8 dev_class[3];
41 __le16 clock_offset; 41 __le16 clock_offset;
42 __s8 rssi; 42 __s8 rssi;
43 __u8 ssp_mode;
43}; 44};
44 45
45struct inquiry_entry { 46struct inquiry_entry {
@@ -162,6 +163,7 @@ struct hci_conn {
162 __u8 attempt; 163 __u8 attempt;
163 __u8 dev_class[3]; 164 __u8 dev_class[3];
164 __u8 features[8]; 165 __u8 features[8];
166 __u8 ssp_mode;
165 __u16 interval; 167 __u16 interval;
166 __u16 pkt_type; 168 __u16 pkt_type;
167 __u16 link_policy; 169 __u16 link_policy;