diff options
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r-- | net/bluetooth/hci_event.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 64668e2656a5..0e3db289f4be 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -874,6 +874,8 @@ static inline void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *s | |||
874 | } else | 874 | } else |
875 | conn->state = BT_CONNECTED; | 875 | conn->state = BT_CONNECTED; |
876 | 876 | ||
877 | hci_conn_add_sysfs(conn); | ||
878 | |||
877 | if (test_bit(HCI_AUTH, &hdev->flags)) | 879 | if (test_bit(HCI_AUTH, &hdev->flags)) |
878 | conn->link_mode |= HCI_LM_AUTH; | 880 | conn->link_mode |= HCI_LM_AUTH; |
879 | 881 | ||
@@ -1011,6 +1013,9 @@ static inline void hci_disconn_complete_evt(struct hci_dev *hdev, struct sk_buff | |||
1011 | conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); | 1013 | conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); |
1012 | if (conn) { | 1014 | if (conn) { |
1013 | conn->state = BT_CLOSED; | 1015 | conn->state = BT_CLOSED; |
1016 | |||
1017 | hci_conn_del_sysfs(conn); | ||
1018 | |||
1014 | hci_proto_disconn_ind(conn, ev->reason); | 1019 | hci_proto_disconn_ind(conn, ev->reason); |
1015 | hci_conn_del(conn); | 1020 | hci_conn_del(conn); |
1016 | } | 1021 | } |
@@ -1643,6 +1648,8 @@ static inline void hci_sync_conn_complete_evt(struct hci_dev *hdev, struct sk_bu | |||
1643 | if (!ev->status) { | 1648 | if (!ev->status) { |
1644 | conn->handle = __le16_to_cpu(ev->handle); | 1649 | conn->handle = __le16_to_cpu(ev->handle); |
1645 | conn->state = BT_CONNECTED; | 1650 | conn->state = BT_CONNECTED; |
1651 | |||
1652 | hci_conn_add_sysfs(conn); | ||
1646 | } else | 1653 | } else |
1647 | conn->state = BT_CLOSED; | 1654 | conn->state = BT_CLOSED; |
1648 | 1655 | ||