Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 247257
b: refs/heads/master
c: 79c6c70
h: refs/heads/master
i:
  247255: cbc5168
v: v3
  • Loading branch information
Johan Hedberg authored and Gustavo F. Padovan committed Apr 28, 2011
1 parent 5631ff9 commit 29039c8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9f61656a60c9506e3e4cd41af5efbcf6a30ee3b9
refs/heads/master: 79c6c70cbe35c270e7b59207ab76b44183a1030a
18 changes: 16 additions & 2 deletions trunk/net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -1021,12 +1021,19 @@ static void hci_cs_remote_name_req(struct hci_dev *hdev, __u8 status)
hci_dev_lock(hdev);

conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &cp->bdaddr);
if (conn && hci_outgoing_auth_needed(hdev, conn)) {
if (!conn)
goto unlock;

if (!hci_outgoing_auth_needed(hdev, conn))
goto unlock;

if (!test_and_set_bit(HCI_CONN_AUTH_PEND, &conn->pend)) {
struct hci_cp_auth_requested cp;
cp.handle = __cpu_to_le16(conn->handle);
hci_send_cmd(hdev, HCI_OP_AUTH_REQUESTED, sizeof(cp), &cp);
}

unlock:
hci_dev_unlock(hdev);
}

Expand Down Expand Up @@ -1516,12 +1523,19 @@ static inline void hci_remote_name_evt(struct hci_dev *hdev, struct sk_buff *skb
mgmt_remote_name(hdev->id, &ev->bdaddr, ev->name);

conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr);
if (conn && hci_outgoing_auth_needed(hdev, conn)) {
if (!conn)
goto unlock;

if (!hci_outgoing_auth_needed(hdev, conn))
goto unlock;

if (!test_and_set_bit(HCI_CONN_AUTH_PEND, &conn->pend)) {
struct hci_cp_auth_requested cp;
cp.handle = __cpu_to_le16(conn->handle);
hci_send_cmd(hdev, HCI_OP_AUTH_REQUESTED, sizeof(cp), &cp);
}

unlock:
hci_dev_unlock(hdev);
}

Expand Down

0 comments on commit 29039c8

Please sign in to comment.