Skip to content

Commit

Permalink
Bluetooth: Fix L2CAP connection establishment
Browse files Browse the repository at this point in the history
In hci_conn_security ( which is used during L2CAP connection
establishment ) test for HCI_CONN_ENCRYPT_PEND state also
sets this state, which is bogus and leads to connection time-out
on L2CAP sockets in certain situations (especially when
using non-ssp devices )

Signed-off-by: Ilia Kolomisnky <[email protected]>
Signed-off-by: Gustavo F. Padovan <[email protected]>
  • Loading branch information
ikolomi authored and Gustavo F. Padovan committed Jun 15, 2011
1 parent df3c393 commit 3306054
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bluetooth/hci_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ 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;

if (!hci_conn_auth(conn, sec_level, auth_type))
Expand Down

0 comments on commit 3306054

Please sign in to comment.