diff options
author | Andre Guedes <andre.guedes@openbossa.org> | 2013-07-31 19:25:29 (GMT) |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2013-09-16 17:36:56 (GMT) |
commit | 89cbb4da0abee2f39d75f67f9fd57f7410c8b65c (patch) | |
tree | 2ab1194ca0171dda21f950d198e14072f9d48419 | |
parent | f8776218e8546397be64ad2bc0ebf4748522d6e3 (diff) | |
download | linux-fsl-qoriq-89cbb4da0abee2f39d75f67f9fd57f7410c8b65c.tar.xz |
Bluetooth: Fix encryption key size for peripheral role
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.
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
-rw-r--r-- | net/bluetooth/hci_event.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 0496724..8db3e89 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -3561,6 +3561,8 @@ static void hci_le_ltk_request_evt(struct hci_dev *hdev, struct sk_buff *skb) 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) { |