Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetoot…
Browse files Browse the repository at this point in the history
…h-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6:
  Bluetooth: Don't trigger disconnect timeout for security mode 3 pairing
  Bluetooth: Don't use hci_acl_connect_cancel() for incoming connections
  Bluetooth: Fix wrong module refcount when connection setup fails

Another case of me handling the fallout from Davem's unfortunate
addiction to shuffleboard.

Won't anybody think of the children? Join the anti-shuffleboard league
today!
  • Loading branch information
torvalds committed May 15, 2009
2 parents 40f293f + 3d7a9d1 commit 7c7327d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions net/bluetooth/hci_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,8 @@ static void hci_conn_timeout(unsigned long arg)
switch (conn->state) {
case BT_CONNECT:
case BT_CONNECT2:
if (conn->type == ACL_LINK)
if (conn->type == ACL_LINK && conn->out)
hci_acl_connect_cancel(conn);
else
hci_acl_disconn(conn, 0x13);
break;
case BT_CONFIG:
case BT_CONNECTED:
Expand Down Expand Up @@ -292,6 +290,8 @@ int hci_conn_del(struct hci_conn *conn)

hci_conn_del_sysfs(conn);

hci_dev_put(hdev);

return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -1493,7 +1493,7 @@ static inline void hci_pin_code_request_evt(struct hci_dev *hdev, struct sk_buff
hci_dev_lock(hdev);

conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr);
if (conn) {
if (conn && conn->state == BT_CONNECTED) {
hci_conn_hold(conn);
conn->disc_timeout = HCI_PAIRING_TIMEOUT;
hci_conn_put(conn);
Expand Down
3 changes: 3 additions & 0 deletions net/bluetooth/hci_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ static void add_conn(struct work_struct *work)
BT_ERR("Failed to register connection device");
return;
}

hci_dev_hold(hdev);
}

/*
Expand Down Expand Up @@ -134,6 +136,7 @@ static void del_conn(struct work_struct *work)

device_del(&conn->dev);
put_device(&conn->dev);

hci_dev_put(hdev);
}

Expand Down

0 comments on commit 7c7327d

Please sign in to comment.