]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
Bluetooth: Fix initial security level of LE links
authorVinicius Costa Gomes <vinicius.gomes@openbossa.org>
Thu, 9 Jun 2011 21:50:50 +0000 (18:50 -0300)
committerGustavo F. Padovan <padovan@profusion.mobi>
Mon, 13 Jun 2011 19:05:34 +0000 (16:05 -0300)
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 <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
net/bluetooth/hci_conn.c
net/bluetooth/hci_event.c

index 18193831bbf12681a9a37eaf630ca2d55df232ba..2f5ae53057c71f1e5668b6c1b733d67502c6dde4 100644 (file)
@@ -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);
index 166fa113721c47069cae5eb1cfd5487070b36d30..21d6055589eecc4e32255a00ecc1676c287aa57b 100644 (file)
@@ -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;