]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/bluetooth/bnep/core.c
Merge branch 'net-next-2.6-misc-20080612a' of git://git.linux-ipv6.org/gitroot/yoshfu...
[linux-2.6-omap-h63xx.git] / net / bluetooth / bnep / core.c
index ab2db55982ca3e4bb51c241ef7b3e6f1869ab0a8..1d98a1b80da73aa30d04113b636944cb3494f8fb 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>
    SOFTWARE IS DISCLAIMED.
 */
 
-/*
- * $Id: core.c,v 1.20 2002/08/04 21:23:58 maxk Exp $
- */
-
 #include <linux/module.h>
 
 #include <linux/kernel.h>
@@ -36,8 +32,8 @@
 #include <linux/signal.h>
 #include <linux/init.h>
 #include <linux/wait.h>
+#include <linux/freezer.h>
 #include <linux/errno.h>
-#include <linux/smp_lock.h>
 #include <linux/net.h>
 #include <net/sock.h>
 
@@ -135,7 +131,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)
@@ -150,8 +146,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);
@@ -180,7 +176,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)
@@ -475,7 +471,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);