aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/mac80211.h4
-rw-r--r--net/mac80211/rate.c6
-rw-r--r--net/mac80211/rate.h4
3 files changed, 11 insertions, 3 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index d881ed8ad2c1..6f3bc4cc53e5 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -245,6 +245,9 @@ struct ieee80211_bss_conf {
245 * @IEEE80211_TX_CTL_RATE_CTRL_PROBE: internal to mac80211, can be 245 * @IEEE80211_TX_CTL_RATE_CTRL_PROBE: internal to mac80211, can be
246 * set by rate control algorithms to indicate probe rate, will 246 * set by rate control algorithms to indicate probe rate, will
247 * be cleared for fragmented frames (except on the last fragment) 247 * be cleared for fragmented frames (except on the last fragment)
248 * @IEEE80211_TX_INTFL_RCALGO: mac80211 internal flag, do not test or
249 * set this flag in the driver; indicates that the rate control
250 * algorithm was used and should be notified of TX status
248 */ 251 */
249enum mac80211_tx_control_flags { 252enum mac80211_tx_control_flags {
250 IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), 253 IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0),
@@ -260,6 +263,7 @@ enum mac80211_tx_control_flags {
260 IEEE80211_TX_STAT_AMPDU = BIT(10), 263 IEEE80211_TX_STAT_AMPDU = BIT(10),
261 IEEE80211_TX_STAT_AMPDU_NO_BACK = BIT(11), 264 IEEE80211_TX_STAT_AMPDU_NO_BACK = BIT(11),
262 IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(12), 265 IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(12),
266 IEEE80211_TX_INTFL_RCALGO = BIT(13),
263}; 267};
264 268
265/** 269/**
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
index 3fa7ab285066..4641f00a1e5c 100644
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -219,10 +219,12 @@ void rate_control_get_rate(struct ieee80211_sub_if_data *sdata,
219 info->control.rates[i].count = 1; 219 info->control.rates[i].count = 1;
220 } 220 }
221 221
222 if (sta && sdata->force_unicast_rateidx > -1) 222 if (sta && sdata->force_unicast_rateidx > -1) {
223 info->control.rates[0].idx = sdata->force_unicast_rateidx; 223 info->control.rates[0].idx = sdata->force_unicast_rateidx;
224 else 224 } else {
225 ref->ops->get_rate(ref->priv, ista, priv_sta, txrc); 225 ref->ops->get_rate(ref->priv, ista, priv_sta, txrc);
226 info->flags |= IEEE80211_TX_INTFL_RCALGO;
227 }
226 228
227 /* 229 /*
228 * try to enforce the maximum rate the user wanted 230 * try to enforce the maximum rate the user wanted
diff --git a/net/mac80211/rate.h b/net/mac80211/rate.h
index b9164c9a9563..2ab5ad9e71ce 100644
--- a/net/mac80211/rate.h
+++ b/net/mac80211/rate.h
@@ -44,8 +44,10 @@ static inline void rate_control_tx_status(struct ieee80211_local *local,
44 struct rate_control_ref *ref = local->rate_ctrl; 44 struct rate_control_ref *ref = local->rate_ctrl;
45 struct ieee80211_sta *ista = &sta->sta; 45 struct ieee80211_sta *ista = &sta->sta;
46 void *priv_sta = sta->rate_ctrl_priv; 46 void *priv_sta = sta->rate_ctrl_priv;
47 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
47 48
48 ref->ops->tx_status(ref->priv, sband, ista, priv_sta, skb); 49 if (likely(info->flags & IEEE80211_TX_INTFL_RCALGO))
50 ref->ops->tx_status(ref->priv, sband, ista, priv_sta, skb);
49} 51}
50 52
51 53