|
@@ -414,9 +414,12 @@ static inline void hci_cs_create_conn(struct hci_dev *hdev, __u8 status)
|
|
|
|
|
|
if (status) {
|
|
if (status) {
|
|
if (conn && conn->state == BT_CONNECT) {
|
|
if (conn && conn->state == BT_CONNECT) {
|
|
- conn->state = BT_CLOSED;
|
|
|
|
- hci_proto_connect_cfm(conn, status);
|
|
|
|
- hci_conn_del(conn);
|
|
|
|
|
|
+ if (status != 0x0c || conn->attempt > 2) {
|
|
|
|
+ conn->state = BT_CLOSED;
|
|
|
|
+ hci_proto_connect_cfm(conn, status);
|
|
|
|
+ hci_conn_del(conn);
|
|
|
|
+ } else
|
|
|
|
+ conn->state = BT_CONNECT2;
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
if (!conn) {
|
|
if (!conn) {
|
|
@@ -728,7 +731,7 @@ static inline void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *sk
|
|
static inline void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
|
|
static inline void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
|
|
{
|
|
{
|
|
struct hci_ev_conn_complete *ev = (struct hci_ev_conn_complete *) skb->data;
|
|
struct hci_ev_conn_complete *ev = (struct hci_ev_conn_complete *) skb->data;
|
|
- struct hci_conn *conn;
|
|
|
|
|
|
+ struct hci_conn *conn, *pend;
|
|
|
|
|
|
BT_DBG("%s", hdev->name);
|
|
BT_DBG("%s", hdev->name);
|
|
|
|
|
|
@@ -801,6 +804,10 @@ static inline void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *s
|
|
if (ev->status)
|
|
if (ev->status)
|
|
hci_conn_del(conn);
|
|
hci_conn_del(conn);
|
|
|
|
|
|
|
|
+ pend = hci_conn_hash_lookup_state(hdev, ACL_LINK, BT_CONNECT2);
|
|
|
|
+ if (pend)
|
|
|
|
+ hci_acl_connect(pend);
|
|
|
|
+
|
|
hci_dev_unlock(hdev);
|
|
hci_dev_unlock(hdev);
|
|
}
|
|
}
|
|
|
|
|