net: mvneta: Factorize feature setting
authorEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Mon, 19 May 2014 16:59:53 +0000 (13:59 -0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 May 2014 18:57:15 +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/mvneta.c

index c7cbaf3..ed7f924 100644 (file)
@@ -2896,8 +2896,8 @@ static int mvneta_probe(struct platform_device *pdev)
        netif_napi_add(dev, &pp->napi, mvneta_poll, pp->weight);
 
        dev->features = NETIF_F_SG | NETIF_F_IP_CSUM;
-       dev->hw_features |= NETIF_F_SG | NETIF_F_IP_CSUM;
-       dev->vlan_features |= NETIF_F_SG | NETIF_F_IP_CSUM;
+       dev->hw_features |= dev->features;
+       dev->vlan_features |= dev->features;
        dev->priv_flags |= IFF_UNICAST_FLT;
 
        err = register_netdev(dev);