Merge master.kernel.org:/pub/scm/linux/kernel/git/dtor/input
[powerpc.git] / include / net / tcp.h
index f2b1045..f4f9aba 100644 (file)
@@ -848,9 +848,8 @@ extern __u32 cookie_v4_init_sequence(struct sock *sk, struct sk_buff *skb,
 
 /* tcp_output.c */
 
-extern int tcp_write_xmit(struct sock *, int nonagle);
 extern void __tcp_push_pending_frames(struct sock *sk, struct tcp_sock *tp,
-                                     unsigned cur_mss, int nonagle);
+                                     unsigned int cur_mss, int nonagle);
 extern int tcp_may_send_now(struct sock *sk, struct tcp_sock *tp);
 extern int tcp_retransmit_skb(struct sock *, struct sk_buff *);
 extern void tcp_xmit_retransmit_queue(struct sock *);
@@ -861,12 +860,16 @@ extern void tcp_send_probe0(struct sock *);
 extern void tcp_send_partial(struct sock *);
 extern int  tcp_write_wakeup(struct sock *);
 extern void tcp_send_fin(struct sock *sk);
-extern void tcp_send_active_reset(struct sock *sk, int priority);
+extern void tcp_send_active_reset(struct sock *sk,
+                                  unsigned int __nocast priority);
 extern int  tcp_send_synack(struct sock *);
-extern void tcp_push_one(struct sock *, unsigned mss_now);
+extern void tcp_push_one(struct sock *, unsigned int mss_now);
 extern void tcp_send_ack(struct sock *sk);
 extern void tcp_send_delayed_ack(struct sock *sk);
 
+/* tcp_input.c */
+extern void tcp_cwnd_application_limited(struct sock *sk);
+
 /* tcp_timer.c */
 extern void tcp_init_xmit_timers(struct sock *);
 extern void tcp_clear_xmit_timers(struct sock *);
@@ -966,7 +969,7 @@ static inline void tcp_reset_xmit_timer(struct sock *sk, int what, unsigned long
 static inline void tcp_initialize_rcv_mss(struct sock *sk)
 {
        struct tcp_sock *tp = tcp_sk(sk);
-       unsigned int hint = min(tp->advmss, tp->mss_cache_std);
+       unsigned int hint = min_t(unsigned int, tp->advmss, tp->mss_cache);
 
        hint = min(hint, tp->rcv_wnd/2);
        hint = min(hint, TCP_MIN_RCVMSS);
@@ -989,7 +992,7 @@ static __inline__ void tcp_fast_path_on(struct tcp_sock *tp)
 
 static inline void tcp_fast_path_check(struct sock *sk, struct tcp_sock *tp)
 {
-       if (skb_queue_len(&tp->out_of_order_queue) == 0 &&
+       if (skb_queue_empty(&tp->out_of_order_queue) &&
            tp->rcv_wnd &&
            atomic_read(&sk->sk_rmem_alloc) < sk->sk_rcvbuf &&
            !tp->urg_data)
@@ -1233,28 +1236,6 @@ static inline void tcp_sync_left_out(struct tcp_sock *tp)
        tp->left_out = tp->sacked_out + tp->lost_out;
 }
 
-extern void tcp_cwnd_application_limited(struct sock *sk);
-
-/* Congestion window validation. (RFC2861) */
-
-static inline void tcp_cwnd_validate(struct sock *sk, struct tcp_sock *tp)
-{
-       __u32 packets_out = tp->packets_out;
-
-       if (packets_out >= tp->snd_cwnd) {
-               /* Network is feed fully. */
-               tp->snd_cwnd_used = 0;
-               tp->snd_cwnd_stamp = tcp_time_stamp;
-       } else {
-               /* Network starves. */
-               if (tp->packets_out > tp->snd_cwnd_used)
-                       tp->snd_cwnd_used = tp->packets_out;
-
-               if ((s32)(tcp_time_stamp - tp->snd_cwnd_stamp) >= tp->rto)
-                       tcp_cwnd_application_limited(sk);
-       }
-}
-
 /* Set slow start threshould and cwnd not falling to slow start */
 static inline void __tcp_enter_cwr(struct tcp_sock *tp)
 {