diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2012-02-20 08:50:34 -0500 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-02-20 08:56:15 -0500 |
commit | 3a208627f3ac83d3b749608770f7eb631db31a77 (patch) | |
tree | db13c08160831a0e2ed1cb2bba11263ac673e151 /net | |
parent | cedc5469778846ee18c653aaa6d70681961eed93 (diff) |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/hci_sock.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index 27ec9088508f..71a02adbaa77 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, | |||
488 | skb_reset_transport_header(skb); | 488 | skb_reset_transport_header(skb); |
489 | err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied); | 489 | err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied); |
490 | 490 | ||
491 | hci_sock_cmsg(sk, msg, skb); | 491 | switch (hci_pi(sk)->channel) { |
492 | case HCI_CHANNEL_RAW: | ||
493 | hci_sock_cmsg(sk, msg, skb); | ||
494 | break; | ||
495 | } | ||
492 | 496 | ||
493 | skb_free_datagram(sk, skb); | 497 | skb_free_datagram(sk, skb); |
494 | 498 | ||