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.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index dbf98c49dbaa..dc3ecb19a5cd 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -1,4 +1,4 @@
1/* 1/*
2 BlueZ - Bluetooth protocol stack for Linux 2 BlueZ - Bluetooth protocol stack for Linux
3 Copyright (C) 2000-2001 Qualcomm Incorporated 3 Copyright (C) 2000-2001 Qualcomm Incorporated
4 4
@@ -12,13 +12,13 @@
12 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 12 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. 13 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
14 IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY 14 IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
15 CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES 15 CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
16 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 16 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 17 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 18 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 19
20 ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, 20 ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
21 COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS 21 COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
22 SOFTWARE IS DISCLAIMED. 22 SOFTWARE IS DISCLAIMED.
23*/ 23*/
24 24
@@ -170,7 +170,7 @@ static int hci_sock_release(struct socket *sock)
170 return 0; 170 return 0;
171} 171}
172 172
173/* Ioctls that require bound socket */ 173/* Ioctls that require bound socket */
174static inline int hci_sock_bound_ioctl(struct sock *sk, unsigned int cmd, unsigned long arg) 174static inline int hci_sock_bound_ioctl(struct sock *sk, unsigned int cmd, unsigned long arg)
175{ 175{
176 struct hci_dev *hdev = hci_pi(sk)->hdev; 176 struct hci_dev *hdev = hci_pi(sk)->hdev;
@@ -348,8 +348,8 @@ static inline void hci_sock_cmsg(struct sock *sk, struct msghdr *msg, struct sk_
348 put_cmsg(msg, SOL_HCI, HCI_CMSG_TSTAMP, sizeof(tv), &tv); 348 put_cmsg(msg, SOL_HCI, HCI_CMSG_TSTAMP, sizeof(tv), &tv);
349 } 349 }
350} 350}
351 351
352static int hci_sock_recvmsg(struct kiocb *iocb, struct socket *sock, 352static int hci_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
353 struct msghdr *msg, size_t len, int flags) 353 struct msghdr *msg, size_t len, int flags)
354{ 354{
355 int noblock = flags & MSG_DONTWAIT; 355 int noblock = flags & MSG_DONTWAIT;
@@ -386,7 +386,7 @@ static int hci_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
386 return err ? : copied; 386 return err ? : copied;
387} 387}
388 388
389static int hci_sock_sendmsg(struct kiocb *iocb, struct socket *sock, 389static int hci_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
390 struct msghdr *msg, size_t len) 390 struct msghdr *msg, size_t len)
391{ 391{
392 struct sock *sk = sock->sk; 392 struct sock *sk = sock->sk;
@@ -520,7 +520,7 @@ static int hci_sock_setsockopt(struct socket *sock, int level, int optname, char
520 *((u32 *) f->event_mask + 0) = uf.event_mask[0]; 520 *((u32 *) f->event_mask + 0) = uf.event_mask[0];
521 *((u32 *) f->event_mask + 1) = uf.event_mask[1]; 521 *((u32 *) f->event_mask + 1) = uf.event_mask[1];
522 } 522 }
523 break; 523 break;
524 524
525 default: 525 default:
526 err = -ENOPROTOOPT; 526 err = -ENOPROTOOPT;
@@ -535,7 +535,7 @@ static int hci_sock_getsockopt(struct socket *sock, int level, int optname, char
535{ 535{
536 struct hci_ufilter uf; 536 struct hci_ufilter uf;
537 struct sock *sk = sock->sk; 537 struct sock *sk = sock->sk;
538 int len, opt; 538 int len, opt;
539 539
540 if (get_user(len, optlen)) 540 if (get_user(len, optlen))
541 return -EFAULT; 541 return -EFAULT;
@@ -544,7 +544,7 @@ static int hci_sock_getsockopt(struct socket *sock, int level, int optname, char
544 case HCI_DATA_DIR: 544 case HCI_DATA_DIR:
545 if (hci_pi(sk)->cmsg_mask & HCI_CMSG_DIR) 545 if (hci_pi(sk)->cmsg_mask & HCI_CMSG_DIR)
546 opt = 1; 546 opt = 1;
547 else 547 else
548 opt = 0; 548 opt = 0;
549 549
550 if (put_user(opt, optval)) 550 if (put_user(opt, optval))
@@ -554,7 +554,7 @@ static int hci_sock_getsockopt(struct socket *sock, int level, int optname, char
554 case HCI_TIME_STAMP: 554 case HCI_TIME_STAMP:
555 if (hci_pi(sk)->cmsg_mask & HCI_CMSG_TSTAMP) 555 if (hci_pi(sk)->cmsg_mask & HCI_CMSG_TSTAMP)
556 opt = 1; 556 opt = 1;
557 else 557 else
558 opt = 0; 558 opt = 0;
559 559
560 if (put_user(opt, optval)) 560 if (put_user(opt, optval))