Merge git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6
[powerpc.git] / net / x25 / x25_out.c
index a2e62ce..2b96b52 100644 (file)
@@ -3,7 +3,7 @@
  *
  *     This is ALPHA test software. This code may break your machine,
  *     randomly fail to work with new releases, misbehave and/or generally
- *     screw up. It might even work. 
+ *     screw up. It might even work.
  *
  *     This code REQUIRES 2.1.15 or higher
  *
@@ -61,7 +61,7 @@ int x25_output(struct sock *sk, struct sk_buff *skb)
 
        if (skb->len - header_len > max_len) {
                /* Save a copy of the Header */
-               memcpy(header, skb->data, header_len);
+               skb_copy_from_linear_data(skb, header, header_len);
                skb_pull(skb, header_len);
 
                frontlen = skb_headroom(skb);
@@ -78,18 +78,18 @@ int x25_output(struct sock *sk, struct sk_buff *skb)
                                               "sent\n", err, sent);
                                return err;
                        }
-                               
+
                        skb_reserve(skbn, frontlen);
 
                        len = max_len > skb->len ? skb->len : max_len;
 
                        /* Copy the user data */
-                       memcpy(skb_put(skbn, len), skb->data, len);
+                       skb_copy_from_linear_data(skb, skb_put(skbn, len), len);
                        skb_pull(skb, len);
 
                        /* Duplicate the Header */
                        skb_push(skbn, header_len);
-                       memcpy(skbn->data, header, header_len);
+                       skb_copy_to_linear_data(skbn, header, header_len);
 
                        if (skb->len > 0) {
                                if (x25->neighbour->extended)
@@ -101,7 +101,7 @@ int x25_output(struct sock *sk, struct sk_buff *skb)
                        skb_queue_tail(&sk->sk_write_queue, skbn);
                        sent += len;
                }
-               
+
                kfree_skb(skb);
        } else {
                skb_queue_tail(&sk->sk_write_queue, skb);
@@ -110,7 +110,7 @@ int x25_output(struct sock *sk, struct sk_buff *skb)
        return sent;
 }
 
-/* 
+/*
  *     This procedure is passed a buffer descriptor for an iframe. It builds
  *     the rest of the control part of the frame and then writes it out.
  */
@@ -131,7 +131,7 @@ static void x25_send_iframe(struct sock *sk, struct sk_buff *skb)
                skb->data[2] |= (x25->vr << 5) & 0xE0;
        }
 
-       x25_transmit_link(skb, x25->neighbour); 
+       x25_transmit_link(skb, x25->neighbour);
 }
 
 void x25_kick(struct sock *sk)