Bluetooth: Convert pend_le_reports into a list
To simplify manipulation and lookup of hci_conn_params entries of the
type HCI_AUTO_CONN_REPORT it makes sense to store them in their own
list. The new action list_head in hci_conn_params is used for this
purpose.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 474b6dc..a823ccc 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -5226,7 +5226,7 @@
}
if (params->auto_connect == HCI_AUTO_CONN_REPORT)
- hdev->pend_le_reports--;
+ list_del_init(¶ms->action);
hci_pend_le_conn_del(hdev, params);
list_del(¶ms->list);
@@ -6540,7 +6540,7 @@
if (!hci_discovery_active(hdev)) {
if (link_type == ACL_LINK)
return;
- if (link_type == LE_LINK && !hdev->pend_le_reports)
+ if (link_type == LE_LINK && list_empty(&hdev->pend_le_reports))
return;
}