diff options
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r-- | net/bluetooth/hci_event.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index d43d0c890975..65f094845719 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -414,9 +414,12 @@ static inline void hci_cs_create_conn(struct hci_dev *hdev, __u8 status) | |||
414 | 414 | ||
415 | if (status) { | 415 | if (status) { |
416 | if (conn && conn->state == BT_CONNECT) { | 416 | if (conn && conn->state == BT_CONNECT) { |
417 | conn->state = BT_CLOSED; | 417 | if (status != 0x0c || conn->attempt > 2) { |
418 | hci_proto_connect_cfm(conn, status); | 418 | conn->state = BT_CLOSED; |
419 | hci_conn_del(conn); | 419 | hci_proto_connect_cfm(conn, status); |
420 | hci_conn_del(conn); | ||
421 | } else | ||
422 | conn->state = BT_CONNECT2; | ||
420 | } | 423 | } |
421 | } else { | 424 | } else { |
422 | if (!conn) { | 425 | if (!conn) { |
@@ -728,7 +731,7 @@ static inline void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *sk | |||
728 | static inline void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb) | 731 | static inline void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb) |
729 | { | 732 | { |
730 | struct hci_ev_conn_complete *ev = (struct hci_ev_conn_complete *) skb->data; | 733 | struct hci_ev_conn_complete *ev = (struct hci_ev_conn_complete *) skb->data; |
731 | struct hci_conn *conn; | 734 | struct hci_conn *conn, *pend; |
732 | 735 | ||
733 | BT_DBG("%s", hdev->name); | 736 | BT_DBG("%s", hdev->name); |
734 | 737 | ||
@@ -801,6 +804,10 @@ static inline void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *s | |||
801 | if (ev->status) | 804 | if (ev->status) |
802 | hci_conn_del(conn); | 805 | hci_conn_del(conn); |
803 | 806 | ||
807 | pend = hci_conn_hash_lookup_state(hdev, ACL_LINK, BT_CONNECT2); | ||
808 | if (pend) | ||
809 | hci_acl_connect(pend); | ||
810 | |||
804 | hci_dev_unlock(hdev); | 811 | hci_dev_unlock(hdev); |
805 | } | 812 | } |
806 | 813 | ||