]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: stmmac: make stmmac_set_gso_features() more readable
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 1 Apr 2026 07:22:05 +0000 (08:22 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 2 Apr 2026 18:28:20 +0000 (11:28 -0700)
Make stmmac_set_gso_features() more readable by adding some whitespace
and getting rid of the indentation.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1w7ptt-0000000Eatn-1ziK@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

index 7f8335b69301312baaa9126cdfe0455c24dc9703..c9cb81ae812e32028ae030d64d6bf10614725a19 100644 (file)
@@ -4389,13 +4389,19 @@ static void stmmac_set_gso_features(struct net_device *ndev)
 {
        struct stmmac_priv *priv = netdev_priv(ndev);
 
-       if ((priv->plat->flags & STMMAC_FLAG_TSO_EN) && (priv->dma_cap.tsoen)) {
-               ndev->hw_features |= NETIF_F_TSO | NETIF_F_TSO6;
-               if (priv->plat->core_type == DWMAC_CORE_GMAC4)
-                       ndev->hw_features |= NETIF_F_GSO_UDP_L4;
-               stmmac_set_gso_types(priv, true);
-               dev_info(priv->device, "TSO feature enabled\n");
-       }
+       if (!(priv->plat->flags & STMMAC_FLAG_TSO_EN))
+               return;
+
+       if (!priv->dma_cap.tsoen)
+               return;
+
+       ndev->hw_features |= NETIF_F_TSO | NETIF_F_TSO6;
+       if (priv->plat->core_type == DWMAC_CORE_GMAC4)
+               ndev->hw_features |= NETIF_F_GSO_UDP_L4;
+
+       stmmac_set_gso_types(priv, true);
+
+       dev_info(priv->device, "TSO feature enabled\n");
 }
 
 static size_t stmmac_tso_header_size(struct sk_buff *skb)