summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
authorMarcel Holtmann2014-01-10 11:07:28 +0100
committerJohan Hedberg2014-02-13 08:51:33 +0100
commit519ca9d017ab7eb4a15787bd8f2d867bebe375bc (patch)
treec248e3af289f72a48e64ebab712c34fe7de39350 /net/bluetooth/hci_core.c
parentBluetooth: Add debugfs quirk for forcing Secure Connections support (diff)
downloadkernel-qcow2-linux-519ca9d017ab7eb4a15787bd8f2d867bebe375bc.tar.gz
kernel-qcow2-linux-519ca9d017ab7eb4a15787bd8f2d867bebe375bc.tar.xz
kernel-qcow2-linux-519ca9d017ab7eb4a15787bd8f2d867bebe375bc.zip
Bluetooth: Provide remote OOB data for Secure Connections
When Secure Connections has been enabled it is possible to provide P-192 and/or P-256 data during the pairing process. The internal out-of-band credentials storage has been extended to also hold P-256 data. Initially the P-256 data will be empty and with Secure Connections enabled no P-256 data will be provided. This is according to the specification since it might be possible that the remote side did not provide either of the out-of-band credentials. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r--net/bluetooth/hci_core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 946631ffe802..f13c0550f368 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2802,7 +2802,7 @@ int hci_add_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 *hash,
data = hci_find_remote_oob_data(hdev, bdaddr);
if (!data) {
- data = kmalloc(sizeof(*data), GFP_ATOMIC);
+ data = kzalloc(sizeof(*data), GFP_ATOMIC);
if (!data)
return -ENOMEM;
@@ -2810,8 +2810,8 @@ int hci_add_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 *hash,
list_add(&data->list, &hdev->remote_oob_data);
}
- memcpy(data->hash, hash, sizeof(data->hash));
- memcpy(data->randomizer, randomizer, sizeof(data->randomizer));
+ memcpy(data->hash192, hash, sizeof(data->hash192));
+ memcpy(data->randomizer192, randomizer, sizeof(data->randomizer192));
BT_DBG("%s for %pMR", hdev->name, bdaddr);