diff options
author | Szymon Janc <szymon.janc@tieto.com> | 2011-03-22 13:12:23 +0100 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-03-31 19:22:57 +0200 |
commit | ce85ee13e6b5d078f4a6c3b02ba7cd0fa140c552 (patch) | |
tree | f0938f25965a65f1abce432f48862820c9adcf67 /net/bluetooth/hci_event.c | |
parent | Bluetooth: Add add/remove_remote_oob_data management commands (diff) | |
download | linux-ce85ee13e6b5d078f4a6c3b02ba7cd0fa140c552.tar.xz linux-ce85ee13e6b5d078f4a6c3b02ba7cd0fa140c552.zip |
Bluetooth: Enable support for out of band association model
If remote side reports oob availability or we are pairing initiator
use oob data for pairing if available.
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r-- | net/bluetooth/hci_event.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index e0aaf3053667..da4c662dbc30 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -2371,9 +2371,14 @@ static inline void hci_io_capa_request_evt(struct hci_dev *hdev, struct sk_buff bacpy(&cp.bdaddr, &ev->bdaddr); cp.capability = conn->io_capability; - cp.oob_data = 0; cp.authentication = hci_get_auth_req(conn); + if ((conn->out == 0x01 || conn->remote_oob == 0x01) && + hci_find_remote_oob_data(hdev, &conn->dst)) + cp.oob_data = 0x01; + else + cp.oob_data = 0x00; + hci_send_cmd(hdev, HCI_OP_IO_CAPABILITY_REPLY, sizeof(cp), &cp); } else { |