aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Guedes <andre.guedes@openbossa.org>2013-07-31 15:25:29 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-13 19:08:32 -0400
commitad04e6cbe9e091059096748285655caf16da97d0 (patch)
tree9ddb191e59f15277425bf0889bdebec25d966df9
parenta508ba2c07af1c6b1255e334fadfeddda2887f93 (diff)
Bluetooth: Fix encryption key size for peripheral role
commit 89cbb4da0abee2f39d75f67f9fd57f7410c8b65c upstream. This patch fixes the connection encryption key size information when the host is playing the peripheral role. We should set conn->enc_key_ size in hci_le_ltk_request_evt, otherwise it is left uninitialized. Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--net/bluetooth/hci_event.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 1a9fa7f60bd4..dcaa6dbbab2c 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -3615,6 +3615,8 @@ static void hci_le_ltk_request_evt(struct hci_dev *hdev, struct sk_buff *skb)
3615 else 3615 else
3616 conn->pending_sec_level = BT_SECURITY_MEDIUM; 3616 conn->pending_sec_level = BT_SECURITY_MEDIUM;
3617 3617
3618 conn->enc_key_size = ltk->enc_size;
3619
3618 hci_send_cmd(hdev, HCI_OP_LE_LTK_REPLY, sizeof(cp), &cp); 3620 hci_send_cmd(hdev, HCI_OP_LE_LTK_REPLY, sizeof(cp), &cp);
3619 3621
3620 if (ltk->type & HCI_SMP_STK) { 3622 if (ltk->type & HCI_SMP_STK) {