aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorSzymon Janc <szymon.janc@tieto.com>2011-03-22 08:12:23 -0400
committerGustavo F. Padovan <padovan@profusion.mobi>2011-03-31 13:22:57 -0400
commitce85ee13e6b5d078f4a6c3b02ba7cd0fa140c552 (patch)
treef0938f25965a65f1abce432f48862820c9adcf67 /net/bluetooth
parent2763eda6ccaf126633bb3180f440c8f3589f0679 (diff)
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')
-rw-r--r--net/bluetooth/hci_event.c7
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
2371 2371
2372 bacpy(&cp.bdaddr, &ev->bdaddr); 2372 bacpy(&cp.bdaddr, &ev->bdaddr);
2373 cp.capability = conn->io_capability; 2373 cp.capability = conn->io_capability;
2374 cp.oob_data = 0;
2375 cp.authentication = hci_get_auth_req(conn); 2374 cp.authentication = hci_get_auth_req(conn);
2376 2375
2376 if ((conn->out == 0x01 || conn->remote_oob == 0x01) &&
2377 hci_find_remote_oob_data(hdev, &conn->dst))
2378 cp.oob_data = 0x01;
2379 else
2380 cp.oob_data = 0x00;
2381
2377 hci_send_cmd(hdev, HCI_OP_IO_CAPABILITY_REPLY, 2382 hci_send_cmd(hdev, HCI_OP_IO_CAPABILITY_REPLY,
2378 sizeof(cp), &cp); 2383 sizeof(cp), &cp);
2379 } else { 2384 } else {