Bluetooth: Fix redundant encryption request for reauthentication
authorJohan Hedberg <johan.hedberg@intel.com>
Fri, 11 Apr 2014 19:02:32 +0000 (12:02 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jun 2014 20:25:33 +0000 (13:25 -0700)
commit6142655f2298ea3eca194d36a09cfba9a402fc25
tree4bcd8845e0eab21afa97b712c476121bcf0f2c02
parent2ef1b8b7d71559d3fc6ef6731a9244850a76f58d
Bluetooth: Fix redundant encryption request for reauthentication

commit 09da1f3463eb81d59685df723b1c5950b7570340 upstream.

When we're performing reauthentication (in order to elevate the
security level from an unauthenticated key to an authenticated one) we
do not need to issue any encryption command once authentication
completes. Since the trigger for the encryption HCI command is the
ENCRYPT_PEND flag this flag should not be set in this scenario.
Instead, the REAUTH_PEND flag takes care of all necessary steps for
reauthentication.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/bluetooth/hci_conn.c