mac80211: make rate control tx status API more extensible

Rename .tx_status_noskb to .tx_status_ext and pass a new on-stack
struct ieee80211_tx_status instead of struct ieee80211_tx_info.

This struct can be used to pass extra information, e.g. for dynamic tx
power control

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Felix Fietkau 2017-04-26 17:11:35 +02:00 committed by Johannes Berg
parent dcba665b1f
commit 18fb84d986
6 changed files with 58 additions and 55 deletions

View file

@ -948,6 +948,19 @@ struct ieee80211_tx_info {
};
};
/**
* struct ieee80211_tx_status - extended tx staus info for rate control
*
* @sta: Station that the packet was transmitted for
* @info: Basic tx status information
* @skb: Packet skb (can be NULL if not provided by the driver)
*/
struct ieee80211_tx_status {
struct ieee80211_sta *sta;
struct ieee80211_tx_info *info;
struct sk_buff *skb;
};
/**
* struct ieee80211_scan_ies - descriptors for different blocks of IEs
*
@ -5471,10 +5484,9 @@ 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_ext)(void *priv,
struct ieee80211_supported_band *sband,
void *priv_sta, struct ieee80211_tx_status *st);
void (*tx_status)(void *priv, struct ieee80211_supported_band *sband,
struct ieee80211_sta *sta, void *priv_sta,
struct sk_buff *skb);