[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210805145555.12182-3-grygorii.strashko@ti.com>
Date: Thu, 5 Aug 2021 17:55:54 +0300
From: Grygorii Strashko <grygorii.strashko@...com>
To: "David S. Miller" <davem@...emloft.net>, <netdev@...r.kernel.org>,
Jakub Kicinski <kuba@...nel.org>
CC: <linux-kernel@...r.kernel.org>,
Ben Hutchings <ben.hutchings@...ensium.com>,
Vignesh Raghavendra <vigneshr@...com>,
<linux-omap@...r.kernel.org>, Lokesh Vutla <lokeshvutla@...com>,
Grygorii Strashko <grygorii.strashko@...com>
Subject: [PATCH net-next 2/3] net: ethernet: ti: davinci_emac: switch to use skb_put_padto()
Use skb_put_padto() instead of skb_padto() so skb->len also got updated, as
preparation for further removing frame padding from cpdma.
It also makes xmit path more clear and linear.
Signed-off-by: Grygorii Strashko <grygorii.strashko@...com>
---
drivers/net/ethernet/ti/davinci_emac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c
index 637796670746..b1c5cbe7478b 100644
--- a/drivers/net/ethernet/ti/davinci_emac.c
+++ b/drivers/net/ethernet/ti/davinci_emac.c
@@ -943,7 +943,7 @@ static int emac_dev_xmit(struct sk_buff *skb, struct net_device *ndev)
goto fail_tx;
}
- ret_code = skb_padto(skb, EMAC_DEF_MIN_ETHPKTSIZE);
+ ret_code = skb_put_padto(skb, EMAC_DEF_MIN_ETHPKTSIZE);
if (unlikely(ret_code < 0)) {
if (netif_msg_tx_err(priv) && net_ratelimit())
dev_err(emac_dev, "DaVinci EMAC: packet pad failed");
--
2.17.1
Powered by blists - more mailing lists