diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-11-19 14:08:08 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-11-28 09:01:50 -0500 |
commit | f684565e0af43586bfc3e005d173f94b0f902a5d (patch) | |
tree | a10257c1c797c058cb5f5ed4a0ac437ea1d3927a | |
parent | 95943425c09616d22ba9bc185d70f8b815a77f9b (diff) |
mac80211: add tx_status_noskb to rate_control_ops
This op works like .tx_status, except it does not need access to the
skb. This will be used by drivers that cannot match tx status
information to specific packets.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | include/net/mac80211.h | 4 | ||||
-rw-r--r-- | net/mac80211/rate.h | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 66cbfe46428d..01dfd22e45fd 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -4837,6 +4837,10 @@ struct rate_control_ops { | |||
4837 | void (*free_sta)(void *priv, struct ieee80211_sta *sta, | 4837 | void (*free_sta)(void *priv, struct ieee80211_sta *sta, |
4838 | void *priv_sta); | 4838 | void *priv_sta); |
4839 | 4839 | ||
4840 | void (*tx_status_noskb)(void *priv, | ||
4841 | struct ieee80211_supported_band *sband, | ||
4842 | struct ieee80211_sta *sta, void *priv_sta, | ||
4843 | struct ieee80211_tx_info *info); | ||
4840 | void (*tx_status)(void *priv, struct ieee80211_supported_band *sband, | 4844 | void (*tx_status)(void *priv, struct ieee80211_supported_band *sband, |
4841 | struct ieee80211_sta *sta, void *priv_sta, | 4845 | struct ieee80211_sta *sta, void *priv_sta, |
4842 | struct sk_buff *skb); | 4846 | struct sk_buff *skb); |
diff --git a/net/mac80211/rate.h b/net/mac80211/rate.h index 18babe302832..dd25964a300a 100644 --- a/net/mac80211/rate.h +++ b/net/mac80211/rate.h | |||
@@ -37,11 +37,15 @@ static inline void rate_control_tx_status(struct ieee80211_local *local, | |||
37 | struct rate_control_ref *ref = local->rate_ctrl; | 37 | struct rate_control_ref *ref = local->rate_ctrl; |
38 | struct ieee80211_sta *ista = &sta->sta; | 38 | struct ieee80211_sta *ista = &sta->sta; |
39 | void *priv_sta = sta->rate_ctrl_priv; | 39 | void *priv_sta = sta->rate_ctrl_priv; |
40 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | ||
40 | 41 | ||
41 | if (!ref || !test_sta_flag(sta, WLAN_STA_RATE_CONTROL)) | 42 | if (!ref || !test_sta_flag(sta, WLAN_STA_RATE_CONTROL)) |
42 | return; | 43 | return; |
43 | 44 | ||
44 | ref->ops->tx_status(ref->priv, sband, ista, priv_sta, skb); | 45 | if (ref->ops->tx_status) |
46 | ref->ops->tx_status(ref->priv, sband, ista, priv_sta, skb); | ||
47 | else | ||
48 | ref->ops->tx_status_noskb(ref->priv, sband, ista, priv_sta, info); | ||
45 | } | 49 | } |
46 | 50 | ||
47 | 51 | ||