From: Vinicius Costa Gomes Date: Thu, 9 Jun 2011 21:50:50 +0000 (-0300) Subject: Bluetooth: Fix initial security level of LE links X-Git-Tag: v3.1-rc1~24^2~10^2^2~389^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7b5c0d5242295a3b52e7161bf129e2f0e8c624cb;p=platform%2Fkernel%2Flinux-exynos.git Bluetooth: Fix initial security level of LE links As the default security level (BT_SECURITY_SDP) doesn't make sense for LE links, initialize LE links with something that makes sense. Signed-off-by: Vinicius Costa Gomes Signed-off-by: Gustavo F. Padovan --- diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 1819383..2f5ae53 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -53,6 +53,7 @@ static void hci_le_connect(struct hci_conn *conn) conn->state = BT_CONNECT; conn->out = 1; conn->link_mode |= HCI_LM_MASTER; + conn->sec_level = BT_SECURITY_LOW; memset(&cp, 0, sizeof(cp)); cp.scan_interval = cpu_to_le16(0x0004); diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 166fa11..21d6055 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -2753,6 +2753,7 @@ static inline void hci_le_conn_complete_evt(struct hci_dev *hdev, struct sk_buff mgmt_connected(hdev->id, &ev->bdaddr); + conn->sec_level = BT_SECURITY_LOW; conn->handle = __le16_to_cpu(ev->handle); conn->state = BT_CONNECTED;