]> err.no Git - linux-2.6/blobdiff - net/bluetooth/bnep/core.c
Merge branch 'for-2.6.26' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer...
[linux-2.6] / net / bluetooth / bnep / core.c
index 1c8f4a0c5f4356dc9421bcc90dadc5efbc91c44c..f85d94643aafd29939175f51a98cb9ff7b9d5182 100644 (file)
@@ -2,7 +2,7 @@
    BNEP implementation for Linux Bluetooth stack (BlueZ).
    Copyright (C) 2001-2002 Inventel Systemes
    Written 2001-2002 by
-       Clément Moreau <clement.moreau@inventel.fr>
+       Clément Moreau <clement.moreau@inventel.fr>
        David Libault  <david.libault@inventel.fr>
 
    Copyright (C) 2002 Maxim Krasnyansky <maxk@qualcomm.com>
@@ -36,6 +36,7 @@
 #include <linux/signal.h>
 #include <linux/init.h>
 #include <linux/wait.h>
+#include <linux/freezer.h>
 #include <linux/errno.h>
 #include <linux/net.h>
 #include <net/sock.h>
@@ -134,7 +135,7 @@ static int bnep_ctrl_set_netfilter(struct bnep_session *s, __be16 *data, int len
        if (len < 2)
                return -EILSEQ;
 
-       n = ntohs(get_unaligned(data));
+       n = get_unaligned_be16(data);
        data++; len -= 2;
 
        if (len < n)
@@ -149,8 +150,8 @@ static int bnep_ctrl_set_netfilter(struct bnep_session *s, __be16 *data, int len
                int i;
 
                for (i = 0; i < n; i++) {
-                       f[i].start = ntohs(get_unaligned(data++));
-                       f[i].end   = ntohs(get_unaligned(data++));
+                       f[i].start = get_unaligned_be16(data++);
+                       f[i].end   = get_unaligned_be16(data++);
 
                        BT_DBG("proto filter start %d end %d",
                                f[i].start, f[i].end);
@@ -179,7 +180,7 @@ static int bnep_ctrl_set_mcfilter(struct bnep_session *s, u8 *data, int len)
        if (len < 2)
                return -EILSEQ;
 
-       n = ntohs(get_unaligned((__be16 *) data));
+       n = get_unaligned_be16(data);
        data += 2; len -= 2;
 
        if (len < n)
@@ -474,7 +475,6 @@ static int bnep_session(void *arg)
 
        daemonize("kbnepd %s", dev->name);
        set_user_nice(current, -15);
-       current->flags |= PF_NOFREEZE;
 
        init_waitqueue_entry(&wait, current);
        add_wait_queue(sk->sk_sleep, &wait);