diff --git a/[refs] b/[refs] index 926130ecd9a0..6f0242c5c461 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 26a4a06e7ff2874154eb3f4b4ba0514dc563b100 +refs/heads/master: 767c5eb5d35aeb85987143f0a730bc21d3ecfb3d diff --git a/trunk/net/bluetooth/hci_sock.c b/trunk/net/bluetooth/hci_sock.c index 1dae3dfc66a9..68198a788969 100644 --- a/trunk/net/bluetooth/hci_sock.c +++ b/trunk/net/bluetooth/hci_sock.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -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); } }