1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Fri, 21 Aug 2020 05:49:07 +0200
3 Subject: [PATCH] mac80211: extend ieee80211_tx_status_ext to support
6 Store processed skbs ready to be freed in a list so the driver bulk free them
8 Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 --- a/include/net/mac80211.h
12 +++ b/include/net/mac80211.h
13 @@ -1095,12 +1095,14 @@ ieee80211_info_get_tx_time_est(struct ie
14 * @info: Basic tx status information
15 * @skb: Packet skb (can be NULL if not provided by the driver)
16 * @rate: The TX rate that was used when sending the packet
17 + * @free_list: list where processed skbs are stored to be free'd by the driver
19 struct ieee80211_tx_status {
20 struct ieee80211_sta *sta;
21 struct ieee80211_tx_info *info;
23 struct rate_info *rate;
24 + struct list_head *free_list;
28 --- a/net/mac80211/status.c
29 +++ b/net/mac80211/status.c
30 @@ -1051,7 +1051,10 @@ static void __ieee80211_tx_status(struct
33 if (!local->monitors && (!send_to_cooked || !local->cooked_mntrs)) {
35 + if (status->free_list)
36 + list_add_tail(&skb->list, status->free_list);
42 @@ -1180,7 +1183,10 @@ free:
45 ieee80211_report_used_skb(local, skb, false);
47 + if (status->free_list)
48 + list_add_tail(&skb->list, status->free_list);
52 EXPORT_SYMBOL(ieee80211_tx_status_ext);