aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2020-11-08 18:36:21 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2020-12-05 21:24:57 +0100
commita58d385ea88c1bea9b0e20fe7ee5da1880ac4493 (patch)
tree3cc261dd56af0d3642d7949208ad1ed63077e99b
parent5023d8e2f8e22bb41c5b8c5c92f9457c47f3bce5 (diff)
downloadbackports-a58d385ea88c1bea9b0e20fe7ee5da1880ac4493.tar.gz
backports: Make ieee80211_tx_status handling work on older kernel versions
The commit f02dff93e26b ("mac80211: extend ieee80211_tx_status_ext to support bulk free") makes use of the list attribute in the skb, but this is not available in kernel < 4.19, use the sk_buff_head instead on these kernel versions. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--patches/0097-skb-list/mac80211-status.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/patches/0097-skb-list/mac80211-status.patch b/patches/0097-skb-list/mac80211-status.patch
new file mode 100644
index 00000000..ab968445
--- /dev/null
+++ b/patches/0097-skb-list/mac80211-status.patch
@@ -0,0 +1,47 @@
+Make ieee80211_tx_status handling work on older kernel versions
+
+The commit f02dff93e26b ("mac80211: extend ieee80211_tx_status_ext to
+support bulk free") makes use of the list attribute in the skb, but this
+is not available in kernel < 4.19, use the sk_buff_head instead on these
+kernel versions.
+
+--- a/include/net/mac80211.h
++++ b/include/net/mac80211.h
+@@ -1132,7 +1132,11 @@ struct ieee80211_tx_status {
+ struct ieee80211_tx_info *info;
+ struct sk_buff *skb;
+ struct rate_info *rate;
++#if LINUX_VERSION_IS_GEQ(4,19,0)
+ struct list_head *free_list;
++#else
++ struct sk_buff_head *free_list;
++#endif
+ };
+
+ /**
+--- a/net/mac80211/status.c
++++ b/net/mac80211/status.c
+@@ -1033,7 +1033,11 @@ static void __ieee80211_tx_status(struct
+ */
+ if (!local->monitors && (!send_to_cooked || !local->cooked_mntrs)) {
+ if (status->free_list)
++#if LINUX_VERSION_IS_GEQ(4,19,0)
+ list_add_tail(&skb->list, status->free_list);
++#else
++ __skb_queue_tail(status->free_list, skb);
++#endif
+ else
+ dev_kfree_skb(skb);
+ return;
+@@ -1183,7 +1187,11 @@ free:
+
+ ieee80211_report_used_skb(local, skb, false);
+ if (status->free_list)
++#if LINUX_VERSION_IS_GEQ(4,19,0)
+ list_add_tail(&skb->list, status->free_list);
++#else
++ __skb_queue_tail(status->free_list, skb);
++#endif
+ else
+ dev_kfree_skb(skb);
+ }