Bluetooth: Fix overriding higher security level in SMP
authorJohan Hedberg <johan.hedberg@intel.com>
Tue, 17 Jun 2014 10:07:37 +0000 (13:07 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 20 Jun 2014 11:53:38 +0000 (13:53 +0200)
When we receive a pairing request or an internal request to start
pairing we shouldn't blindly overwrite the existing pending_sec_level
value as that may actually be higher than the new one. This patch fixes
the SMP code to only overwrite the value in case the new one is higher
than the old.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/smp.c

Simple merge