aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorVinicius Costa Gomes <vinicius.gomes@openbossa.org>2012-08-23 21:32:44 -0300
committerBen Hutchings <ben@decadent.org.uk>2012-10-10 03:31:12 +0100
commitff03261adc8b4bdd8291f1783c079b53a892b429 (patch)
treeabb91c69a1e8bca60c622209adb6c8f2553e393d /net/bluetooth
parent6e792a90dee712edbbdf20f102c76bb9b8e36598 (diff)
downloadkernel_samsung_smdk4412-ff03261adc8b4bdd8291f1783c079b53a892b429.zip
kernel_samsung_smdk4412-ff03261adc8b4bdd8291f1783c079b53a892b429.tar.gz
kernel_samsung_smdk4412-ff03261adc8b4bdd8291f1783c079b53a892b429.tar.bz2
Bluetooth: Fix sending a HCI Authorization Request over LE links
commit d8343f125710fb596f7a88cd756679f14f4e77b9 upstream. In the case that the link is already in the connected state and a Pairing request arrives from the mgmt interface, hci_conn_security() would be called but it was not considering LE links. Reported-by: João Paulo Rechi Vita <jprvita@openbossa.org> Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hci_conn.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 98bfbd5..1fb1aec 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -44,6 +44,7 @@
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
+#include <net/bluetooth/smp.h>
static void hci_le_connect(struct hci_conn *conn)
{
@@ -641,6 +642,9 @@ int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type)
{
BT_DBG("conn %p", conn);
+ if (conn->type == LE_LINK)
+ return smp_conn_security(conn, sec_level);
+
/* For sdp we don't need the link key. */
if (sec_level == BT_SECURITY_SDP)
return 1;