Skip to contentSkip to conversation

Bluetooth: Enable timestamps for control channel

PATCH Applied Marcel Holtmann 2 participants 2 messages Feb 22, 2012

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH v2 1/1 Bluetooth: Enable timestamps for control channel

The control channel can be also monitored, so include timestamps here as well. And make sure management events get their timestamp when they are created.

---
 net/bluetooth/hci_sock.c |    1 +
 net/bluetooth/mgmt.c     |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)
net/bluetooth/hci_sock.c +1 -0
index b768393..f0912d8 100644
@@ -783,6 +783,7 @@ static int hci_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
 	case HCI_CHANNEL_RAW:
 		hci_sock_cmsg(sk, msg, skb);
 		break;
+	case HCI_CHANNEL_CONTROL:
 	case HCI_CHANNEL_MONITOR:
 		sock_recv_timestamp(msg, sk, skb);
 		break;
net/bluetooth/mgmt.c +3 -0
index 9fb4490..d650c02 100644
@@ -817,6 +817,9 @@ static int mgmt_event(u16 event, struct hci_dev *hdev, void *data,
 	if (data)
 		memcpy(skb_put(skb, data_len), data, data_len);
 
+	/* Time stamp */
+	__net_timestamp(skb);
+
 	hci_send_to_control(skb, skip_sk);
 	kfree_skb(skb);
 
Signature · 1 line
1.7.7.6
#1 lore raw

Hi Marcel,

Quoted 9 lines · Marcel Holtmann

The control channel can be also monitored, so include timestamps here as well. And make sure management events get their timestamp when they are created.

---
 net/bluetooth/hci_sock.c |    1 +
 net/bluetooth/mgmt.c     |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)

Applied. Thanks.

Johan