diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-05-04 17:06:28 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2022-05-19 20:11:26 +0200 |
commit | 8f9ae5b3ae80f168a6224529e3787f4fb27f299a (patch) | |
tree | 26f3b9991b5bcb71dfcc38b893fd7b7e8b4c415e /net/bluetooth/eir.h | |
parent | 3b42055388c30f2761a2d9cd9af2c99611dfe457 (diff) | |
download | lwn-8f9ae5b3ae80f168a6224529e3787f4fb27f299a.tar.gz lwn-8f9ae5b3ae80f168a6224529e3787f4fb27f299a.zip |
Bluetooth: eir: Add helpers for managing service data
This adds helpers for accessing and appending service data (0x16) ad
type.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/eir.h')
-rw-r--r-- | net/bluetooth/eir.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bluetooth/eir.h b/net/bluetooth/eir.h index 43f1945bffc5..62f2374078f2 100644 --- a/net/bluetooth/eir.h +++ b/net/bluetooth/eir.h @@ -14,6 +14,8 @@ u8 eir_create_scan_rsp(struct hci_dev *hdev, u8 instance, u8 *ptr); u8 eir_append_local_name(struct hci_dev *hdev, u8 *eir, u8 ad_len); u8 eir_append_appearance(struct hci_dev *hdev, u8 *ptr, u8 ad_len); +u8 eir_append_service_data(u8 *eir, u16 eir_len, u16 uuid, u8 *data, + u8 data_len); static inline u16 eir_precalc_len(u8 data_len) { @@ -92,3 +94,5 @@ static inline void *eir_get_data(u8 *eir, size_t eir_len, u8 type, return NULL; } + +void *eir_get_service_data(u8 *eir, size_t eir_len, u16 uuid, size_t *len); |