From e6a6ab16cca4d81d443600c09e75ac6afe5e5f19 Mon Sep 17 00:00:00 2001
From: Grygorii Strashko <grygorii.strashko@ti.com>
Date: Thu, 7 Oct 2021 20:27:03 +0300
Subject: [PATCH] net: ethernet: ti: icssg_prueth: declare NETIF_F_SG support

The ICSSG driver can accept fragmented skbs, but it doesn't declare
NETIF_F_SG as result Net core will linear all skbs during xmit. It also
disables GSO which depends on SG.

Hence declare NETIF_F_SG feature support.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
---
 drivers/net/ethernet/ti/icssg_prueth.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/ti/icssg_prueth.c b/drivers/net/ethernet/ti/icssg_prueth.c
index e07b318d9422..eed91038bde2 100644
--- a/drivers/net/ethernet/ti/icssg_prueth.c
+++ b/drivers/net/ethernet/ti/icssg_prueth.c
@@ -2219,6 +2219,8 @@ static int prueth_netdev_init(struct prueth *prueth,
 
 	ndev->netdev_ops = &emac_netdev_ops;
 	ndev->ethtool_ops = &icssg_ethtool_ops;
+	ndev->hw_features = NETIF_F_SG;
+	ndev->features = ndev->hw_features;
 
 	netif_napi_add(ndev, &emac->napi_rx,
 		       emac_napi_rx_poll, NAPI_POLL_WEIGHT);
