77 lines
2.1 KiB
Diff
77 lines
2.1 KiB
Diff
--- a/cdx/dpa_wifi.c 2026-05-08 15:39:41.418608108 +0000
|
|
+++ b/cdx/dpa_wifi.c 2026-05-08 15:39:41.434536563 +0000
|
|
@@ -840,17 +840,15 @@
|
|
/* Get a page frag to store the SGTable, or a full page if the errata
|
|
* is in place and we need to avoid crossing a 4k boundary.
|
|
*/
|
|
-#ifdef FM_ERRATUM_A050385
|
|
if (unlikely(fm_has_errata_a050385())) {
|
|
struct page *new_page = alloc_page(GFP_ATOMIC);
|
|
|
|
if (unlikely(!new_page))
|
|
return -ENOMEM;
|
|
sgt_buf = page_address(new_page);
|
|
- }
|
|
- else
|
|
-#endif
|
|
+ } else {
|
|
sgt_buf = netdev_alloc_frag(priv->eth_priv->tx_headroom + sgt_size);
|
|
+ }
|
|
|
|
if (unlikely(!sgt_buf)) {
|
|
dev_err(dpa_bp->dev, "netdev_alloc_frag() failed\n");
|
|
@@ -1082,11 +1080,7 @@
|
|
/* We do not support Jumbo frames on LS1043 and thus we edit
|
|
* the skb truesize only when the 4k errata is not present.
|
|
*/
|
|
-#ifdef FM_ERRATUM_A050385
|
|
if (likely(!fm_has_errata_a050385())) {
|
|
-#else
|
|
- if (likely(!dpaa_errata_a010022)) {
|
|
-#endif
|
|
skb->truesize = SKB_TRUESIZE(dpa_fd_length(fd));
|
|
}
|
|
}
|
|
@@ -1152,11 +1146,8 @@
|
|
err = custom_vwd_skb_to_sg_fd(priv, skb, &fd);
|
|
INCR_PER_CPU_STAT(vap_dev->vap_stats, pkts_tx_sg);
|
|
#else
|
|
-#ifdef FM_ERRATUM_A050385
|
|
if (unlikely(fm_has_errata_a050385()) && a050385_check_skb(skb, priv->eth_priv))
|
|
skb_need_wa = true;
|
|
-#endif
|
|
-
|
|
|
|
nonlinear = skb_is_nonlinear(skb);
|
|
|
|
@@ -1217,7 +1208,6 @@
|
|
* more fragments than we support. In this case,
|
|
* we have no choice but to linearize it ourselves.
|
|
*/
|
|
-#ifdef FM_ERRATUM_A050385
|
|
/* No point in linearizing the skb now if we are going
|
|
* to realign and linearize it again further down due
|
|
* to the A050385 errata
|
|
@@ -1226,13 +1216,11 @@
|
|
skb_need_wa = true;
|
|
else
|
|
err = __skb_linearize(skb);
|
|
-#endif
|
|
}
|
|
if (unlikely(!skb || err < 0))
|
|
/* Common out-of-memory error path */
|
|
goto skb_to_fd_failed;
|
|
|
|
-#ifdef FM_ERRATUM_A050385
|
|
/* Verify the skb a second time if it has been updated since
|
|
* the previous check
|
|
*/
|
|
@@ -1248,7 +1236,6 @@
|
|
dev_kfree_skb(skb);
|
|
skb = nskb;
|
|
}
|
|
-#endif
|
|
|
|
err = vwd_skb_to_contig_fd(priv, skb, &fd, &offset);
|
|
}
|