@@ -1328,6 +1328,7 @@ int hci_le_create_cis(struct hci_conn *conn);
struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst,
u8 role);
+void hci_conn_free(struct hci_conn *conn);
void hci_conn_del(struct hci_conn *conn);
void hci_conn_hash_flush(struct hci_dev *hdev);
void hci_conn_check_pending(struct hci_dev *hdev);
@@ -1134,6 +1134,13 @@ static void hci_conn_unlink(struct hci_conn *conn)
conn->link = NULL;
}
+void hci_conn_free(struct hci_conn *conn)
+{
+ BT_DBG("kfree(conn %p)", conn);
+
+ kfree(conn);
+}
+
void hci_conn_del(struct hci_conn *conn)
{
struct hci_dev *hdev = conn->hdev;
@@ -14,9 +14,9 @@ static void bt_link_release(struct device *dev)
{
struct hci_conn *conn = to_hci_conn(dev);
- BT_DBG("kfree(conn %p)", conn);
+ BT_DBG("dev %p conn %p", dev, conn);
- kfree(conn);
+ hci_conn_free(conn);
}
static const struct device_type bt_link = {