diff options
author | John W. Linville <linville@tuxdriver.com> | 2011-06-24 14:00:24 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-06-24 14:00:24 -0400 |
commit | acc468f5f9616ba564b772ac8a3aef218bff6bb3 (patch) | |
tree | 02bb0277daadc820c7a6c40c2f50ef299665d241 /net/bluetooth/hci_conn.c | |
parent | 5c18e80be9ff362f6523b097d495bb2e2f939946 (diff) | |
parent | 9935d12651c9e54ad266e17cd542ec717ccd0fc8 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into for-davem
Diffstat (limited to 'net/bluetooth/hci_conn.c')
-rw-r--r-- | net/bluetooth/hci_conn.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 3163330cd4f..d3a05b9ade7 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -608,11 +608,11 @@ int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type) goto encrypt; auth: - if (test_and_set_bit(HCI_CONN_ENCRYPT_PEND, &conn->pend)) + if (test_bit(HCI_CONN_ENCRYPT_PEND, &conn->pend)) return 0; - hci_conn_auth(conn, sec_level, auth_type); - return 0; + if (!hci_conn_auth(conn, sec_level, auth_type)) + return 0; encrypt: if (conn->link_mode & HCI_LM_ENCRYPT) |