net: mv643xx_eth: Factorize feature setting
authorEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Mon, 19 May 2014 16:59:58 +0000 (13:59 -0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 May 2014 18:57:16 +0000 (14:57 -0400)
In order to ease the addition of new features, let's factorize the
feature list.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mv643xx_eth.c

index 5ad19d2e2f2d0ede2929de9fdd73f898e6218617..01fde2c3f56d54eb564d1fed53d1d0f04ad17152 100644 (file)
@@ -2941,9 +2941,11 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
        dev->watchdog_timeo = 2 * HZ;
        dev->base_addr = 0;
 
-       dev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_RXCSUM;
-       dev->features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_RXCSUM;
-       dev->vlan_features = NETIF_F_SG | NETIF_F_IP_CSUM;
+       dev->features = NETIF_F_SG | NETIF_F_IP_CSUM;
+       dev->vlan_features = dev->features;
+
+       dev->features |= NETIF_F_RXCSUM;
+       dev->hw_features = dev->features;
 
        dev->priv_flags |= IFF_UNICAST_FLT;