diff --git a/target/linux/generic/pending-5.15/739-add-software-padding-ethernet-tx-path.patch b/target/linux/generic/pending-5.15/739-add-software-padding-ethernet-tx-path.patch new file mode 100644 index 00000000000000..dca78d6003c710 --- /dev/null +++ b/target/linux/generic/pending-5.15/739-add-software-padding-ethernet-tx-path.patch @@ -0,0 +1,18 @@ +diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +index 31968b8..d93d7fa 100644 +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +@@ -1523,6 +1523,13 @@ static int mtk_tx_map(struct sk_buff *skb, struct net_device *dev, + int queue = skb_get_queue_mapping(skb); + int k = 0; + ++ if (skb->len <= 40) { ++ if (skb_put_padto(skb, 60)) ++ return -ENOMEM; ++ txd_info.size = skb_headlen(skb); ++ txd_info.last = !skb_is_nonlinear(skb); ++ } ++ + txq = netdev_get_tx_queue(dev, queue); + itxd = ring->next_free; + itxd_pdma = qdma_to_pdma(ring, itxd);