Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64797
b: refs/heads/master
c: 767c5eb
h: refs/heads/master
i:
  64795: 3164299
v: v3
  • Loading branch information
Marcel Holtmann committed Sep 9, 2007
1 parent 4fa40fe commit 42eeab0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 26a4a06e7ff2874154eb3f4b4ba0514dc563b100
refs/heads/master: 767c5eb5d35aeb85987143f0a730bc21d3ecfb3d
17 changes: 16 additions & 1 deletion trunk/net/bluetooth/hci_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include <linux/skbuff.h>
#include <linux/workqueue.h>
#include <linux/interrupt.h>
#include <linux/compat.h>
#include <linux/socket.h>
#include <linux/ioctl.h>
#include <net/sock.h>
Expand Down Expand Up @@ -342,9 +343,23 @@ static inline void hci_sock_cmsg(struct sock *sk, struct msghdr *msg, struct sk_

if (mask & HCI_CMSG_TSTAMP) {
struct timeval tv;
void *data;
int len;

skb_get_timestamp(skb, &tv);
put_cmsg(msg, SOL_HCI, HCI_CMSG_TSTAMP, sizeof(tv), &tv);

if (msg->msg_flags & MSG_CMSG_COMPAT) {
struct compat_timeval ctv;
ctv.tv_sec = tv.tv_sec;
ctv.tv_usec = tv.tv_usec;
data = &ctv;
len = sizeof(ctv);
} else {
data = &tv;
len = sizeof(tv);
}

put_cmsg(msg, SOL_HCI, HCI_CMSG_TSTAMP, len, data);
}
}

Expand Down

0 comments on commit 42eeab0

Please sign in to comment.