diff mbox series

[v2,15/15] patches: fixup skb list patch

Message ID 20220513160523.2944694-16-thomas@adapt-ip.com (mailing list archive)
State New, archived
Headers show
Series Resurrect Integration Mode v2 | expand

Commit Message

Thomas Pedersen May 13, 2022, 4:05 p.m. UTC
4.19 does indeed add skb->list, but skb_list_del_init()
was not added until 4.20. This patch fixes builds against
4.19. Tested with backported v5.15.33.

Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com>
---
 patches/0097-skb-list/mac80211-rx.patch | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/patches/0097-skb-list/mac80211-rx.patch b/patches/0097-skb-list/mac80211-rx.patch
index 65189dd94e52..1cad4f8ac30b 100644
--- a/patches/0097-skb-list/mac80211-rx.patch
+++ b/patches/0097-skb-list/mac80211-rx.patch
@@ -99,14 +99,19 @@  the older kernel instead. The list attributes where also backported to
  
  
  	/*
-@@ -5005,8 +5027,13 @@ void ieee80211_rx_napi(struct ieee80211_
+@@ -5005,8 +5027,18 @@ void ieee80211_rx_napi(struct ieee80211_
  		return;
  	}
  
 +#if LINUX_VERSION_IS_GEQ(4,19,0)
  	list_for_each_entry_safe(skb, tmp, &list, list) {
++#if LINUX_VERSION_IS_GEQ(4,20,0)
  		skb_list_del_init(skb);
 +#else
++		__list_del_entry(&skb->list);
++		skb_mark_not_on_list(skb);
++#endif
++#else
 +	skb_queue_walk_safe(&list, skb, tmp) {
 +		__skb_unlink(skb, &list);
 +#endif