提交 de66aa63 编写于 作者: J Johan Hedberg 提交者: Gustavo Padovan

Bluetooth: Store UUIDs in the same order that they were added

We should be encoding UUIDs to the EIR data in the same order that they
were added to the kernel, i.e. each UUID should be added to the end of
the UUIDs list. This patch fixes the issue by using list_add_tail
instead of list_add for storing the UUIDs.
Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
Acked-by: NMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
上级 c331997b
...@@ -1330,7 +1330,7 @@ static int add_uuid(struct sock *sk, struct hci_dev *hdev, void *data, u16 len) ...@@ -1330,7 +1330,7 @@ static int add_uuid(struct sock *sk, struct hci_dev *hdev, void *data, u16 len)
memcpy(uuid->uuid, cp->uuid, 16); memcpy(uuid->uuid, cp->uuid, 16);
uuid->svc_hint = cp->svc_hint; uuid->svc_hint = cp->svc_hint;
list_add(&uuid->list, &hdev->uuids); list_add_tail(&uuid->list, &hdev->uuids);
err = update_class(hdev); err = update_class(hdev);
if (err < 0) if (err < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册