diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-12-03 16:15:40 -0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2021-12-07 17:05:52 +0100 |
commit | 8aca46f91c42020bc58cd56e464a1101e517aa10 (patch) | |
tree | 95d72c2b0e13db155b17202c6d2be584f41e2b4c /net/bluetooth/mgmt_util.h | |
parent | 995d948cf2e45834275f07afc1c9881a9902e73c (diff) | |
download | linux-8aca46f91c42020bc58cd56e464a1101e517aa10.tar.gz linux-8aca46f91c42020bc58cd56e464a1101e517aa10.tar.bz2 linux-8aca46f91c42020bc58cd56e464a1101e517aa10.zip |
Bluetooth: mgmt: Introduce mgmt_alloc_skb and mgmt_send_event_skb
This introduces mgmt_alloc_skb and mgmt_send_event_skb which are
convenient when building MGMT events that have variable length as the
likes of skb_put_data can be used to insert portion directly on the skb
instead of having to first build an intermediate buffer just to be
copied over the skb.
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/mgmt_util.h')
-rw-r--r-- | net/bluetooth/mgmt_util.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bluetooth/mgmt_util.h b/net/bluetooth/mgmt_util.h index 63b965eaaaac..98e40395a383 100644 --- a/net/bluetooth/mgmt_util.h +++ b/net/bluetooth/mgmt_util.h @@ -32,6 +32,10 @@ struct mgmt_pending_cmd { int (*cmd_complete)(struct mgmt_pending_cmd *cmd, u8 status); }; +struct sk_buff *mgmt_alloc_skb(struct hci_dev *hdev, u16 opcode, + unsigned int size); +int mgmt_send_event_skb(unsigned short channel, struct sk_buff *skb, int flag, + struct sock *skip_sk); int mgmt_send_event(u16 event, struct hci_dev *hdev, unsigned short channel, void *data, u16 data_len, int flag, struct sock *skip_sk); int mgmt_cmd_status(struct sock *sk, u16 index, u16 cmd, u8 status); |