diff options
Diffstat (limited to 'net/bluetooth/hci_conn.c')
-rw-r--r-- | net/bluetooth/hci_conn.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 0d4b8aeb8e09..ca8d05245ca0 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c | |||
@@ -245,8 +245,6 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst) | |||
245 | if (hdev->notify) | 245 | if (hdev->notify) |
246 | hdev->notify(hdev, HCI_NOTIFY_CONN_ADD); | 246 | hdev->notify(hdev, HCI_NOTIFY_CONN_ADD); |
247 | 247 | ||
248 | hci_conn_add_sysfs(conn); | ||
249 | |||
250 | tasklet_enable(&hdev->tx_task); | 248 | tasklet_enable(&hdev->tx_task); |
251 | 249 | ||
252 | return conn; | 250 | return conn; |
@@ -278,12 +276,14 @@ int hci_conn_del(struct hci_conn *conn) | |||
278 | } | 276 | } |
279 | 277 | ||
280 | tasklet_disable(&hdev->tx_task); | 278 | tasklet_disable(&hdev->tx_task); |
279 | |||
281 | hci_conn_hash_del(hdev, conn); | 280 | hci_conn_hash_del(hdev, conn); |
282 | if (hdev->notify) | 281 | if (hdev->notify) |
283 | hdev->notify(hdev, HCI_NOTIFY_CONN_DEL); | 282 | hdev->notify(hdev, HCI_NOTIFY_CONN_DEL); |
283 | |||
284 | tasklet_enable(&hdev->tx_task); | 284 | tasklet_enable(&hdev->tx_task); |
285 | |||
285 | skb_queue_purge(&conn->data_q); | 286 | skb_queue_purge(&conn->data_q); |
286 | hci_conn_del_sysfs(conn); | ||
287 | 287 | ||
288 | return 0; | 288 | return 0; |
289 | } | 289 | } |
@@ -532,6 +532,8 @@ void hci_conn_hash_flush(struct hci_dev *hdev) | |||
532 | 532 | ||
533 | c->state = BT_CLOSED; | 533 | c->state = BT_CLOSED; |
534 | 534 | ||
535 | hci_conn_del_sysfs(c); | ||
536 | |||
535 | hci_proto_disconn_ind(c, 0x16); | 537 | hci_proto_disconn_ind(c, 0x16); |
536 | hci_conn_del(c); | 538 | hci_conn_del(c); |
537 | } | 539 | } |