Merge to Fedora kernel-2.6.17-1.2187_FC5 patched with stable patch-2.6.17.13-vs2...
[linux-2.6.git] / include / net / sock.h
index f6e3f99..924d348 100644 (file)
@@ -1042,9 +1042,13 @@ static inline void sk_setup_caps(struct sock *sk, struct dst_entry *dst)
 {
        __sk_dst_set(sk, dst);
        sk->sk_route_caps = dst->dev->features;
+       if (sk->sk_route_caps & NETIF_F_GSO)
+               sk->sk_route_caps |= NETIF_F_TSO;
        if (sk->sk_route_caps & NETIF_F_TSO) {
                if (sock_flag(sk, SOCK_NO_LARGESEND) || dst->header_len)
                        sk->sk_route_caps &= ~NETIF_F_TSO;
+               else 
+                       sk->sk_route_caps |= NETIF_F_SG | NETIF_F_HW_CSUM;
        }
 }