Message ID | 1416094080-49220-3-git-send-email-nbd@openwrt.org (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
> +++ b/net/mac80211/rate.h > @@ -37,11 +37,15 @@ static inline void rate_control_tx_status(struct ieee80211_local *local, > struct rate_control_ref *ref = local->rate_ctrl; > struct ieee80211_sta *ista = &sta->sta; > 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)) > return; > > - ref->ops->tx_status(ref->priv, sband, ista, priv_sta, skb); > + if (ref->ops->tx_status) > + ref->ops->tx_status(ref->priv, sband, ista, priv_sta, skb); > + else > + ref->ops->tx_status_noskb(ref->priv, sband, ista, priv_sta, info); I can't say I like this - you're going to have to pass NULL or something as the SKB pointer, and then rely on having a rate control algorithm that deals with it, etc.... johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 5f203a6..32a779c 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -4727,6 +4727,10 @@ struct rate_control_ops { void (*free_sta)(void *priv, struct ieee80211_sta *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, struct ieee80211_sta *sta, void *priv_sta, struct sk_buff *skb); diff --git a/net/mac80211/rate.h b/net/mac80211/rate.h index 18babe3..dd25964 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, struct rate_control_ref *ref = local->rate_ctrl; struct ieee80211_sta *ista = &sta->sta; 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)) return; - ref->ops->tx_status(ref->priv, sband, ista, priv_sta, skb); + if (ref->ops->tx_status) + ref->ops->tx_status(ref->priv, sband, ista, priv_sta, skb); + else + ref->ops->tx_status_noskb(ref->priv, sband, ista, priv_sta, info); }
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> --- include/net/mac80211.h | 4 ++++ net/mac80211/rate.h | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-)