projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cedc546
)
Bluetooth: Add HCI CMSG details only to raw sockets
author
Marcel Holtmann
<marcel@holtmann.org>
Mon, 20 Feb 2012 13:50:34 +0000
(14:50 +0100)
committer
Johan Hedberg
<johan.hedberg@intel.com>
Mon, 20 Feb 2012 13:56:15 +0000
(15:56 +0200)
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>
net/bluetooth/hci_sock.c
patch
|
blob
|
blame
|
history
diff --git
a/net/bluetooth/hci_sock.c
b/net/bluetooth/hci_sock.c
index 27ec9088508faaeba0b75c8428c4ef84effe4e9e..71a02adbaa77d30fb7886b93a5811692beb7b70e 100644
(file)
--- 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);