aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-05-15 17:29:53 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-05-15 17:30:02 -0400
commit7c7327d9664280cad833da1f14bad13a3ea8f0bf (patch)
tree8af1f200310281054bfbaf76a7c90eaebefe5c51 /net
parent40f293ff833f4054de880d105bda0dbb5e2468db (diff)
parent3d7a9d1c7ee251a04095d43eec5a3f4ff3f710a8 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-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!
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hci_conn.c6
-rw-r--r--net/bluetooth/hci_event.c2
-rw-r--r--net/bluetooth/hci_sysfs.c3
3 files changed, 7 insertions, 4 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 61309b26f27..fa47d5d84f5 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -171,10 +171,8 @@ static void hci_conn_timeout(unsigned long arg)
171 switch (conn->state) { 171 switch (conn->state) {
172 case BT_CONNECT: 172 case BT_CONNECT:
173 case BT_CONNECT2: 173 case BT_CONNECT2:
174 if (conn->type == ACL_LINK) 174 if (conn->type == ACL_LINK && conn->out)
175 hci_acl_connect_cancel(conn); 175 hci_acl_connect_cancel(conn);
176 else
177 hci_acl_disconn(conn, 0x13);
178 break; 176 break;
179 case BT_CONFIG: 177 case BT_CONFIG:
180 case BT_CONNECTED: 178 case BT_CONNECTED:
@@ -292,6 +290,8 @@ int hci_conn_del(struct hci_conn *conn)
292 290
293 hci_conn_del_sysfs(conn); 291 hci_conn_del_sysfs(conn);
294 292
293 hci_dev_put(hdev);
294
295 return 0; 295 return 0;
296} 296}
297 297
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 4e7cb88e5da..184ba0a88ec 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -1493,7 +1493,7 @@ static inline void hci_pin_code_request_evt(struct hci_dev *hdev, struct sk_buff
1493 hci_dev_lock(hdev); 1493 hci_dev_lock(hdev);
1494 1494
1495 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); 1495 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr);
1496 if (conn) { 1496 if (conn && conn->state == BT_CONNECTED) {
1497 hci_conn_hold(conn); 1497 hci_conn_hold(conn);
1498 conn->disc_timeout = HCI_PAIRING_TIMEOUT; 1498 conn->disc_timeout = HCI_PAIRING_TIMEOUT;
1499 hci_conn_put(conn); 1499 hci_conn_put(conn);
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
index a05d45eb3ba..4cc3624bd22 100644
--- a/net/bluetooth/hci_sysfs.c
+++ b/net/bluetooth/hci_sysfs.c
@@ -99,6 +99,8 @@ static void add_conn(struct work_struct *work)
99 BT_ERR("Failed to register connection device"); 99 BT_ERR("Failed to register connection device");
100 return; 100 return;
101 } 101 }
102
103 hci_dev_hold(hdev);
102} 104}
103 105
104/* 106/*
@@ -134,6 +136,7 @@ static void del_conn(struct work_struct *work)
134 136
135 device_del(&conn->dev); 137 device_del(&conn->dev);
136 put_device(&conn->dev); 138 put_device(&conn->dev);
139
137 hci_dev_put(hdev); 140 hci_dev_put(hdev);
138} 141}
139 142