]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/bluetooth/bnep/core.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
[linux-2.6-omap-h63xx.git] / net / bluetooth / bnep / core.c
index b85d1492c357795344c4e960633bbc84a5fdeffe..1f78c3e336d8cb460cfeb70ec5f7f053e20bddf7 100644 (file)
@@ -36,8 +36,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>
 
@@ -326,7 +326,7 @@ static inline int bnep_rx_frame(struct bnep_session *s, struct sk_buff *skb)
                return 0;
        }
 
-       skb->mac.raw = skb->data;
+       skb_reset_mac_header(skb);
 
        /* Verify and pull out header */
        if (!skb_pull(skb, __bnep_rx_hlen[type & BNEP_TYPE_MASK]))
@@ -364,26 +364,28 @@ static inline int bnep_rx_frame(struct bnep_session *s, struct sk_buff *skb)
 
        case BNEP_COMPRESSED_SRC_ONLY:
                memcpy(__skb_put(nskb, ETH_ALEN), s->eh.h_dest, ETH_ALEN);
-               memcpy(__skb_put(nskb, ETH_ALEN), skb->mac.raw, ETH_ALEN);
+               memcpy(__skb_put(nskb, ETH_ALEN), skb_mac_header(skb), ETH_ALEN);
                put_unaligned(s->eh.h_proto, (__be16 *) __skb_put(nskb, 2));
                break;
 
        case BNEP_COMPRESSED_DST_ONLY:
-               memcpy(__skb_put(nskb, ETH_ALEN), skb->mac.raw, ETH_ALEN);
-               memcpy(__skb_put(nskb, ETH_ALEN + 2), s->eh.h_source, ETH_ALEN + 2);
+               memcpy(__skb_put(nskb, ETH_ALEN), skb_mac_header(skb),
+                      ETH_ALEN);
+               memcpy(__skb_put(nskb, ETH_ALEN + 2), s->eh.h_source,
+                      ETH_ALEN + 2);
                break;
 
        case BNEP_GENERAL:
-               memcpy(__skb_put(nskb, ETH_ALEN * 2), skb->mac.raw, ETH_ALEN * 2);
+               memcpy(__skb_put(nskb, ETH_ALEN * 2), skb_mac_header(skb),
+                      ETH_ALEN * 2);
                put_unaligned(s->eh.h_proto, (__be16 *) __skb_put(nskb, 2));
                break;
        }
 
-       memcpy(__skb_put(nskb, skb->len), skb->data, skb->len);
+       skb_copy_from_linear_data(skb, __skb_put(nskb, skb->len), skb->len);
        kfree_skb(skb);
 
        s->stats.rx_packets++;
-       nskb->dev       = dev;
        nskb->ip_summed = CHECKSUM_NONE;
        nskb->protocol  = eth_type_trans(nskb, dev);
        netif_rx_ni(nskb);
@@ -473,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);