diff options
author | Andre Guedes <andre.guedes@openbossa.org> | 2012-01-10 18:20:50 -0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-02-13 17:01:27 +0200 |
commit | 3c9e919511f87f10491628c6b44bc4675822f307 (patch) | |
tree | 2dea9b9bed3fffa9d6f732a432269d672240cbe4 /net/bluetooth/hci_event.c | |
parent | 7d262f86f6b73efb500be9d9242ef0673221493d (diff) |
Bluetooth: Report LE devices
Devices found during LE scan should be reported to userspace through
mgmt_device_found events.
Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r-- | net/bluetooth/hci_event.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 3323dc6c986..42d63522270 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -3208,6 +3208,7 @@ static inline void hci_le_adv_report_evt(struct hci_dev *hdev, { u8 num_reports = skb->data[0]; void *ptr = &skb->data[1]; + s8 rssi; hci_dev_lock(hdev); @@ -3216,6 +3217,10 @@ static inline void hci_le_adv_report_evt(struct hci_dev *hdev, hci_add_adv_entry(hdev, ev); + rssi = ev->data[ev->length]; + mgmt_device_found(hdev, &ev->bdaddr, LE_LINK, ev->bdaddr_type, + NULL, rssi, 0, ev->data, ev->length); + ptr += sizeof(*ev) + ev->length + 1; } |