diff options
author | David S. Miller <davem@davemloft.net> | 2009-04-28 22:40:49 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-28 22:40:49 -0700 |
commit | bf0de3e9c87fda3d1fc55ac2914948f3ca32ff9b (patch) | |
tree | 289f4ea835c270de9af81d75d6caae1d1bc00f75 /net/bluetooth/hci_conn.c | |
parent | 942e4a2bd680c606af0211e64eb216be2e19bf61 (diff) | |
parent | 3fdca1e1370ffe89980927cdef0583bebcd8caaf (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6
Diffstat (limited to 'net/bluetooth/hci_conn.c')
-rw-r--r-- | net/bluetooth/hci_conn.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 1181db08d9de..375f4b4f7f79 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -215,6 +215,7 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst) conn->state = BT_OPEN; conn->power_save = 1; + conn->disc_timeout = HCI_DISCONN_TIMEOUT; switch (type) { case ACL_LINK: @@ -424,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); |