diff options
author | Jefferson Delfes <jefferson.delfes@openbossa.org> | 2012-06-11 09:18:51 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-06-12 22:19:21 -0400 |
commit | af7985bf85840e3dc90ba108a679db044f91f00e (patch) | |
tree | 5c28fee15c4ebe666cfefc9744c8f67a1adcc2d5 /net/bluetooth | |
parent | 11778716ededa873f24eebaae011e52f3d27dfca (diff) |
Bluetooth: Fix flags of mgmt_device_found event
Change flags field to matches userspace structure.
This field needs to be converted to little endian before forward it.
Signed-off-by: Jefferson Delfes <jefferson.delfes@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/mgmt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index c72307cc25fc..b4816632d724 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -3546,9 +3546,9 @@ int mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, | |||
3546 | ev->addr.type = link_to_bdaddr(link_type, addr_type); | 3546 | ev->addr.type = link_to_bdaddr(link_type, addr_type); |
3547 | ev->rssi = rssi; | 3547 | ev->rssi = rssi; |
3548 | if (cfm_name) | 3548 | if (cfm_name) |
3549 | ev->flags[0] |= MGMT_DEV_FOUND_CONFIRM_NAME; | 3549 | ev->flags |= MGMT_DEV_FOUND_CONFIRM_NAME; |
3550 | if (!ssp) | 3550 | if (!ssp) |
3551 | ev->flags[0] |= MGMT_DEV_FOUND_LEGACY_PAIRING; | 3551 | ev->flags |= MGMT_DEV_FOUND_LEGACY_PAIRING; |
3552 | 3552 | ||
3553 | if (eir_len > 0) | 3553 | if (eir_len > 0) |
3554 | memcpy(ev->eir, eir, eir_len); | 3554 | memcpy(ev->eir, eir, eir_len); |
@@ -3558,6 +3558,7 @@ int mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, | |||
3558 | dev_class, 3); | 3558 | dev_class, 3); |
3559 | 3559 | ||
3560 | ev->eir_len = cpu_to_le16(eir_len); | 3560 | ev->eir_len = cpu_to_le16(eir_len); |
3561 | ev->flags = cpu_to_le32(ev->flags); | ||
3561 | 3562 | ||
3562 | ev_size = sizeof(*ev) + eir_len; | 3563 | ev_size = sizeof(*ev) + eir_len; |
3563 | 3564 | ||