aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_sock.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth/hci_sock.c')
-rw-r--r--net/bluetooth/hci_sock.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index 832b5f44be5c..bfc9a35bad33 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -499,6 +499,15 @@ static int hci_sock_setsockopt(struct socket *sock, int level, int optname, char
499 break; 499 break;
500 500
501 case HCI_FILTER: 501 case HCI_FILTER:
502 {
503 struct hci_filter *f = &hci_pi(sk)->filter;
504
505 uf.type_mask = f->type_mask;
506 uf.opcode = f->opcode;
507 uf.event_mask[0] = *((u32 *) f->event_mask + 0);
508 uf.event_mask[1] = *((u32 *) f->event_mask + 1);
509 }
510
502 len = min_t(unsigned int, len, sizeof(uf)); 511 len = min_t(unsigned int, len, sizeof(uf));
503 if (copy_from_user(&uf, optval, len)) { 512 if (copy_from_user(&uf, optval, len)) {
504 err = -EFAULT; 513 err = -EFAULT;