From: Johan Hedberg Date: Tue, 1 Jul 2014 15:40:20 +0000 (+0300) Subject: Bluetooth: Fix redundant encryption when receiving Security Request X-Git-Tag: omap-for-v3.17/fixes-against-rc2~149^2~73^2~87^2~122 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=854f47278fb36f4904649b994acf559e13920232;p=pandora-kernel.git Bluetooth: Fix redundant encryption when receiving Security Request If we're already encrypted with a good enough LTK we should just ignore an incoming SMP Security Request. The code was already taking care of this in the smp_conn_security function before calling smp_ltk_encrypt but failed to do the same in smp_cmd_security_req. This patch fixes the issue by moving up the smp_sufficient_security function and using it in the Security Request handler before trying to request encryption. Signed-off-by: Johan Hedberg Signed-off-by: Marcel Holtmann --- Reading git-diff-tree failed