From: Marcel Holtmann Date: Mon, 20 Feb 2012 13:50:34 +0000 (+0100) Subject: Bluetooth: Add HCI CMSG details only to raw sockets X-Git-Tag: upstream/snapshot3+hdmi~7954^2~112^2~118 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3a208627f3ac83d3b749608770f7eb631db31a77;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git Bluetooth: Add HCI CMSG details only to raw sockets The HCI CMSG specific data is for raw sockets only. So only add them to actual raw sockets. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg --- diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index 27ec908..71a02ad 100644 --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c @@ -488,7 +488,11 @@ static int hci_sock_recvmsg(struct kiocb *iocb, struct socket *sock, skb_reset_transport_header(skb); err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied); - hci_sock_cmsg(sk, msg, skb); + switch (hci_pi(sk)->channel) { + case HCI_CHANNEL_RAW: + hci_sock_cmsg(sk, msg, skb); + break; + } skb_free_datagram(sk, skb);