summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/mgmt.c
diff options
context:
space:
mode:
authorJohan Hedberg2014-07-04 11:37:18 +0200
committerMarcel Holtmann2014-07-04 11:58:08 +0200
commit66f8455aeac3427110d451534567eb1b9aea6929 (patch)
tree23116c8f24bcf1ee2488ac71b1d615b13cf3f16f /net/bluetooth/mgmt.c
parentBluetooth: Convert pend_le_conn list to a generic action list (diff)
downloadkernel-qcow2-linux-66f8455aeac3427110d451534567eb1b9aea6929.tar.gz
kernel-qcow2-linux-66f8455aeac3427110d451534567eb1b9aea6929.tar.xz
kernel-qcow2-linux-66f8455aeac3427110d451534567eb1b9aea6929.zip
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>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r--net/bluetooth/mgmt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 474b6dcdf665..a823cccf81f1 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -5226,7 +5226,7 @@ static int remove_device(struct sock *sk, struct hci_dev *hdev,
}
if (params->auto_connect == HCI_AUTO_CONN_REPORT)
- hdev->pend_le_reports--;
+ list_del_init(&params->action);
hci_pend_le_conn_del(hdev, params);
list_del(&params->list);
@@ -6540,7 +6540,7 @@ void mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,
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;
}