Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352341
b: refs/heads/master
c: 892bbc5
h: refs/heads/master
i:
  352339: 990af4a
v: v3
  • Loading branch information
Johan Hedberg authored and Gustavo Padovan committed Feb 1, 2013
1 parent 774437a commit 8cb7b61
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a10f27cf4272033d148d91ff12bb8f4b67dfaca4
refs/heads/master: 892bbc5794daac57bff09c584821ed271fa18046
8 changes: 1 addition & 7 deletions trunk/net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,6 @@ static void create_eir(struct hci_dev *hdev, u8 *data)
{
u8 *ptr = data;
u8 *uuids_start;
u16 eir_len = 0;
struct bt_uuid *uuid;
size_t name_len;

Expand All @@ -458,7 +457,6 @@ static void create_eir(struct hci_dev *hdev, u8 *data)

memcpy(ptr + 2, hdev->dev_name, name_len);

eir_len += (name_len + 2);
ptr += (name_len + 2);
}

Expand All @@ -467,7 +465,6 @@ static void create_eir(struct hci_dev *hdev, u8 *data)
ptr[1] = EIR_TX_POWER;
ptr[2] = (u8) hdev->inq_tx_power;

eir_len += 3;
ptr += 3;
}

Expand All @@ -480,7 +477,6 @@ static void create_eir(struct hci_dev *hdev, u8 *data)
put_unaligned_le16(hdev->devid_product, ptr + 6);
put_unaligned_le16(hdev->devid_version, ptr + 8);

eir_len += 10;
ptr += 10;
}

Expand All @@ -505,18 +501,16 @@ static void create_eir(struct hci_dev *hdev, u8 *data)
uuids_start[0] = 1;
uuids_start[1] = EIR_UUID16_ALL;
ptr += 2;
eir_len += 2;
}

/* Stop if not enough space to put next UUID */
if (eir_len + 2 + sizeof(u16) > HCI_MAX_EIR_LENGTH) {
if ((ptr - data) + 2 + sizeof(u16) > HCI_MAX_EIR_LENGTH) {
uuids_start[1] = EIR_UUID16_SOME;
break;
}

*ptr++ = (uuid16 & 0x00ff);
*ptr++ = (uuid16 & 0xff00) >> 8;
eir_len += sizeof(uuid16);
uuids_start[0] += sizeof(uuid16);
}
}
Expand Down

0 comments on commit 8cb7b61

Please sign in to comment.