Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f684565e authored by Felix Fietkau's avatar Felix Fietkau Committed by Johannes Berg
Browse files

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: default avatarFelix Fietkau <nbd@openwrt.org>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 95943425
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -4837,6 +4837,10 @@ struct rate_control_ops {
	void (*free_sta)(void *priv, struct ieee80211_sta *sta,
	void (*free_sta)(void *priv, struct ieee80211_sta *sta,
			 void *priv_sta);
			 void *priv_sta);


	void (*tx_status_noskb)(void *priv,
				struct ieee80211_supported_band *sband,
				struct ieee80211_sta *sta, void *priv_sta,
				struct ieee80211_tx_info *info);
	void (*tx_status)(void *priv, struct ieee80211_supported_band *sband,
	void (*tx_status)(void *priv, struct ieee80211_supported_band *sband,
			  struct ieee80211_sta *sta, void *priv_sta,
			  struct ieee80211_sta *sta, void *priv_sta,
			  struct sk_buff *skb);
			  struct sk_buff *skb);
+5 −1
Original line number Original line Diff line number Diff line
@@ -37,11 +37,15 @@ static inline void rate_control_tx_status(struct ieee80211_local *local,
	struct rate_control_ref *ref = local->rate_ctrl;
	struct rate_control_ref *ref = local->rate_ctrl;
	struct ieee80211_sta *ista = &sta->sta;
	struct ieee80211_sta *ista = &sta->sta;
	void *priv_sta = sta->rate_ctrl_priv;
	void *priv_sta = sta->rate_ctrl_priv;
	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);


	if (!ref || !test_sta_flag(sta, WLAN_STA_RATE_CONTROL))
	if (!ref || !test_sta_flag(sta, WLAN_STA_RATE_CONTROL))
		return;
		return;


	if (ref->ops->tx_status)
		ref->ops->tx_status(ref->priv, sband, ista, priv_sta, skb);
		ref->ops->tx_status(ref->priv, sband, ista, priv_sta, skb);
	else
		ref->ops->tx_status_noskb(ref->priv, sband, ista, priv_sta, info);
}
}