Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[linux-2.6-block.git] / drivers / net / hyperv / netvsc_drv.c
index 98e34fee45c76d1df80c9c52770e9902f47720ed..2b6595e24f43ceba41fcf4c52480473315ea4a31 100644 (file)
 
 #define RING_SIZE_MIN 64
 #define LINKCHANGE_INT (2 * HZ)
+#define NETVSC_HW_FEATURES     (NETIF_F_RXCSUM | \
+                                NETIF_F_SG | \
+                                NETIF_F_TSO | \
+                                NETIF_F_TSO6 | \
+                                NETIF_F_HW_CSUM)
 static int ring_size = 128;
 module_param(ring_size, int, S_IRUGO);
 MODULE_PARM_DESC(ring_size, "Ring buffer size (# of pages)");
@@ -545,6 +550,8 @@ do_send:
        packet->page_buf_cnt = init_page_array(rndis_msg, rndis_msg_size,
                                               skb, packet, &pb);
 
+       /* timestamp packet in software */
+       skb_tx_timestamp(skb);
        ret = netvsc_send(net_device_ctx->device_ctx, packet,
                          rndis_msg, &pb, skb);
 
@@ -915,6 +922,7 @@ static const struct ethtool_ops ethtool_ops = {
        .get_link       = ethtool_op_get_link,
        .get_channels   = netvsc_get_channels,
        .set_channels   = netvsc_set_channels,
+       .get_ts_info    = ethtool_op_get_ts_info,
 };
 
 static const struct net_device_ops device_ops = {
@@ -1081,10 +1089,8 @@ static int netvsc_probe(struct hv_device *dev,
 
        net->netdev_ops = &device_ops;
 
-       net->hw_features = NETIF_F_RXCSUM | NETIF_F_SG | NETIF_F_IP_CSUM |
-                               NETIF_F_TSO;
-       net->features = NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_SG | NETIF_F_RXCSUM |
-                       NETIF_F_IP_CSUM | NETIF_F_TSO;
+       net->hw_features = NETVSC_HW_FEATURES;
+       net->features = NETVSC_HW_FEATURES | NETIF_F_HW_VLAN_CTAG_TX;
 
        net->ethtool_ops = &ethtool_ops;
        SET_NETDEV_DEV(net, &dev->device);