[PATCH net-next 6/9] net: fec: use tso_features_check()

Eric Dumazet
2026-04-03T04:32:50Z

Fixes: 79f339125ea3 ("net: fec: Add software TSO support")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Nimrod Andy <B38611@freescale.com>
Cc: Wei Fang <wei.fang@nxp.com>
Cc: Frank Li <frank.li@nxp.com>
Cc: Shenwei Wang <shenwei.wang@nxp.com>
---
drivers/net/ethernet/freescale/fec_main.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index f89aa94ce0202d5f28f37362ce70e0943aa14025..846fdd51cf8b6c5ef9fffcd5688ad54cb8def919 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -860,6 +860,7 @@ static int fec_enet_txq_submit_tso(struct fec_enet_priv_tx_q *txq,

/* Initialize the TSO handler, and prepare the first payload */
hdr_len = tso_start(skb, &tso);
+ DEBUG_NET_WARN_ON_ONCE(hdr_len > TSO_HEADER_SIZE);

total_len = skb->len - hdr_len;
while (total_len > 0) {
@@ -4887,6 +4888,7 @@ static int fec_change_mtu(struct net_device *ndev, int new_mtu)
static const struct net_device_ops fec_netdev_ops = {
.ndo_open = fec_enet_open,
.ndo_stop = fec_enet_close,
+ .ndo_features_check = tso_features_check,
.ndo_start_xmit = fec_enet_start_xmit,
.ndo_select_queue = fec_enet_select_queue,
.ndo_set_rx_mode = set_multicast_list,
--
2.53.0.1213.gd9a14994de-goog