aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2011-01-04 08:40:05 -0500
committerGustavo F. Padovan <padovan@profusion.mobi>2011-02-07 22:40:06 -0500
commit03b555e119de8288a16e086e1fbd223d9b429d3d (patch)
tree5f0dd5efc8439ba4300761bc9ebba22c3d718c06 /include/net
parent930e13363fb0e94db6e8b59c54dfb5c59355113e (diff)
Bluetooth: Reject pairing requests when in non-pairable mode
This patch adds the necessary logic to act accordingly when the HCI_PAIRABLE flag is not set. In that case PIN code replies as well as Secure Simple Pairing requests without a NoBonding requirement need to be rejected. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/hci.h14
-rw-r--r--include/net/bluetooth/hci_core.h4
2 files changed, 18 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index f0c25b5ba4b..65cab137e19 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -384,6 +384,12 @@ struct hci_cp_reject_sync_conn_req {
384 __u8 reason; 384 __u8 reason;
385} __packed; 385} __packed;
386 386
387#define HCI_OP_IO_CAPABILITY_NEG_REPLY 0x0434
388struct hci_cp_io_capability_neg_reply {
389 bdaddr_t bdaddr;
390 __u8 reason;
391} __packed;
392
387#define HCI_OP_SNIFF_MODE 0x0803 393#define HCI_OP_SNIFF_MODE 0x0803
388struct hci_cp_sniff_mode { 394struct hci_cp_sniff_mode {
389 __le16 handle; 395 __le16 handle;
@@ -840,6 +846,14 @@ struct hci_ev_io_capa_request {
840 bdaddr_t bdaddr; 846 bdaddr_t bdaddr;
841} __packed; 847} __packed;
842 848
849#define HCI_EV_IO_CAPA_REPLY 0x32
850struct hci_ev_io_capa_reply {
851 bdaddr_t bdaddr;
852 __u8 capability;
853 __u8 oob_data;
854 __u8 authentication;
855} __packed;
856
843#define HCI_EV_SIMPLE_PAIR_COMPLETE 0x36 857#define HCI_EV_SIMPLE_PAIR_COMPLETE 0x36
844struct hci_ev_simple_pair_complete { 858struct hci_ev_simple_pair_complete {
845 __u8 status; 859 __u8 status;
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 8ee0b8bac77..dc8084a139e 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -201,6 +201,10 @@ struct hci_conn {
201 __u16 disc_timeout; 201 __u16 disc_timeout;
202 unsigned long pend; 202 unsigned long pend;
203 203
204 __u8 remote_cap;
205 __u8 remote_oob;
206 __u8 remote_auth;
207
204 unsigned int sent; 208 unsigned int sent;
205 209
206 struct sk_buff_head data_q; 210 struct sk_buff_head data_q;