|
@@ -363,6 +363,16 @@ static void hci_conn_auto_accept(struct work_struct *work)
|
|
|
&conn->dst);
|
|
|
}
|
|
|
|
|
|
+static void le_conn_timeout(struct work_struct *work)
|
|
|
+{
|
|
|
+ struct hci_conn *conn = container_of(work, struct hci_conn,
|
|
|
+ le_conn_timeout.work);
|
|
|
+
|
|
|
+ BT_DBG("");
|
|
|
+
|
|
|
+ hci_le_create_connection_cancel(conn);
|
|
|
+}
|
|
|
+
|
|
|
struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst)
|
|
|
{
|
|
|
struct hci_conn *conn;
|
|
@@ -410,6 +420,7 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst)
|
|
|
INIT_DELAYED_WORK(&conn->disc_work, hci_conn_timeout);
|
|
|
INIT_DELAYED_WORK(&conn->auto_accept_work, hci_conn_auto_accept);
|
|
|
INIT_DELAYED_WORK(&conn->idle_work, hci_conn_idle);
|
|
|
+ INIT_DELAYED_WORK(&conn->le_conn_timeout, le_conn_timeout);
|
|
|
|
|
|
atomic_set(&conn->refcnt, 0);
|
|
|
|
|
@@ -442,6 +453,8 @@ int hci_conn_del(struct hci_conn *conn)
|
|
|
/* Unacked frames */
|
|
|
hdev->acl_cnt += conn->sent;
|
|
|
} else if (conn->type == LE_LINK) {
|
|
|
+ cancel_delayed_work_sync(&conn->le_conn_timeout);
|
|
|
+
|
|
|
if (hdev->le_pkts)
|
|
|
hdev->le_cnt += conn->sent;
|
|
|
else
|