summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPing-Ke Shih <pkshih@realtek.com>2024-08-22 09:42:54 +0800
committerJohannes Berg <johannes.berg@intel.com>2024-08-27 10:28:55 +0200
commit53bc1b73b67836ac9867f93dee7a443986b4a94f (patch)
tree99b11badb1a94086f284aebb15b84b54de29e3e6 /include
parent373d3f8dcbb1c0d764123653ca4574be636b8d86 (diff)
wifi: mac80211: export ieee80211_purge_tx_queue() for drivers
Drivers need to purge TX SKB when stopping. Using skb_queue_purge() can't report TX status to mac80211, causing ieee80211_free_ack_frame() warns "Have pending ack frames!". Export ieee80211_purge_tx_queue() for drivers to not have to reimplement it. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20240822014255.10211-1-pkshih@realtek.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/net/mac80211.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index cfd64acdc039..adfec877f392 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -3182,6 +3182,19 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw,
void ieee80211_free_txskb(struct ieee80211_hw *hw, struct sk_buff *skb);
/**
+ * ieee80211_purge_tx_queue - purge TX skb queue
+ * @hw: the hardware
+ * @skbs: the skbs
+ *
+ * Free a set of transmit skbs. Use this function when device is going to stop
+ * but some transmit skbs without TX status are still queued.
+ * This function does not take the list lock and the caller must hold the
+ * relevant locks to use it.
+ */
+void ieee80211_purge_tx_queue(struct ieee80211_hw *hw,
+ struct sk_buff_head *skbs);
+
+/**
* DOC: Hardware crypto acceleration
*
* mac80211 is capable of taking advantage of many hardware