hv_netvsc: cleanup netdev feature flags for netvsc
authorsixiao@microsoft.com <sixiao@microsoft.com>
Thu, 4 Feb 2016 23:49:34 +0000 (15:49 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Feb 2016 12:17:58 +0000 (07:17 -0500)
1. Adding NETIF_F_TSO6 feature flag;
2. Adding NETIF_F_HW_CSUM. NETIF_F_IPV6_CSUM and NETIF_F_IP_CSUM are
being deprecated;
3. Cleanup the coding style of flag assignment by using macro.

Signed-off-by: Simon Xiao <sixiao@microsoft.com>
Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/netvsc_drv.c

index 1d3a66563bacbb0628e90693f8f3409c62018d68..c72e5b83afdbc9ec509106ed5cb70bbc0539372a 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)");
@@ -1081,10 +1086,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);