* [PATCH v2] Bluetooth: Enable timestamps for control channel
@ 2012-02-22 12:49 Marcel Holtmann
2012-02-22 14:13 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: Marcel Holtmann @ 2012-02-22 12:49 UTC (permalink / raw)
To: linux-bluetooth
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.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
net/bluetooth/hci_sock.c | 1 +
net/bluetooth/mgmt.c | 3 +++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index b768393..f0912d8 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -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;
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 9fb4490..d650c02 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -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);
--
1.7.7.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] Bluetooth: Enable timestamps for control channel
2012-02-22 12:49 [PATCH v2] Bluetooth: Enable timestamps for control channel Marcel Holtmann
@ 2012-02-22 14:13 ` Johan Hedberg
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2012-02-22 14:13 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: linux-bluetooth
Hi Marcel,
On Wed, Feb 22, 2012, Marcel Holtmann wrote:
> 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.
>
> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
> ---
> net/bluetooth/hci_sock.c | 1 +
> net/bluetooth/mgmt.c | 3 +++
> 2 files changed, 4 insertions(+), 0 deletions(-)
Applied. Thanks.
Johan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-22 14:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-22 12:49 [PATCH v2] Bluetooth: Enable timestamps for control channel Marcel Holtmann
2012-02-22 14:13 ` Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).