3.5.7.23 -stable review patch.  If anyone has any objections, please let me 
know.

------------------

From: Andre Guedes <[email protected]>

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 <[email protected]>
Signed-off-by: Gustavo Padovan <[email protected]>
Signed-off-by: Luis Henriques <[email protected]>
---
 net/bluetooth/hci_event.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 9871e8b..7797c9d 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -3456,6 +3456,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) {
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to