Skip to contentSkip to conversation

Bluetooth: Add support for sending MGMT commands and events to monitor

PATCH In review Marcel Holtmann 1 participant 1 message Aug 27, 2016

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 5/5 Bluetooth: Add support for sending MGMT commands and events to monitor

This adds support for tracing all management commands and events via the monitor interface.

---
 include/net/bluetooth/hci_core.h |  3 ++
 include/net/bluetooth/hci_mon.h  |  2 +
 net/bluetooth/hci_sock.c         | 94 ++++++++++++++++++++++++++++++++++++++++
 net/bluetooth/mgmt_util.c        | 66 ++++++++++++++++++++++++++--
 4 files changed, 162 insertions(+), 3 deletions(-)
include/net/bluetooth/hci_core.h +3 -0
index 9f181b583b96..a48f71d73dc8 100644
@@ -1406,6 +1406,9 @@ void hci_send_to_sock(struct hci_dev *hdev, struct sk_buff *skb);
 void hci_send_to_channel(unsigned short channel, struct sk_buff *skb,
 			 int flag, struct sock *skip_sk);
 void hci_send_to_monitor(struct hci_dev *hdev, struct sk_buff *skb);
+void hci_send_monitor_ctrl_event(struct hci_dev *hdev, u16 event,
+				 void *data, u16 data_len, ktime_t tstamp,
+				 int flag, struct sock *skip_sk);
 
 void hci_sock_dev_event(struct hci_dev *hdev, int event);
 
include/net/bluetooth/hci_mon.h +2 -0
index 9640790cbbcc..240786b04a46 100644
@@ -47,6 +47,8 @@ struct hci_mon_hdr {
 #define HCI_MON_USER_LOGGING	13
 #define HCI_MON_CTRL_OPEN	14
 #define HCI_MON_CTRL_CLOSE	15
+#define HCI_MON_CTRL_COMMAND	16
+#define HCI_MON_CTRL_EVENT	17
 
 struct hci_mon_new_index {
 	__u8		type;
net/bluetooth/hci_sock.c +94 -0

112 lines not on this page · raw message

net/bluetooth/mgmt_util.c +63 -3

116 lines not on this page · raw message

Signature · 1 line
2.7.4