diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-09-21 00:59:37 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2021-09-21 10:37:33 +0200 |
commit | 01ce70b0a274bd76a5a311fb90d4d446d9bdfea1 (patch) | |
tree | b418c8a768fb0d558910a9ec8366450c3a8c0ca8 /net/bluetooth/hci_request.h | |
parent | Bluetooth: RFCOMM: Replace use of memcpy_from_msg with bt_skb_sendmmsg (diff) | |
download | linux-01ce70b0a274bd76a5a311fb90d4d446d9bdfea1.tar.xz linux-01ce70b0a274bd76a5a311fb90d4d446d9bdfea1.zip |
Bluetooth: eir: Move EIR/Adv Data functions to its own file
This moves functions manipulating EIR/Adv Data to its own file so it
can be reused by other files.
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/hci_request.h')
-rw-r--r-- | net/bluetooth/hci_request.h | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/net/bluetooth/hci_request.h b/net/bluetooth/hci_request.h index aaf608720243..f31420f58525 100644 --- a/net/bluetooth/hci_request.h +++ b/net/bluetooth/hci_request.h @@ -124,26 +124,3 @@ static inline void hci_update_background_scan(struct hci_dev *hdev) void hci_request_setup(struct hci_dev *hdev); void hci_request_cancel_all(struct hci_dev *hdev); - -u8 append_local_name(struct hci_dev *hdev, u8 *ptr, u8 ad_len); - -static inline u16 eir_append_data(u8 *eir, u16 eir_len, u8 type, - u8 *data, u8 data_len) -{ - eir[eir_len++] = sizeof(type) + data_len; - eir[eir_len++] = type; - memcpy(&eir[eir_len], data, data_len); - eir_len += data_len; - - return eir_len; -} - -static inline u16 eir_append_le16(u8 *eir, u16 eir_len, u8 type, u16 data) -{ - eir[eir_len++] = sizeof(type) + sizeof(data); - eir[eir_len++] = type; - put_unaligned_le16(data, &eir[eir_len]); - eir_len += sizeof(data); - - return eir_len; -} |