From 619feb6a7806651922bf4c5958f37a284274851c Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 28 Apr 2009 09:04:55 -0700 Subject: [PATCH] --- yaml --- r: 144335 b: refs/heads/master c: 3fdca1e1370ffe89980927cdef0583bebcd8caaf h: refs/heads/master i: 144333: 2930425314152936a47356807e5efa1312bebd73 144331: 8c447e09f0c6807d92cda99a807a1cc6353c6c3e 144327: ab3afc015f6d71baca735a5c4d04ce27182e4fa6 144319: fd7fdeb8e65133f0e62f8498b613d1d5837f6538 v: v3 --- [refs] | 2 +- trunk/net/bluetooth/hci_conn.c | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 12cf4e1f7d27..ba6b6a50a5f0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 052b30b0a8eec8db5b18ad49effdf2a9ba4c1e1a +refs/heads/master: 3fdca1e1370ffe89980927cdef0583bebcd8caaf diff --git a/trunk/net/bluetooth/hci_conn.c b/trunk/net/bluetooth/hci_conn.c index 75ebbe2221a3..375f4b4f7f79 100644 --- a/trunk/net/bluetooth/hci_conn.c +++ b/trunk/net/bluetooth/hci_conn.c @@ -425,12 +425,9 @@ int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type) if (sec_level == BT_SECURITY_SDP) return 1; - if (sec_level == BT_SECURITY_LOW) { - if (conn->ssp_mode > 0 && conn->hdev->ssp_mode > 0) - return hci_conn_auth(conn, sec_level, auth_type); - else - return 1; - } + if (sec_level == BT_SECURITY_LOW && + (!conn->ssp_mode || !conn->hdev->ssp_mode)) + return 1; if (conn->link_mode & HCI_LM_ENCRYPT) return hci_conn_auth(conn, sec_level, auth_type);