Skip to content

Commit afbca76

Browse files
Gavin Shanshenki
authored andcommitted
net/faraday: Enable offload checksum according to device-tree
This enables IP/UDP/TCP offload checksum according to information passed on from bootloader through device-tree. The offload doesn't working properly when the interface works in NCSI mode. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
1 parent 82d7d5a commit afbca76

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/net/ethernet/faraday/ftgmac100.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1377,7 +1377,11 @@ static int ftgmac100_probe(struct platform_device *pdev)
13771377

13781378
netdev->ethtool_ops = &ftgmac100_ethtool_ops;
13791379
netdev->netdev_ops = &ftgmac100_netdev_ops;
1380-
netdev->features = NETIF_F_IP_CSUM | NETIF_F_GRO;
1380+
if (pdev->dev.of_node &&
1381+
of_get_property(pdev->dev.of_node, "no-hw-checksum", NULL))
1382+
netdev->features = NETIF_F_GRO;
1383+
else
1384+
netdev->features = NETIF_F_IP_CSUM | NETIF_F_GRO;
13811385

13821386
platform_set_drvdata(pdev, netdev);
13831387

0 commit comments

Comments
 (0)