dect
/
linux-2.6
Archived
13
0
Fork 0

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 <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Marcel Holtmann 2012-02-20 14:50:34 +01:00 committed by Johan Hedberg
parent cedc546977
commit 3a208627f3
1 changed files with 5 additions and 1 deletions

View File

@ -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);