]> err.no Git - linux-2.6/blobdiff - net/ipv4/tcp_output.c
[PATCH] fix NET_RADIO=n, IEEE80211=y compile
[linux-2.6] / net / ipv4 / tcp_output.c
index caf2e2cff29365ece4d1075ac2eae72c7bf12816..b907456a79f46373bb81aac30ff9123910901952 100644 (file)
@@ -194,12 +194,11 @@ void tcp_select_initial_window(int __space, __u32 mss,
         * will be satisfied with 2.
         */
        if (mss > (1<<*rcv_wscale)) {
-               int init_cwnd;
-
-               if (mss > 1460)
+               int init_cwnd = 4;
+               if (mss > 1460*3)
                        init_cwnd = 2;
-               else
-                       init_cwnd = (mss > 1095) ? 3 : 4;
+               else if (mss > 1460)
+                       init_cwnd = 3;
                if (*rcv_wnd > init_cwnd*mss)
                        *rcv_wnd = init_cwnd*mss;
        }
@@ -436,8 +435,7 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss
        int nsize, old_factor;
        u16 flags;
 
-       BUG_ON(len >= skb->len);
-
+       BUG_ON(len > skb->len);
        nsize = skb_headlen(skb) - len;
        if (nsize < 0)
                nsize = 0;
@@ -1611,7 +1609,7 @@ void tcp_send_fin(struct sock *sk)
  * was unread data in the receive queue.  This behavior is recommended
  * by draft-ietf-tcpimpl-prob-03.txt section 3.10.  -DaveM
  */
-void tcp_send_active_reset(struct sock *sk, unsigned int __nocast priority)
+void tcp_send_active_reset(struct sock *sk, gfp_t priority)
 {
        struct tcp_sock *tp = tcp_sk(sk);
        struct sk_buff *skb;