aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2013-01-26 17:31:27 -0500
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2013-02-01 12:50:16 -0500
commitde66aa63054a6fe348869722221d5cd3463d74a0 (patch)
treee380c93a218101064437f7a3e307e75d8ed62e05 /net/bluetooth
parentc331997b6c9ad7f4b8075e6e60d3caa6e36f5938 (diff)
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: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/mgmt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index e7f944f52ff2..4fd45a3271e0 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -1330,7 +1330,7 @@ static int add_uuid(struct sock *sk, struct hci_dev *hdev, void *data, u16 len)
1330 memcpy(uuid->uuid, cp->uuid, 16); 1330 memcpy(uuid->uuid, cp->uuid, 16);
1331 uuid->svc_hint = cp->svc_hint; 1331 uuid->svc_hint = cp->svc_hint;
1332 1332
1333 list_add(&uuid->list, &hdev->uuids); 1333 list_add_tail(&uuid->list, &hdev->uuids);
1334 1334
1335 err = update_class(hdev); 1335 err = update_class(hdev);
1336 if (err < 0) 1336 if (err < 0)