summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2020-09-08 14:37:00 +0200
committerJohannes Berg <johannes.berg@intel.com>2020-09-18 12:24:25 +0200
commitf02dff93e26bef46f5511f1e8229061bd23c3074 (patch)
treee205e46210e281d4cb8385db6bd690e3e06fde80 /net/mac80211
parentmac80211: support using ieee80211_tx_status_ext to free skbs without status info (diff)
downloadlinux-f02dff93e26bef46f5511f1e8229061bd23c3074.tar.xz
linux-f02dff93e26bef46f5511f1e8229061bd23c3074.zip
mac80211: extend ieee80211_tx_status_ext to support bulk free
Store processed skbs ready to be freed in a list so the driver bulk free them Signed-off-by: Felix Fietkau <nbd@nbd.name> Link: https://lore.kernel.org/r/20200908123702.88454-13-nbd@nbd.name Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/status.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index 28df5d02e449..7fe5bececfd9 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -1044,7 +1044,10 @@ static void __ieee80211_tx_status(struct ieee80211_hw *hw,
* with this test...
*/
if (!local->monitors && (!send_to_cooked || !local->cooked_mntrs)) {
- dev_kfree_skb(skb);
+ if (status->free_list)
+ list_add_tail(&skb->list, status->free_list);
+ else
+ dev_kfree_skb(skb);
return;
}
@@ -1173,7 +1176,10 @@ free:
return;
ieee80211_report_used_skb(local, skb, false);
- dev_kfree_skb(skb);
+ if (status->free_list)
+ list_add_tail(&skb->list, status->free_list);
+ else
+ dev_kfree_skb(skb);
}
EXPORT_SYMBOL(ieee80211_tx_status_ext);