diff options
author | Andre Guedes <andre.guedes@openbossa.org> | 2011-05-26 16:23:51 -0300 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-06-08 16:58:17 -0300 |
commit | 9aa04c9108164e62cf94d6913183817a0d3dbf03 (patch) | |
tree | 4d2f14f8227e140fa0a320e0325765e6f1b59356 /net/bluetooth/hci_event.c | |
parent | 76c8686f8871f1bcb2dc8b4c5311cd0e2f73d4cd (diff) | |
download | blackbird-op-linux-9aa04c9108164e62cf94d6913183817a0d3dbf03.tar.gz blackbird-op-linux-9aa04c9108164e62cf94d6913183817a0d3dbf03.zip |
Bluetooth: Add Advertising Report Meta Event handler
This patch adds a function to handle LE Advertising Report Meta
Events.
Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Anderson Briglia <anderson.briglia@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r-- | net/bluetooth/hci_event.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index f13ddbf858ba..db74958d3ad9 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -2680,6 +2680,27 @@ unlock: hci_dev_unlock(hdev); } +static inline void hci_le_adv_report_evt(struct hci_dev *hdev, + struct sk_buff *skb) +{ + struct hci_ev_le_advertising_info *ev; + u8 num_reports; + + num_reports = skb->data[0]; + ev = (void *) &skb->data[1]; + + hci_dev_lock(hdev); + + hci_add_adv_entry(hdev, ev); + + while (--num_reports) { + ev = (void *) (ev->data + ev->length + 1); + hci_add_adv_entry(hdev, ev); + } + + hci_dev_unlock(hdev); +} + static inline void hci_le_meta_evt(struct hci_dev *hdev, struct sk_buff *skb) { struct hci_ev_le_meta *le_ev = (void *) skb->data; @@ -2691,6 +2712,10 @@ static inline void hci_le_meta_evt(struct hci_dev *hdev, struct sk_buff *skb) hci_le_conn_complete_evt(hdev, skb); break; + case HCI_EV_LE_ADVERTISING_REPORT: + hci_le_adv_report_evt(hdev, skb); + break; + default: break; } |