summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Guedes <andre.guedes@openbossa.org>2013-07-31 16:25:29 -0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-13 15:42:48 -0700
commitaa33f22e3679f2dfc352a77089c11daa33db1e5b (patch)
tree76e229fc773c9f61d471143c097b4712bb2d3557
parentae63544e0e99b722cac42e7ba0b75df6f28f9a0e (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 f8ce554c5b49..1e6347cf77f2 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -3379,6 +3379,8 @@ static inline void hci_le_ltk_request_evt(struct hci_dev *hdev,
else
conn->pending_sec_level = BT_SECURITY_MEDIUM;
+ conn->enc_key_size = ltk->enc_size;
+
hci_send_cmd(hdev, HCI_OP_LE_LTK_REPLY, sizeof(cp), &cp);
if (ltk->type & HCI_SMP_STK) {