nfsd: minor write_pool_threads exit cleanup
[safe/jmp/linux-2.6] / net / x25 / x25_subr.c
index 7fd872a..511a598 100644 (file)
@@ -27,7 +27,7 @@
 #include <linux/string.h>
 #include <linux/skbuff.h>
 #include <net/sock.h>
-#include <net/tcp.h>
+#include <net/tcp_states.h>
 #include <net/x25.h>
 
 /*
@@ -80,7 +80,7 @@ void x25_requeue_frames(struct sock *sk)
                if (!skb_prev)
                        skb_queue_head(&sk->sk_write_queue, skb);
                else
-                       skb_append(skb_prev, skb);
+                       skb_append(skb_prev, skb, &sk->sk_write_queue);
                skb_prev = skb;
        }
 }
@@ -190,8 +190,9 @@ void x25_write_internal(struct sock *sk, int frametype)
                        dptr    = skb_put(skb, len);
                        memcpy(dptr, addresses, len);
                        len     = x25_create_facilities(facilities,
-                                                       &x25->facilities,
-                                            x25->neighbour->global_facil_mask);
+                                       &x25->facilities,
+                                       &x25->dte_facilities,
+                                       x25->neighbour->global_facil_mask);
                        dptr    = skb_put(skb, len);
                        memcpy(dptr, facilities, len);
                        dptr = skb_put(skb, x25->calluserdata.cudlength);
@@ -206,6 +207,7 @@ void x25_write_internal(struct sock *sk, int frametype)
                        *dptr++ = 0x00;         /* Address lengths */
                        len     = x25_create_facilities(facilities,
                                                        &x25->facilities,
+                                                       &x25->dte_facilities,
                                                        x25->vc_facil_mask);
                        dptr    = skb_put(skb, len);
                        memcpy(dptr, facilities, len);
@@ -357,7 +359,7 @@ void x25_check_rbuf(struct sock *sk)
 {
        struct x25_sock *x25 = x25_sk(sk);
 
-       if (atomic_read(&sk->sk_rmem_alloc) < (sk->sk_rcvbuf / 2) &&
+       if (atomic_read(&sk->sk_rmem_alloc) < (sk->sk_rcvbuf >> 1) &&
            (x25->condition & X25_COND_OWN_RX_BUSY)) {
                x25->condition &= ~X25_COND_OWN_RX_BUSY;
                x25->condition &= ~X25_COND_ACK_PENDING;