Skip to content

Commit b50b72d

Browse files
wtarreaudavem330
authored andcommitted
net: mvneta: enable features before registering the driver
It seems that the reason why the dev features were ignored was because they were enabled after registeration. Signed-off-by: Willy Tarreau <w@1wt.eu> Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent f1ea3cd commit b50b72d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

drivers/net/ethernet/marvell/mvneta.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2771,16 +2771,17 @@ static int mvneta_probe(struct platform_device *pdev)
27712771

27722772
netif_napi_add(dev, &pp->napi, mvneta_poll, pp->weight);
27732773

2774+
dev->features = NETIF_F_SG | NETIF_F_IP_CSUM;
2775+
dev->hw_features |= NETIF_F_SG | NETIF_F_IP_CSUM;
2776+
dev->vlan_features |= NETIF_F_SG | NETIF_F_IP_CSUM;
2777+
dev->priv_flags |= IFF_UNICAST_FLT;
2778+
27742779
err = register_netdev(dev);
27752780
if (err < 0) {
27762781
dev_err(&pdev->dev, "failed to register\n");
27772782
goto err_deinit;
27782783
}
27792784

2780-
dev->features = NETIF_F_SG | NETIF_F_IP_CSUM;
2781-
dev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM;
2782-
dev->priv_flags |= IFF_UNICAST_FLT;
2783-
27842785
netdev_info(dev, "mac: %pM\n", dev->dev_addr);
27852786

27862787
platform_set_drvdata(pdev, pp->dev);

0 commit comments

Comments
 (0)