summaryrefslogtreecommitdiffstats
path: root/include/net/mac80211.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-04-26 17:11:37 +0200
committerJohannes Berg <johannes.berg@intel.com>2017-04-28 11:08:21 +0200
commit5fe49a9d11644f4aa9034c7eedbcfc6e52373e10 (patch)
tree43dabd1334389c99c4bbd4dd96817cd5981f3d10 /include/net/mac80211.h
parenteefebd3164604a19744dca3df08e050999031d74 (diff)
downloadop-kernel-dev-5fe49a9d11644f4aa9034c7eedbcfc6e52373e10.zip
op-kernel-dev-5fe49a9d11644f4aa9034c7eedbcfc6e52373e10.tar.gz
mac80211: add ieee80211_tx_status_ext
This allows the driver to pass in struct ieee80211_tx_status directly. Make ieee80211_tx_status_noskb a wrapper around it. As with ieee80211_tx_status_noskb, there is no _ni variant of this call, because it probably won't be needed. Even if the driver won't provide any extra status info other than what's in struct ieee80211_tx_info already, it can optimize status reporting this way by passing in the station pointer. Signed-off-by: Felix Fietkau <nbd@nbd.name> [use C99 initializers] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r--include/net/mac80211.h31
1 files changed, 28 insertions, 3 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index c9ba79a..807ee6c 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -4214,6 +4214,23 @@ void ieee80211_tx_status(struct ieee80211_hw *hw,
struct sk_buff *skb);
/**
+ * ieee80211_tx_status_ext - extended transmit status callback
+ *
+ * This function can be used as a replacement for ieee80211_tx_status
+ * in drivers that may want to provide extra information that does not
+ * fit into &struct ieee80211_tx_info.
+ *
+ * Calls to this function for a single hardware must be synchronized
+ * against each other. Calls to this function, ieee80211_tx_status_ni()
+ * and ieee80211_tx_status_irqsafe() may not be mixed for a single hardware.
+ *
+ * @hw: the hardware the frame was transmitted by
+ * @status: tx status information
+ */
+void ieee80211_tx_status_ext(struct ieee80211_hw *hw,
+ struct ieee80211_tx_status *status);
+
+/**
* ieee80211_tx_status_noskb - transmit status callback without skb
*
* This function can be used as a replacement for ieee80211_tx_status
@@ -4229,9 +4246,17 @@ void ieee80211_tx_status(struct ieee80211_hw *hw,
* (NULL for multicast packets)
* @info: tx status information
*/
-void ieee80211_tx_status_noskb(struct ieee80211_hw *hw,
- struct ieee80211_sta *sta,
- struct ieee80211_tx_info *info);
+static inline void ieee80211_tx_status_noskb(struct ieee80211_hw *hw,
+ struct ieee80211_sta *sta,
+ struct ieee80211_tx_info *info)
+{
+ struct ieee80211_tx_status status = {
+ .sta = sta,
+ .info = info,
+ };
+
+ ieee80211_tx_status_ext(hw, &status);
+}
/**
* ieee80211_tx_status_ni - transmit status callback (in process context)
OpenPOWER on IntegriCloud