summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/mgmt_util.h
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2021-12-03 16:15:40 -0800
committerMarcel Holtmann <marcel@holtmann.org>2021-12-07 17:05:52 +0100
commit8aca46f91c42020bc58cd56e464a1101e517aa10 (patch)
tree95d72c2b0e13db155b17202c6d2be584f41e2b4c /net/bluetooth/mgmt_util.h
parent995d948cf2e45834275f07afc1c9881a9902e73c (diff)
downloadlinux-8aca46f91c42020bc58cd56e464a1101e517aa10.tar.bz2
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.h4
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);