diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/hci_event.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index bb25484b8747..d43d0c890975 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -750,8 +750,6 @@ static inline void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *s | |||
750 | if (test_bit(HCI_ENCRYPT, &hdev->flags)) | 750 | if (test_bit(HCI_ENCRYPT, &hdev->flags)) |
751 | conn->link_mode |= HCI_LM_ENCRYPT; | 751 | conn->link_mode |= HCI_LM_ENCRYPT; |
752 | 752 | ||
753 | hci_conn_hold(conn); | ||
754 | |||
755 | /* Get remote features */ | 753 | /* Get remote features */ |
756 | if (conn->type == ACL_LINK) { | 754 | if (conn->type == ACL_LINK) { |
757 | struct hci_cp_read_remote_features cp; | 755 | struct hci_cp_read_remote_features cp; |
@@ -779,9 +777,11 @@ static inline void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *s | |||
779 | 777 | ||
780 | hci_send_cmd(hdev, OGF_LINK_CTL, | 778 | hci_send_cmd(hdev, OGF_LINK_CTL, |
781 | OCF_CHANGE_CONN_PTYPE, sizeof(cp), &cp); | 779 | OCF_CHANGE_CONN_PTYPE, sizeof(cp), &cp); |
780 | } else { | ||
781 | /* Update disconnect timer */ | ||
782 | hci_conn_hold(conn); | ||
783 | hci_conn_put(conn); | ||
782 | } | 784 | } |
783 | |||
784 | hci_conn_put(conn); | ||
785 | } else | 785 | } else |
786 | conn->state = BT_CLOSED; | 786 | conn->state = BT_CLOSED; |
787 | 787 | ||